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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x15c
push ebx
push esi
push edi
push 0x6cd
xor ebx, ebx
mov dword [ebp - 8], ecx
push ebx
call dword [sym.imp.kernel32.dll_LocalAlloc]
push eax
call dword [sym.imp.kernel32.dll_LocalFree]
mov edi, dword [sym.imp.kernel32.dll_CreateSemaphoreA]
push 0x413eac
push 1
push ebx
push ebx
call edi
mov ebx, dword [sym.imp.kernel32.dll_SetEnvironmentVariableA]
mov esi, eax
push 0x413ebc
push 0x413ec8
call ebx
push 0
push 1
push esi
mov esi, dword [sym.imp.kernel32.dll_ReleaseSemaphore]
call esi
push 0x413ed4
push 1
push 0
push 0
call edi
push 0
push 1
push eax
call esi
push 0x413ee0
push 0x413eec
call ebx
lea eax, [ebp - 0x158]
push eax
push 0x413ef8
call dword [sym.imp.kernel32.dll_FindFirstFileA]
push eax
call dword [sym.imp.kernel32.dll_pd_3JD9_w_8]
push 0x413f04
push 1
push 0
call dword [sym.imp.kernel32.dll_CreateWaitableTimerA]
push 0x413f14
push 0x413f20
mov esi, eax
call ebx
mov edi, dword [sym.imp.kernel32.dll_GetLastError]
test esi, esi
je 0x40ea32
push esi
call dword [sym.imp.kernel32.dll_CancelWaitableTimer]
call edi
xor esi, esi
push esi
push 0x323
push esi
push 4
push esi
push 0xffffffffffffffff
call dword [sym.imp.kernel32.dll_CreateFileMappingW]
lea eax, [ebp - 0xc]
push eax
push 0x20019
push esi
push 0x413f2c
push 0x80000001
call dword [sym.imp.advapi32.dll_RegOpenKeyExA]
mov eax, dword [0x41504c]
push 0x20a
push 0x40
call eax
push 0x413f38
push 1
push esi
push esi
mov ebx, eax
call dword [sym.imp.kernel32.dll_CreateSemaphoreA]
push esi
push 1
push eax
call dword [sym.imp.kernel32.dll_ReleaseSemaphore]
test eax, eax
jne 0x40ea8f
call edi
push 0x355
push esi
call dword [sym.imp.kernel32.dll_LocalAlloc]
push eax
call dword [sym.imp.kernel32.dll_LocalFree]
push 0x413f48
push esi
push 1
push esi
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]
xor eax, eax
push eax
push 0x100f
push eax
push 4
push eax
push 0xffffffffffffffff
call dword [sym.imp.kernel32.dll_CreateFileMappingW]
mov esi, eax
lea eax, [ebp - 0x10]
push eax
push 0x20019
push 0
push 0x413f54
push 0x80000001
call dword [sym.imp.advapi32.dll_RegOpenKeyExA]
push esi
call dword [sym.imp.kernel32.dll_]
push 0x413f60
call dword [sym.imp.kernel32.dll_OutputDebugStringA]
push 0x413f6c
push 1
xor esi, esi
push esi
call dword [sym.imp.kernel32.dll_CreateWaitableTimerA]
test eax, eax
je 0x40eb21
push eax
call dword [sym.imp.kernel32.dll_CancelWaitableTimer]
call edi
push 0x413f7c
push esi
push esi
call dword [sym.imp.kernel32.dll_CreateMutexA]
mov dword [ebp - 4], eax
test eax, eax
je 0x40eb75
lea eax, [ebp - 0x14]
push eax
push 0x20019
push esi
mov esi, dword [sym.imp.advapi32.dll_RegOpenKeyExA]
push 0x413f88
push 0x80000001
call esi
push dword [ebp - 4]
call dword [0x411020]
lea eax, [ebp - 0x18]
push eax
push 0x20019
push 0
push 0x413f94
push 0x80000001
call esi
xor esi, esi
jmp 0x40eb77
call edi
mov eax, dword [0x415198]
push ebx
push esi
push esi
push 0x1c
push esi
call eax
test eax, eax
js 0x40ec35
push 0xa
pop esi
push 0x413fa0
push 0x413fac
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableA]
sub esi, 1
jne 0x40eb8f
push 0x413fb8
push esi
push 1
push esi
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]
call edi
push 0x413fc4
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]
call edi
push 0x413fd0
push esi
push esi
call dword [sym.imp.kernel32.dll_CreateMutexA]
test eax, eax
je 0x40ec0a
push eax
call dword [0x411020]
push 0x413fdc
push 0x413fe8
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableA]
mov edx, dword [0x4154b4]
mov ecx, ebx
call fcn.0040f343
mov edi, dword [ebp - 8]
mov esi, eax
mov ecx, dword [0x415144]
push esi
push dword [edi]
call ecx
push esi
mov dword [edi], eax
call dword [0x4150cc]
xor eax, eax
inc eax
jmp 0x40ec42
test ebx, ebx
je 0x40ec40
push ebx
call dword [0x4150cc]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret