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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
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 - 0xc], 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 dword [ebp - 4], eax
test edi, edi
je 0x40f574
cmp edi, 0x7fffffff
jbe 0x40f568
mov byte [eax], 0
jmp 0x40f574
push ecx
push ebx
push ecx
mov edx, edi
mov ecx, eax
call fcn.0040e1c4
mov ebx, dword [sym.imp.kernel32.dll_GetLastError]
call ebx
push 0x4142ec
xor esi, esi
push esi
push esi
call dword [sym.imp.kernel32.dll_CreateMutexA]
test eax, eax
je 0x40f59a
push eax
call dword [0x411020]
call ebx
jmp 0x40f5ac
call ebx
push 0x4142f8
push 0x414304
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableA]
push 0xca4
push esi
call dword [sym.imp.kernel32.dll_LocalAlloc]
mov esi, eax
call ebx
push esi
call dword [sym.imp.kernel32.dll_LocalFree]
xor eax, eax
push eax
push 0x318
push eax
push 4
push eax
push 0xffffffffffffffff
call dword [sym.imp.kernel32.dll_CreateFileMappingW]
push eax
call dword [sym.imp.kernel32.dll_]
push 0x414310
push 0
push 1
push 0
call dword [sym.imp.kernel32.dll____TEg_Td:kJ__FfFpIDL_]
mov esi, eax
push esi
call dword [sym.imp.kernel32.dll_SetEvent]
push esi
call dword [sym.imp.kernel32.dll_ResetEvent]
push 0x41431c
push 1
push 0
call dword [sym.imp.kernel32.dll_CreateWaitableTimerA]
test eax, eax
je 0x40f61b
push eax
call dword [sym.imp.kernel32.dll_CancelWaitableTimer]
jmp 0x40f61d
call ebx
mov ebx, dword [ebp - 4]
test edi, edi
je 0x40f65b
cmp edi, 0x7fffffff
ja 0x40f65b
mov eax, edi
mov ecx, ebx
cmp byte [ecx], 0
je 0x40f63b
inc ecx
sub eax, 1
jne 0x40f630
test eax, eax
je 0x40f645
mov ecx, edi
sub ecx, eax
jmp 0x40f647
xor ecx, ecx
test eax, eax
je 0x40f65b
push ecx
push dword [ebp - 8]
sub edi, ecx
push ecx
add ecx, ebx
mov edx, edi
call fcn.0040e1c4
push 0x940
xor edi, edi
push edi
call dword [sym.imp.kernel32.dll_LocalAlloc]
push 0x41432c
mov esi, eax
call dword [sym.imp.kernel32.dll_OutputDebugStringA]
push esi
call dword [sym.imp.kernel32.dll_LocalFree]
push 0x414338
push 0x414344
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableA]
push 0x414350
push edi
push 1
push edi
call dword [sym.imp.kernel32.dll____TEg_Td:kJ__FfFpIDL_]
mov esi, eax
push esi
call dword [sym.imp.kernel32.dll_SetEvent]
push esi
call dword [sym.imp.kernel32.dll_ResetEvent]
push 0x41435c
push 1
push edi
push edi
call dword [sym.imp.kernel32.dll_CreateSemaphoreA]
push edi
push 1
push eax
call dword [sym.imp.kernel32.dll_ReleaseSemaphore]
mov esi, dword [sym.imp.kernel32.dll_SetEnvironmentVariableA]
push 0x414368
push 0x414374
call esi
push 0x414380
push 1
push edi
call dword [sym.imp.kernel32.dll_CreateWaitableTimerA]
mov edi, dword [sym.imp.advapi32.dll_RegOpenKeyExA]
test eax, eax
je 0x40f70f
push eax
call dword [sym.imp.kernel32.dll_CancelWaitableTimer]
lea eax, [ebp - 8]
push eax
push 0x20019
push 0
push 0x414390
push 0x80000001
call edi
jmp 0x40f71b
push 0x41439c
push 0x4143a8
call esi
push 0xa
pop esi
lea eax, [ebp - 8]
push eax
push 0x20019
push 0
push 0x4143b4
push 0x80000001
call edi
sub esi, 1
jne 0x40f71e
xor eax, eax
push eax
push 0xee9
push eax
push 4
push eax
push 0xffffffffffffffff
call dword [sym.imp.kernel32.dll_CreateFileMappingW]
push eax
call dword [sym.imp.kernel32.dll_]
push 0x4143c0
push 1
push esi
call dword [sym.imp.kernel32.dll_CreateWaitableTimerA]
lea eax, [ebp - 0x10]
push eax
push 0x20019
push esi
push 0x4143d0
push 0x80000001
call edi
push dword [ebp - 0xc]
call dword [0x4150e0]
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret