Function at 0x404fdf
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
push esi
push edi
mov dword [ebp - 0x24], ecx
lea eax, [ebp - 0x20]
xor ecx, ecx
mov dword [ebp - 0x34], 0x42b2c0
push str.D:_A__GA___SY__A__GA___BA_
push eax
mov edi, edx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], ecx
mov ebx, ecx
mov byte [ebp - 8], cl
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x30], 0x42bd40
mov byte [ebp - 1], cl
call fcn.0040e180
mov esi, eax
pop ecx
pop ecx
test esi, esi
js 0x405331
lea eax, [ebp - 0x1c]
push str.D:_A__GA___SY__A__GA___BA__A__0x80100000___BU_
push eax
call fcn.0040e180
mov esi, eax
pop ecx
pop ecx
test esi, esi
js 0x405331
mov eax, dword [ebp - 0x20]
and dword [ebp - 0x38], ebx
push 0x42a624
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x40]
push ebx
push eax
mov dword [ebp - 0x40], 0xc
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x405097
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x405331
mov eax, dword [ebp - 0x18]
mov ecx, eax
call fcn.00410558
mov esi, eax
cmp esi, 0x80070102
je 0x405331
test esi, esi
js 0x405331
mov ecx, dword [ebp - 0x1c]
xor eax, eax
push str.GlobalOfficeSourceEngineRunning
inc eax
mov dword [ebp - 0x40], 0xc
xor esi, esi
mov dword [ebp - 8], eax
push esi
push eax
lea eax, [ebp - 0x40]
mov dword [ebp - 0x3c], ecx
push eax
mov dword [ebp - 0x38], esi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x405102
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x405331
xor esi, esi
push esi
push esi
push dword [ebp - 8]
push esi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x405134
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x405331
mov eax, dword [ebp - 0x10]
mov ecx, eax
call fcn.004021b8
mov esi, eax
test esi, esi
js 0x405331
push ecx
push ecx
lea edx, [ebp - 0x34]
call fcn.0041117d
mov esi, eax
test esi, esi
js 0x405331
mov eax, dword [ebp - 0x24]
xor esi, esi
test eax, eax
je 0x40519a
test edi, edi
je 0x40519a
push edi
push eax
mov dword [edi + 0xc], esi
mov dword [edi + 4], 4
call dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
test eax, eax
jne 0x40519a
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x4052fe
xor esi, esi
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
cmp dword [0x42f2b0], ebx
je 0x4051c1
mov esi, 0x8000ffff
jmp 0x4052fe
mov al, byte [ebp - 8]
or dword [0x42f2b4], 0xf0000040
push esi
push esi
push esi
push esi
mov byte [ebp - 1], al
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov ebx, eax
test ebx, ebx
jne 0x4051ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
js 0x4052fe
xor esi, esi
mov ecx, dword [ebp - 0xc]
test ecx, ecx
jne 0x40522b
push esi
lea eax, [ebp - 0xc]
push eax
push esi
push 0x20019
push esi
push esi
push esi
push str.SOFTWAREMicrosoftOfficeDeliverySourceEngineSettings
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov ecx, dword [ebp - 0xc]
test ecx, ecx
je 0x405240
call fcn.004053de
push dword [ebp - 8]
push ebx
push 4
push esi
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegNotifyChangeKeyValue]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x42f21c], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 8]
mov edi, eax
test ebx, ebx
je 0x405260
push 2
mov dword [ebp - 0x28], ebx
pop edi
push eax
push 0xea60
push esi
lea eax, [ebp - 0x2c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjectsEx]
mov ecx, eax
mov eax, dword [ebp - 8]
cmp ecx, 0xc0
je 0x405260
cmp ecx, 0x102
jne 0x4052ac
call dword [sym.imp.KERNEL32.dll_GetTickCount]
imul ecx, dword [0x42f228], 0xea60
mov edx, eax
mov esi, dword [0x42f21c]
sub edx, esi
cmp edx, ecx
jae 0x4052e9
mov eax, dword [ebp - 8]
xor esi, esi
jmp 0x405260
test ecx, ecx
je 0x4052fe
cmp ecx, 0x80
je 0x4052fe
mov eax, dword [ebp - 8]
test ebx, ebx
je 0x405260
lea eax, [edi - 1]
cmp eax, ecx
mov eax, dword [ebp - 8]
jne 0x405260
mov ecx, dword [ebp - 0xc]
call fcn.004053de
push dword [ebp - 8]
push ebx
push 4
push esi
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegNotifyChangeKeyValue]
mov eax, dword [ebp - 8]
jmp 0x405260
sub eax, esi
push eax
push str.Shutting_down__timed_out_after__d_ticks
push dword [ebp - 8]
call fcn.00410b87
add esp, 0xc
xor esi, esi
xor edi, edi
push 0
push 0
push dword [ebp + edi*4 - 0x34]
call dword [sym.imp.RPCRT4.dll_RpcServerUnregisterIf]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
test ecx, ecx
js 0x405326
inc edi
cmp edi, 2
jl 0x405300
cmp byte [ebp - 1], 0
je 0x405331
call fcn.0040e889
mov ecx, dword [0x42f218]
test ecx, ecx
je 0x40535f
mov eax, dword [ecx]
push ecx
call dword [eax + 0x28]
mov ecx, dword [0x42f218]
mov eax, dword [ecx + 4]
add ecx, 4
mov eax, dword [eax + 4]
add eax, ecx
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
and dword [0x42f218], 0
cmp dword [ebp - 0xc], 0
je 0x40536e
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x40537b
push ebx
call edi
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x405385
push eax
call edi
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x405396
push ebx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push ebx
call edi
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x4053ad
cmp byte [ebp - 8], 0
je 0x4053aa
push ebx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push ebx
call edi
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4053bb
mov ecx, eax
call fcn.00411336
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4053c9
mov ecx, eax
call fcn.00411336
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret