Function at 0x518b60
Capabilities:
Check for time delay via gettickcount
Check if file exists
Get common file path
Read .ini file

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x523afb
push eax
mov eax, dword [0x590e68]
mov dword fs:[0], esp
sub esp, 0xa30
push esi
xor esi, esi
cmp eax, esi
je 0x518ba2
mov eax, dword [0x590e64]
pop esi
mov ecx, dword [esp + 0xa30]
mov dword fs:[0], ecx
add esp, 0xa3c
ret
push ebx
push ebp
push edi
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x42a]
mov word [esp + 0x428], si
mov ebx, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 1
lea eax, [esp + 0x42c]
push 0x1a
push eax
push esi
mov dword [0x590e68], 1
call ebx
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x1a]
mov ebp, dword [sym.imp.SHLWAPI.dll_PathCombineW]
mov word [esp + 0x18], si
push 0x56d3c0
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x42c]
lea edx, [esp + 0x1c]
push ecx
push edx
stosw word es:[edi], ax
call ebp
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x632]
mov word [esp + 0x630], si
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x630]
push 0x104
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x630]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
cmp eax, esi
je 0x518d75
push 0xb
push 0x56d3a8
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
je 0x518d75
cmp dword [0x588504], esi
je 0x518d75
cmp dword [0x5884f0], esi
je 0x518d75
cmp dword [0x588518], esi
jne 0x518d75
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLangID]
cmp ax, 0x804
jne 0x518d75
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x518d75
lea eax, [esp + 0x10]
mov dword [esp + 0x10], esi
push eax
push 0x20000
push esi
push 0x56d370
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x518d66
mov ecx, 0x81
lea edi, [esp + 0x83a]
mov word [esp + 0x838], si
push 1
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x83c]
push 0x1a
push ecx
push esi
stosw word es:[edi], ax
call ebx
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x222]
mov word [esp + 0x220], si
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x838]
push 0x5695c8
lea eax, [esp + 0x224]
push edx
push eax
call ebp
lea ecx, [esp + 0x220]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x518d5c
lea edx, [esp + 0x220]
push edx
push 1
push 0x568820
push 0x5695ac
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
test eax, eax
je 0x518d66
mov dword [0x590e64], 1
mov eax, dword [esp + 0x10]
cmp eax, esi
je 0x518d75
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call edi
cmp dword [0x590e64], esi
je 0x518dbe
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], esi
lea eax, [esp + 0x18]
lea ecx, [esp + 0x10]
push eax
mov dword [esp + 0xa4c], esi
call fcn.00519aa0
cmp eax, esi
mov dword [0x590e64], eax
jne 0x518dbe
push esi
push esi
push esi
call fcn.00518b20
push eax
mov ecx, 0x590a40
call fcn.00518500
call edi
mov ecx, dword [esp + 0xa40]
mov eax, dword [0x590e64]
pop edi
pop ebp
pop ebx
pop esi
mov dword fs:[0], ecx
add esp, 0xa3c
ret