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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x477fa1
mov eax, dword fs:[0]
push eax
sub esp, 0x148
push ebx
push esi
push edi
mov eax, dword [0x49e280]
xor eax, esp
push eax
lea eax, [esp + 0x158]
mov dword fs:[0], eax
mov dword [esp + 0x18], ecx
xor ebx, ebx
mov dword [esp + 0x14], ebx
cmp byte [0x4a1fa0], bl
je 0x42d8aa
call fcn.00449ca0
cmp eax, 3
jg 0x42d8aa
mov esi, dword [ebp + 8]
cmp esi, ebx
jne 0x42d8ad
push 3
push 0x27
push 0x4860fc
lea ecx, [esp + 0x48]
call fcn.0044ac20
mov dword [esp + 0x160], ebx
add eax, 4
push str.Check_failed:_detail___NULL.
mov ebx, 1
push eax
mov dword [esp + 0x1c], ebx
call fcn.00409a00
add esp, 8
jmp 0x42d8ad
mov esi, dword [ebp + 8]
mov dword [esp + 0x160], 0xffffffff
test bl, 1
je 0x42d8c9
lea ecx, [esp + 0x3c]
and ebx, 0xfffffffe
call fcn.0044a980
call fcn.00449ca0
test eax, eax
jg 0x42d947
push 0x23
push 0x486120
call fcn.0044adb0
add esp, 8
cmp eax, 1
jl 0x42d947
movzx eax, word [esi + 2]
movzx ecx, byte [esi + 1]
push eax
push ecx
lea edx, [esp + 0x28]
push str.Incoming_event:_key_number__x___device_status__x_
push edx
call fcn.0044fc60
add esp, 0x10
mov edi, eax
push 0
push 0x28
mov dword [esp + 0x168], 1
or ebx, 2
push 0x486178
lea ecx, [esp + 0x48]
mov dword [esp + 0x20], ebx
call fcn.0044ac20
add eax, 4
push edi
mov dword [esp + 0x164], 2
or ebx, 4
push eax
mov dword [esp + 0x1c], ebx
call fcn.00416b70
add esp, 8
mov dword [esp + 0x160], 1
test bl, 4
je 0x42d967
and ebx, 0xfffffffb
lea ecx, [esp + 0x3c]
mov dword [esp + 0x14], ebx
call fcn.0044a980
mov dword [esp + 0x160], 0xffffffff
test bl, 2
je 0x42d98e
and ebx, 0xfffffffd
cmp dword [esp + 0x38], 0x10
jb 0x42d98e
mov eax, dword [esp + 0x24]
push eax
call fcn.00457c05
add esp, 4
call fcn.0042dab0
test al, al
je 0x42da07
push 4
call fcn.00457cb7
add esp, 4
test eax, eax
je 0x42d9af
mov dword [eax], vtable.PowerRequestGhostKey.0
mov edi, eax
jmp 0x42d9b1
xor edi, edi
mov dword [esp + 0x14], edi
mov dword [esp + 0x160], 3
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
sub eax, dword [0x4a4b98]
cmp eax, 0xea60
jbe 0x42d9ee
mov edx, dword [edi]
mov eax, dword [edx + 4]
mov ecx, edi
call eax
mov edx, dword [edi]
mov eax, dword [edx + 8]
mov ecx, edi
call eax
call esi
mov dword [0x4a4b98], eax
mov dword [esp + 0x160], 0xffffffff
test edi, edi
je 0x42da07
mov edx, dword [edi]
mov eax, dword [edx]
push 1
mov ecx, edi
call eax
mov edi, dword [esp + 0x18]
mov eax, dword [ebp + 8]
mov ecx, dword [edi + 8]
movzx eax, byte [eax + 1]
mov edx, dword [ecx]
mov edx, dword [edx + 0x50]
push eax
call edx
mov byte [esp + 0x13], al
lea eax, [esp + 0x13]
push eax
lea ecx, [esp + 0x1c]
add edi, 0xc
push ecx
call fcn.0042ffe0
mov dword [esp + 0x160], 0xffffffff
test bl, 8
je 0x42da4f
lea ecx, [esp + 0xc8]
call fcn.0044a980
mov ebx, dword [esp + 0x18]
mov esi, dword [edi + 0x18]
mov edi, dword [edi]
test ebx, ebx
je 0x42da60
cmp ebx, edi
je 0x42da65
call fcn.0045876b
mov edi, dword [esp + 0x1c]
cmp edi, esi
je 0x42da8e
test ebx, ebx
jne 0x42daa8
call fcn.0045876b
cmp edi, dword [ebx + 0x18]
jne 0x42da80
call fcn.0045876b
mov ecx, dword [edi + 0x10]
mov edx, dword [ecx]
mov eax, dword [ebp + 8]
mov edx, dword [edx + 4]
push eax
call edx
xor eax, eax
mov ecx, dword [esp + 0x158]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ebx, dword [ebx]
jmp 0x42da76