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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14c
mov eax, dword [0x409100]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor ebx, ebx
mov edi, ecx
and dword [ebp - 0x134], ebx
push 0x4095b0
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_AcquireSRWLockExclusive]
mov esi, dword [0x4095b4]
test esi, esi
je 0x406cfb
cmp dword [esi], edi
jne 0x406cf0
cmp dword [esi + 4], ebx
je 0x406cf7
mov esi, dword [esi + 0x14]
test esi, esi
jne 0x406ce7
test esi, esi
jne 0x406d36
push 0x18
push 0x40
call dword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x406ff9
and dword [esi + 4], ebx
mov dword [esi], edi
call dword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetTickCount]
and dword [esi + 0xc], ebx
sub eax, 0xea61
and dword [esi + 0x10], ebx
mov dword [esi + 8], eax
mov eax, dword [0x4095b4]
mov dword [esi + 0x14], eax
mov dword [0x4095b4], esi
inc dword [esi + 0xc]
inc dword [esi + 0x10]
call dword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetTickCount]
sub eax, dword [esi + 8]
cmp eax, 0xea60
jbe 0x406ff9
call dword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetTickCount]
mov dword [esi + 8], eax
lea edx, [ebp - 0x110]
lea eax, [ebp - 0x130]
push eax
lea eax, [ebp - 0x138]
push eax
push ecx
call fcn.00406c1d
mov dword [ebp - 0x12c], eax
test eax, eax
je 0x406d9e
mov edx, 0x400000
cmp edi, edx
jb 0x406d9e
mov eax, dword [ebp - 0x130]
lea ecx, [eax + 0x400000]
cmp ecx, edx
jbe 0x406d9e
cmp edi, ecx
ja 0x406d9e
sub edi, edx
jmp 0x406da0
xor edi, edi
cmp dword [esi + 0x10], 1
mov dword [ebp - 0x124], edi
jne 0x406ec3
mov ecx, 0x409008
call fcn.00413c8d
test eax, eax
jne 0x406ec3
cmp dword [0x409008], ebx
jbe 0x406e9c
mov dl, byte [ebp - 0x110]
inc eax
xor ebx, ebx
mov dword [ebp - 0x134], eax
mov dword [ebp - 0x128], eax
mov dword [ebp - 0x120], 0x1d1727a6
mov dword [ebp - 0x11c], 0x4e2792c8
mov dword [ebp - 0x118], 0x8b0f69bc
mov dword [ebp - 0x114], 0x9d548c45
test dl, dl
je 0x406e40
lea edi, [ebp - 0x110]
movsx eax, dl
push eax
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_toupper]
add byte [ebp + ebx - 0x120], al
inc edi
lea eax, [ebx + 1]
cmp eax, 0x10
pop ecx
mov cl, byte [edi]
sbb ebx, ebx
and ebx, eax
mov dl, cl
test cl, cl
jne 0x406e15
mov edi, dword [ebp - 0x124]
lea eax, [ebp - 0x140]
xor ebx, ebx
push eax
push ebx
push ebx
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.api_ms_win_eventing_provider_l1_1_0.dll_EventRegister]
test eax, eax
jne 0x406e96
push ebx
push ebx
push ebx
push dword [ebp - 0x13c]
push dword [ebp - 0x140]
call dword [sym.imp.api_ms_win_eventing_provider_l1_1_0.dll_EventProviderEnabled]
push dword [ebp - 0x13c]
movzx eax, al
push dword [ebp - 0x140]
neg eax
sbb eax, eax
not eax
and eax, dword [ebp - 0x128]
mov ebx, eax
call dword [sym.imp.api_ms_win_eventing_provider_l1_1_0.dll_EventUnregister]
jmp 0x406e9c
mov ebx, dword [ebp - 0x128]
mov eax, dword [0x409024]
xor edx, edx
mov ecx, dword [0x409020]
push eax
push ecx
mov dword [0x409008], edx
mov dword [0x409020], edx
mov dword [0x409024], edx
call dword [sym.imp.api_ms_win_eventing_provider_l1_1_0.dll_EventUnregister]
mov ecx, 0x409030
call fcn.00401ceb
test eax, eax
jne 0x406fdd
cmp dword [0x409030], 5
jbe 0x406fb5
push 0x4000
push eax
mov ecx, 0x409030
call fcn.00401df0
test al, al
je 0x406fb5
cmp dword [ebp - 0x12c], 0
lea eax, [ebp - 0x110]
mov edx, dword [esi + 0x10]
jne 0x406f11
mov eax, 0x4016f0
mov ecx, dword [ebp - 0x134]
mov dword [ebp - 0x14c], eax
mov dword [ebp - 0x128], ecx
mov ecx, dword [ebp - 0x12c]
mov eax, ecx
neg eax
mov dword [ebp - 0x144], edx
mov edx, dword [esi + 0xc]
sbb eax, eax
mov dword [ebp - 0x148], edx
and dword [ebp - 0x130], eax
mov edx, 0x4017a9
lea eax, [ebp - 0x128]
mov dword [ebp - 0x124], ebx
push eax
lea eax, [ebp - 0x124]
mov dword [ebp - 0x12c], edi
push eax
lea eax, [ebp - 0x144]
mov dword [ebp - 0x13c], 0xa
push eax
lea eax, [ebp - 0x148]
neg ecx
push eax
lea eax, [ebp - 0x14c]
sbb ecx, ecx
and ecx, dword [ebp - 0x138]
push eax
lea eax, [ebp - 0x130]
mov dword [ebp - 0x138], ecx
push eax
lea eax, [ebp - 0x138]
push eax
lea eax, [ebp - 0x12c]
push eax
lea eax, [ebp - 0x13c]
push eax
push ecx
push ecx
call fcn.00413c8d
mov eax, dword [0x40904c]
mov ecx, dword [0x409048]
and dword [0x409030], 0
and dword [0x409048], 0
and dword [0x40904c], 0
push eax
push ecx
call dword [sym.imp.api_ms_win_eventing_provider_l1_1_0.dll_EventUnregister]
cmp dword [ebp - 0x134], 0
je 0x406ff5
test ebx, ebx
je 0x406ff5
push 0x3e8
call dword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_Sleep]
and dword [esi + 0xc], 0
push 0x4095b0
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockExclusive]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407300
leave
ret 0x10