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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x154
mov eax, dword [0x416408]
push ebx
push esi
push edi
push str.XMLdetq2xkn
push 1
xor ebx, ebx
mov dword [ebp - 0x10], eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
push ebx
push 1
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
push str.MTX0x7dz5jx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
mov esi, eax
test esi, esi
je 0x40bd11
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x40bd28
push str.log:_gourxe8z
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push str.u233pa62
push str.lunqlz97
call edi
push ebx
push 0x49
push ebx
push 4
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.qlggjsgb
push str.7hror6jj
call edi
lea eax, [ebp - 0x150]
push eax
push str.s_w0cba1f0
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push str.SMPHR_1wmo6kqf
push 1
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
push ebx
push 1
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
jne 0x40bd8c
push str.0vty6sqc
push str.yfyf5f43
call edi
push 0x385
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push str.WTMR_6tm4hbww
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateWaitableTimerA]
push eax
call dword [sym.imp.KERNEL32.dll_CancelWaitableTimer]
lea eax, [ebp - 4]
mov dword [ebp - 8], ebx
push eax
lea eax, [ebp - 8]
mov dword [ebp - 4], ebx
push eax
call dword [0x41617c]
cmp dword [ebp - 4], ebx
je 0x40bf32
push str.XMLvunmspxj
push 1
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
push ebx
push 1
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
push str.xdxkarjc
push str.81925dwq
call edi
push ebx
push 0xc0f
push ebx
push 4
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
push str.hcfur16l
push str.wj85w79c
mov esi, eax
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push 3
pop edi
call esi
sub edi, 1
jne 0x40be30
push str.WTMR_p73jf7mz
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateWaitableTimerA]
mov dword [ebp - 0xc], eax
call esi
mov eax, dword [ebp - 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
je 0x40be5e
push eax
call dword [sym.imp.KERNEL32.dll_CancelWaitableTimer]
push str.1o7mi9uz
push str.t6x9ih07
call edi
push str.SMPHR_5l9dkbhq
push 1
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
push ebx
push 1
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
jne 0x40bea1
lea eax, [ebp - 0xc]
push eax
push 0x20019
push ebx
push str.reguz70tft1
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push str.ev_fo2uwfml
push ebx
push 1
push ebx
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.MTX4pb9snbo
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
push dword [ebp - 4]
push ebx
call dword [0x41604c]
mov edi, eax
mov dword [ebp - 0xc], edi
test edi, edi
je 0x40bf32
push edi
push dword [ebp - 4]
push dword [ebp - 8]
call dword [0x41616c]
cmp dword [ebp - 8], ebx
jbe 0x40bf0d
lea esi, [edi + 0x30]
push dword [ebp - 0x10]
push dword [esi]
call dword [0x4160a4]
test eax, eax
je 0x40bf19
inc ebx
add esi, 0x4c
cmp ebx, dword [ebp - 8]
jb 0x40bef5
push edi
call dword [0x4160cc]
push 0xfffffffffffffffe
pop eax
jmp 0x40bf35
push dword [ebp - 0xc]
imul esi, ebx, 0x4c
add esi, edi
mov edi, dword [ebp + 0xc]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call dword [0x4160cc]
mov eax, ebx
jmp 0x40bf35
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret 8