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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x294
push ebx
push esi
push edi
mov edi, dword [0x41519c]
mov eax, edx
mov ebx, ecx
mov dword [ebp - 8], eax
push eax
mov dword [ebp - 4], ebx
call edi
push ebx
mov esi, eax
call edi
lea edi, [eax + 0x71]
mov eax, dword [0x41504c]
add edi, esi
push edi
push 0x40
call eax
mov ebx, eax
test edi, edi
je 0x40f28e
cmp edi, 0x7fffffff
jbe 0x40f280
mov byte [ebx], 0
jmp 0x40f28e
push ecx
push dword [ebp - 4]
mov edx, edi
push ecx
mov ecx, ebx
call fcn.0040dc05
push str.ev_m3dn2s7y
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]
xor eax, eax
push eax
push 0x1073
push eax
push 4
push eax
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.tfr31hduf
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov esi, dword [sym.imp.KERNEL32.dll_CreateWaitableTimerA]
push str.WTMR_01xouty6
push 1
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_CancelWaitableTimer]
push str.WTMR_omszadh6
push 1
push 0
call esi
mov esi, eax
lea eax, [ebp - 0xc]
push eax
push 0x20019
push 0
push str.regmklpuiuh
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test esi, esi
je 0x40f32a
push esi
call dword [sym.imp.KERNEL32.dll_CancelWaitableTimer]
jmp 0x40f345
lea eax, [ebp - 0x10]
push eax
push 0x20019
push 0
push str.regd30csegr
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [ebp - 0x150]
push eax
push str.s_ybyfhnc7
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
push str.XMLjf3atpf3
push 1
push 0
push 0
call esi
push 0
push 1
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x6a
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push str.MTX2vorh5pk
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
test eax, eax
je 0x40f3ba
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push str.thiv6nw54
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x40f3ca
push str.upz187bz
push str.nn30atpg
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test edi, edi
je 0x40f405
cmp edi, 0x7fffffff
ja 0x40f405
mov eax, edi
mov ecx, ebx
cmp byte [ecx], 0
je 0x40f3e5
inc ecx
sub eax, 1
jne 0x40f3da
test eax, eax
je 0x40f3ef
mov ecx, edi
sub ecx, eax
jmp 0x40f3f1
xor ecx, ecx
test eax, eax
je 0x40f405
push ecx
push dword [ebp - 8]
sub edi, ecx
push ecx
add ecx, ebx
mov edx, edi
call fcn.0040dc05
push str.XMLn4nxhm09
push 1
xor edi, edi
push edi
push edi
call esi
push edi
push 1
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
push str.ev_kvicewx4
push edi
push 1
push edi
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 edi
push 0x7d8
push edi
push 4
push edi
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
push str.MTXmqv692pu
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
test esi, esi
je 0x40f47a
call edi
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea eax, [ebp - 0x290]
push eax
push str.s_wfr1hzvf
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push str.WTMR_ny9sufs2
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateWaitableTimerA]
mov esi, eax
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CancelWaitableTimer]
push str.SMPHR_blz1tv5v
push 1
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov esi, eax
call edi
push 0
push 1
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
je 0x40f4e1
push str.2c6c0jaa
push str.sfvxofx6
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push dword [ebp - 4]
call dword [0x4150e0]
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret