Function at 0x40feff
Capabilities:
Print debug messages
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x294
push ebx
push esi
mov eax, ecx
mov ebx, edx
push edi
push eax
mov dword [ebp - 4], ebx
mov dword [ebp - 8], eax
call dword [0x41719c]
push ebx
mov esi, eax
call dword [0x41719c]
lea edi, [eax + 0x71]
add edi, esi
push edi
push 0x40
call dword [0x41704c]
mov ebx, eax
test edi, edi
je 0x40ff54
cmp edi, 0x7fffffff
jbe 0x40ff46
mov byte [ebx], 0
jmp 0x40ff54
push ecx
push dword [ebp - 8]
mov edx, edi
push ecx
mov ecx, ebx
call fcn.0040e8f5
push str.WTMR_wljugi56
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateWaitableTimerA]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CancelWaitableTimer]
call esi
push str.WTMR_c9wlbmcn
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateWaitableTimerA]
test eax, eax
je 0x40ff8a
push eax
call esi
push str.ev_qwu8h6c1
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetEvent]
push esi
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov esi, dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
push str.XML49w0xtxh
push 1
push 0
push 0
call esi
push 0
push 1
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
lea eax, [ebp - 0x150]
push eax
push str.s_hpiay4yo
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push str.SMPHR_duy5lb45
push 1
push 0
push 0
call esi
xor esi, esi
push esi
push 1
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
jne 0x410005
call dword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
je 0x410040
cmp edi, 0x7fffffff
ja 0x410040
mov eax, edi
mov ecx, ebx
cmp byte [ecx], 0
je 0x410020
inc ecx
sub eax, 1
jne 0x410015
test eax, eax
je 0x41002a
mov ecx, edi
sub ecx, eax
jmp 0x41002c
mov ecx, esi
test eax, eax
je 0x410040
push ecx
push dword [ebp - 4]
sub edi, ecx
push ecx
add ecx, ebx
mov edx, edi
call fcn.0040e8f5
push 0x9e3
push esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push str.WTMR_iqk31n2o
push 1
push esi
call dword [sym.imp.KERNEL32.dll_CreateWaitableTimerA]
push str.g2hqrh3i
push str.8ssz0tky
mov esi, eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push esi
call dword [sym.imp.KERNEL32.dll_CancelWaitableTimer]
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 4
pop esi
push str.log:_i3x50znv
call edi
sub esi, 1
jne 0x410083
lea eax, [ebp - 0x290]
push eax
push str.s_gu5l075y
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push str.ev_swcb0806
push esi
push 1
push esi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetEvent]
push esi
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push str.XML79yyc56r
push 1
xor esi, esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
push esi
push 1
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
lea eax, [ebp - 0xc]
push eax
push 0x20019
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push str.regqv6u56ih
push 0x80000001
call esi
push str.WTMR_2dr4m4sq
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateWaitableTimerA]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x10]
push eax
push 0x20019
push 0
push str.reg19hk9t3b
push 0x80000001
call esi
mov eax, dword [ebp - 4]
test eax, eax
je 0x410137
push eax
call dword [sym.imp.KERNEL32.dll_CancelWaitableTimer]
jmp 0x41013e
push str.log:_o35s0a4a
call edi
push str.MTXehppwibz
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
test esi, esi
je 0x410172
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea eax, [ebp - 4]
push eax
push 0x20019
push 0
push str.reghp6cg27x
jmp 0x410189
push str.log:_ckhvwaxl
call edi
lea eax, [ebp - 4]
push eax
push 0x20019
push 0
push str.reg29osyknc
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push dword [ebp - 8]
call dword [0x4170e0]
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret