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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x15c
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 8], edx
push edi
push 0x116d
push edi
push 4
push edi
push 0xffffffffffffffff
call dword [sym.imp.kernel32.dll_CreateFileMappingW]
mov ebx, dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
call ebx
push esi
call dword [sym.imp.kernel32.dll_]
call ebx
push 0x414498
push edi
push edi
call dword [sym.imp.kernel32.dll_CreateMutexA]
mov ebx, dword [sym.imp.kernel32.dll_OutputDebugStringA]
mov esi, eax
test esi, esi
je 0x40f9e7
push 0x4144a4
call ebx
push esi
call dword [0x411020]
push 0x4144b0
push 0x4144bc
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableA]
push 0x4144c8
push 1
push edi
call dword [sym.imp.kernel32.dll_CreateWaitableTimerA]
push eax
call dword [sym.imp.kernel32.dll_CancelWaitableTimer]
push 0x4144d8
call ebx
lea eax, [ebp - 0x158]
push eax
push 0x4144e4
call dword [sym.imp.kernel32.dll_FindFirstFileA]
push eax
call dword [sym.imp.kernel32.dll_pd_3JD9_w_8]
push 0xf93
push edi
mov edi, dword [sym.imp.kernel32.dll_LocalAlloc]
call edi
mov ebx, dword [sym.imp.kernel32.dll_LocalFree]
push eax
call ebx
push 0x4144f0
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]
mov eax, dword [0x41504c]
push 0x208
push 0x40
call eax
push 0x5e3
push 0
mov dword [ebp - 4], eax
call edi
mov edi, dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
call edi
push esi
call ebx
push 0x4144fc
xor ebx, ebx
push ebx
push ebx
call dword [sym.imp.kernel32.dll_CreateMutexA]
test eax, eax
je 0x40fa99
push eax
call dword [0x411020]
call edi
jmp 0x40fab4
push 0x414508
push 0x414514
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableA]
push 0x414520
call dword [sym.imp.kernel32.dll_OutputDebugStringA]
push 0x41452c
push ebx
push 1
push ebx
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 0x414538
push 1
push ebx
push ebx
mov ebx, dword [sym.imp.kernel32.dll_CreateSemaphoreA]
call ebx
mov edi, dword [sym.imp.kernel32.dll_ReleaseSemaphore]
push 0
push 1
push eax
call edi
lea ecx, [ebp - 4]
call fcn.0040e973
mov ecx, dword [0x41504c]
push 0x208
push 0x40
mov dword [ebp - 0xc], eax
call ecx
push 0xc
pop edx
mov ecx, eax
call fcn.0040e3e7
mov edx, dword [0x4152a8]
mov esi, eax
mov ecx, dword [ebp - 4]
call fcn.0040f343
mov edx, esi
mov ecx, eax
call fcn.0040f343
push 0x414548
push 1
xor esi, esi
mov dword [ebp - 4], eax
push esi
call dword [sym.imp.kernel32.dll_CreateWaitableTimerA]
push eax
call dword [sym.imp.kernel32.dll_CancelWaitableTimer]
push 0x414558
push 0x414564
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableA]
lea eax, [ebp - 0x10]
push eax
push 0x20019
push esi
push 0x414570
push 0x80000001
call dword [sym.imp.advapi32.dll_RegOpenKeyExA]
push 0x41457c
push 1
push esi
push esi
call ebx
xor ebx, ebx
push ebx
push 1
push eax
call edi
test eax, eax
je 0x40fb96
push 0x41458c
call dword [sym.imp.kernel32.dll_OutputDebugStringA]
jmp 0x40fb9c
call dword [sym.imp.kernel32.dll_GetLastError]
push 7
pop esi
call dword [sym.imp.kernel32.dll_GetLastError]
sub esi, 1
jne 0x40fb9f
push 0x414598
push ebx
push 1
push ebx
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 ebx
push 0x9f1
push ebx
push 4
push ebx
push 0xffffffffffffffff
call dword [sym.imp.kernel32.dll_CreateFileMappingW]
push eax
call dword [sym.imp.kernel32.dll_]
push 0x4145a4
push ebx
push ebx
call dword [sym.imp.kernel32.dll_CreateMutexA]
test eax, eax
je 0x40fc0a
push eax
call dword [0x411020]
push 0x4145b0
push 0x4145bc
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableA]
push 0x4145c8
push 1
push ebx
call dword [sym.imp.kernel32.dll_CreateWaitableTimerA]
mov edi, dword [sym.imp.advapi32.dll_RegOpenKeyExA]
mov esi, eax
lea eax, [ebp - 0x14]
push eax
push 0x20019
push ebx
push 0x4145d8
push 0x80000001
call edi
test esi, esi
je 0x40fc57
push esi
call dword [sym.imp.kernel32.dll_CancelWaitableTimer]
lea eax, [ebp - 0x10]
push eax
push 0x20019
push ebx
push 0x4145e4
push 0x80000001
call edi
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov eax, dword [0x415144]
push edi
push dword [esi]
call eax
push edi
mov dword [esi], eax
call dword [0x4150cc]
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret