Function at 0x4059fc
Capabilities:
Check for time delay via gettickcount

Disassembly:
push 0x74
mov eax, 0x533c95
call fcn.0050a549
mov esi, ecx
mov ebx, edx
mov dword [ebp - 0x7c], esi
mov dword [ebp - 0x70], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esi + 0x7c]
test ecx, ecx
je 0x405cb3
mov edi, dword [ecx + 0x14]
test edi, edi
je 0x405a2e
mov cl, byte [edi]
jmp 0x405a31
mov cl, byte [ecx + 0x18]
test cl, cl
jne 0x405a43
mov ecx, eax
sub ecx, dword [ebx + 0x3c]
cmp ecx, dword [esi + 0x5c]
jbe 0x405cb3
mov dword [ebx + 0x3c], eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
lea eax, [ebp - 0x78]
push eax
push 0x20019
push 0
mov edi, str.SoftwareHPNGLogging
push edi
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x405caa
and dword [ebp - 0x6c], eax
mov eax, dword [esi + 0x5c]
xor edx, edx
mov ecx, 0x3e8
div ecx
lea ecx, [ebp - 0x64]
mov dword [ebp - 0x68], eax
mov eax, edi
call fcn.00403140
and dword [ebp - 4], 0
and dword [ebp - 0x38], 0
xor eax, eax
mov dword [ebp - 0x34], 7
mov word [ebp - 0x48], ax
mov byte [ebp - 4], 1
push str.LogParmsPollTime
push dword [ebp - 0x78]
lea edi, [ebp - 0x68]
call fcn.00408cad
mov eax, dword [ebp - 0x68]
pop ecx
pop ecx
test eax, eax
jne 0x405ac2
push 0x1e
pop eax
mov ecx, dword [esi + 0x7c]
imul eax, eax, 0x3e8
push 0
push ebx
mov ebx, dword [ebp - 0x78]
mov dword [esi + 0x5c], eax
call fcn.00404d23
push 0x563b24
lea eax, [ebp - 0x64]
push eax
call fcn.00403d3a
lea edi, [esi + 0x24]
xor ebx, ebx
push ebx
push edi
or eax, 0xffffffff
lea esi, [ebp - 0x64]
mov dword [ebp - 0x80], edi
call fcn.00403ec8
push ebx
mov eax, esi
push eax
or eax, 0xffffffff
lea ecx, [ebp - 0x48]
call fcn.00402c50
push edi
lea esi, [ebp - 0x2c]
call fcn.0040748b
mov byte [ebp - 4], 2
cmp dword [ebp - 0x18], 8
mov eax, dword [ebp - 0x2c]
jae 0x405b23
mov eax, esi
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
cmp eax, ebx
je 0x405b46
cmp dword [ebp - 0x18], 8
mov ecx, dword [ebp - 0x2c]
jae 0x405b3a
lea ecx, [ebp - 0x2c]
sub eax, ecx
sar eax, 1
lea ecx, [ebp - 0x2c]
call fcn.00407503
mov esi, dword [ebp - 0x7c]
mov eax, dword [ebp - 0x2c]
add esi, 8
cmp dword [ebp - 0x18], 8
jae 0x405b58
lea eax, [ebp - 0x2c]
mov edi, dword [ebp - 0x1c]
push eax
mov eax, dword [esi + 0x10]
mov ecx, esi
call fcn.0040891c
test eax, eax
je 0x405b85
push 0x563b24
lea eax, [ebp - 0x48]
push eax
call fcn.00403d3a
push ebx
push esi
or eax, 0xffffffff
lea esi, [ebp - 0x48]
call fcn.00403ec8
mov esi, dword [ebp - 0x7c]
mov eax, dword [esi + 0x7c]
test dword [eax + 0xc], 0x1000000
mov eax, dword [ebp - 0x48]
je 0x405bbc
cmp dword [ebp - 0x34], 8
jae 0x405ba0
lea eax, [ebp - 0x48]
push ebx
lea ecx, [ebp - 0x6c]
push ecx
push ebx
push 0x20019
push ebx
push ebx
push ebx
push eax
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
jmp 0x405bdb
cmp dword [ebp - 0x34], 8
jae 0x405bc5
lea eax, [ebp - 0x48]
lea ecx, [ebp - 0x6c]
push ecx
push 0x20019
push ebx
push eax
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp dword [ebp - 0x50], 8
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x64]
jae 0x405bea
lea eax, [ebp - 0x64]
lea ecx, [ebp - 0x74]
push ecx
push 0x20019
push ebx
push eax
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x405c70
mov ecx, dword [esi + 0x7c]
push ebx
push dword [ebp - 0x70]
mov ebx, dword [ebp - 0x74]
call fcn.00404d23
mov eax, dword [ebp - 0x80]
cmp dword [eax + 0x14], 8
jb 0x405c24
mov eax, dword [eax]
push dword [ebp - 0x74]
mov edx, dword [esi + 0x2e8]
mov ecx, eax
call fcn.004051c1
cmp dword [ebp - 0x68], 0
jne 0x405c69
mov ebx, dword [ebp - 0x6c]
test ebx, ebx
je 0x405c69
mov ecx, dword [esi + 0x7c]
push 0
push dword [ebp - 0x70]
call fcn.00404d23
cmp dword [ebp - 0x50], 8
mov eax, dword [ebp - 0x64]
jae 0x405c5a
lea eax, [ebp - 0x64]
push dword [esi + 0x7c]
push dword [ebp - 0x6c]
push eax
push dword [ebp - 0x70]
call fcn.00404ddc
push dword [ebp - 0x74]
call edi
xor ebx, ebx
cmp dword [ebp - 0x68], ebx
jne 0x405c7f
cmp dword [ebp - 0x6c], ebx
je 0x405c7f
push dword [ebp - 0x6c]
call edi
push dword [ebp - 0x78]
call edi
mov byte [ebp - 4], 1
lea esi, [ebp - 0x2c]
call fcn.00402b60
mov byte [ebp - 4], bl
lea esi, [ebp - 0x48]
call fcn.00402b60
or dword [ebp - 4], 0xffffffff
lea esi, [ebp - 0x64]
call fcn.00402b60
mov ebx, dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebx + 0x3c], eax
call fcn.0050a5cc
ret