Function at 0x5167aa
Capabilities:
Check for time delay via gettickcount
Get file attributes
Set file attributes

Disassembly:
push 0x8c
mov eax, 0x59b943
call fcn.00584f68
mov esi, ecx
mov dword [ebp - 0x14], esi
push 0x5a3f7c
push str..FS_SS_Init
push str.CSSFileSystem::Init
push 2
push 0x67a
lea eax, [ebp - 0x38]
push 0x5c0640
push eax
call fcn.004b1d3b
add esp, 0x1c
push 1
push str.SS::Init
push 0x5c03cc
xor ebx, ebx
push esi
lea ecx, [ebp - 0x98]
mov dword [ebp - 4], ebx
call fcn.0051db88
lea eax, [esi + 0xc]
cmp dword [eax], ebx
mov byte [ebp - 4], 1
mov dword [ebp - 0x10], eax
je 0x516837
xor esi, esi
inc esi
lea ecx, [ebp - 0x98]
mov byte [ebp - 4], bl
call fcn.0051dd5e
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x38]
call fcn.004b1dba
mov eax, esi
call fcn.00585040
ret 4
cmp dword [ebp + 8], ebx
je 0x51684b
mov ecx, esi
call fcn.0051673f
test eax, eax
jne 0x51684b
xor esi, esi
jmp 0x516813
push ecx
lea edi, [esi + 8]
mov ecx, esp
mov dword [ebp + 8], esp
push edi
call sym.txupd.exe_public:_void___thiscall_CTXStringW::constructor_class_CTXStringW_const__
lea eax, [ebp - 0x20]
push eax
call fcn.004e4eed
pop ecx
pop ecx
mov ecx, eax
mov byte [ebp - 4], 2
call sym.txupd.exe_public:_wchar_t_const____thiscall_CTXStringW::operator_wchar_t_const__void_const
push eax
call fcn.004e4b4c
neg eax
sbb al, al
pop ecx
inc al
lea ecx, [ebp - 0x20]
mov byte [ebp + 0xb], al
mov byte [ebp - 4], 1
call sym.txupd.exe_public:_void___thiscall_CTXStringW::destructor_void_
cmp byte [ebp + 0xb], bl
jne 0x516847
cmp dword [esi + 0x28], ebx
je 0x5168a6
mov dword [ebp - 0x20], 0x1002
mov dword [ebp - 0x24], 0x20
jmp 0x5168b4
mov dword [ebp - 0x20], 0x1012
mov dword [ebp - 0x24], 0x12
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
push ebx
push str.SS::OpenStorage
push str.Internal
push dword [ebp - 0x14]
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x18], eax
call fcn.0051db88
mov ecx, edi
mov byte [ebp - 4], 3
call sym.txupd.exe_public:_wchar_t_const____thiscall_CTXStringW::operator_wchar_t_const__void_const
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x5168fd
and eax, 0xfffffffe
push eax
mov ecx, edi
call sym.txupd.exe_public:_wchar_t_const____thiscall_CTXStringW::operator_wchar_t_const__void_const
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
call esi
push dword [ebp - 0x10]
mov ecx, edi
push ebx
push ebx
push dword [ebp - 0x24]
mov dword [ebp - 0x1c], eax
push ebx
call sym.txupd.exe_public:_wchar_t_const____thiscall_CTXStringW::operator_wchar_t_const__void_const
push eax
call dword [sym.imp.ole32.dll_StgOpenStorage]
mov dword [ebp + 8], eax
call esi
cmp dword [ebp + 8], ebx
jl 0x516930
sub eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
push eax
push edi
call fcn.00512c7a
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 1
call fcn.0051dd5e
call esi
sub eax, dword [ebp - 0x18]
cmp eax, 0xa
jbe 0x516976
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x18], esp
push edi
call sym.txupd.exe_public:_void___thiscall_CTXStringW::constructor_class_CTXStringW_const__
push str.Path_s_CostTime__d
push str.PerfFS.StgOpenStorage
push 4
push str.CSSFileSystem::Init
push 0x6b8
push 0x5c0640
call fcn.0046fa20
add esp, 0x20
mov eax, dword [ebp - 0x10]
cmp dword [eax], ebx
jne 0x516b0c
mov ecx, dword [ebp - 0x14]
cmp dword [ecx + 0x28], ebx
jne 0x516b0c
call fcn.0051673f
test eax, eax
je 0x516b0c
mov eax, dword [ebp + 8]
cmp eax, 0x80030005
je 0x5169bd
cmp eax, 0x80030020
je 0x5169bd
cmp eax, 0x80030021
je 0x5169bd
cmp eax, 0x80090020
jne 0x516b0c
push ebx
push ebx
push 3
push ebx
push 1
push 0xc0000000
mov ecx, edi
call sym.txupd.exe_public:_wchar_t_const____thiscall_CTXStringW::operator_wchar_t_const__void_const
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp + 8]
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 8], 0xffffffff
jne 0x516a43
cmp dword [ebp - 0x18], 5
jne 0x516a43
mov esi, dword [ebp - 0x14]
push dword [esi + 0x40]
push esi
call fcn.004de004
mov ecx, eax
call fcn.004dfc62
cmp dword [esi + 0x40], ebx
je 0x516a13
mov dword [esi + 0x40], ebx
mov ecx, edi
call sym.txupd.exe_public:_wchar_t_const____thiscall_CTXStringW::operator_wchar_t_const__void_const
push eax
push 0x5bf7a8
push str.FileSystem
push 2
push str.CSSFileSystem::Init
push 0x6c8
push 0x5c0640
call fcn.004587e0
add esp, 0x1c
jmp 0x516847
mov ecx, edi
call sym.txupd.exe_public:_wchar_t_const____thiscall_CTXStringW::operator_wchar_t_const__void_const
push eax
push str.try_to_sleep_somewhile_to_wait_for_the_file__s.
push str.FileSystem
push 4
push str.CSSFileSystem::Init
push 0x6cc
push 0x5c0640
call fcn.004587e0
add esp, 0x1c
mov dword [ebp - 0x1c], ebx
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
push str.SS::OpenStorage
push str.Internal
push dword [ebp - 0x14]
lea ecx, [ebp - 0x68]
call fcn.0051db88
mov byte [ebp - 4], 4
call esi
push dword [ebp - 0x10]
mov ecx, edi
push ebx
push ebx
push dword [ebp - 0x24]
mov dword [ebp - 0x18], eax
push ebx
call sym.txupd.exe_public:_wchar_t_const____thiscall_CTXStringW::operator_wchar_t_const__void_const
push eax
call dword [sym.imp.ole32.dll_StgOpenStorage]
mov dword [ebp + 8], eax
call esi
cmp dword [ebp + 8], ebx
jl 0x516ac9
sub eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
push eax
push edi
call fcn.00512c7a
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 1
call fcn.0051dd5e
mov eax, dword [ebp - 0x10]
cmp dword [eax], ebx
jne 0x516b0c
inc dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], 5
jl 0x516a71
cmp dword [eax], ebx
jne 0x516b0c
mov ecx, edi
call sym.txupd.exe_public:_wchar_t_const____thiscall_CTXStringW::operator_wchar_t_const__void_const
push eax
push 0x5c09bc
push str.FileSystem
push 2
push str.CSSFileSystem::Init
push 0x6ea
jmp 0x516a31
mov eax, dword [ebp - 0x10]
cmp dword [eax], ebx
jne 0x516b26
push eax
push ebx
push dword [ebp - 0x20]
mov ecx, edi
call sym.txupd.exe_public:_wchar_t_const____thiscall_CTXStringW::operator_wchar_t_const__void_const
push eax
call dword [sym.imp.ole32.dll_StgCreateDocfile]
mov eax, dword [ebp - 0x10]
cmp dword [eax], ebx
jne 0x516b74
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x28], ebx
je 0x516b74
mov dword [ebp + 8], ebx
lea eax, [ebp + 8]
push eax
push 1
mov ecx, edi
mov byte [ebp - 4], 5
call sym.txupd.exe_public:_wchar_t_const____thiscall_CTXStringW::operator_wchar_t_const__void_const
push eax
call fcn.00532385
add esp, 0xc
push dword [ebp - 0x10]
push ebx
push ebx
push 0x20
push ebx
push dword [ebp + 8]
call dword [sym.imp.ole32.dll_StgOpenStorageOnILockBytes]
mov eax, dword [ebp + 8]
cmp eax, ebx
mov byte [ebp - 4], 1
je 0x516b74
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x10]
cmp dword [eax], ebx
je 0x516847
jmp 0x516810