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

Disassembly:
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov ax, word [esi + 0x4d9c]
cmp ax, 0x400
je 0x409a1b
cmp ax, word [esi + 0x4d98]
je 0x409a1b
cmp ax, 0x400
jae 0x409a1b
mov ecx, eax
mov byte [esi + 0x4d9f], 0
and ecx, 0xffff
mov ecx, dword [esi + ecx*4 + 0x3d98]
lea edx, [ecx + ecx*2]
mov ecx, dword [esi + 0x154]
cmp byte [ecx + edx*2 + 2], 1
jne 0x4099df
mov dl, byte [esi + 0x4d9e]
mov ecx, esi
push edx
push 0x55
push 2
push eax
call fcn.00409ca0
mov cx, word [esi + 0x4d9c]
mov eax, ecx
and eax, 0xffff
mov eax, dword [esi + eax*4 + 0x3d98]
lea edx, [eax + eax*2]
mov eax, dword [esi + 0x154]
cmp byte [eax + edx*2 + 3], 1
jne 0x409a1b
mov al, byte [esi + 0x4d9e]
push 0
test al, al
sete dl
push eax
push edx
push ecx
mov ecx, esi
call fcn.00409e30
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x409ad5
mov byte [esi + 0x4d9f], al
mov ax, word [esi + 0x4d98]
cmp ax, 0x400
jae 0x409aa8
mov ecx, eax
and ecx, 0xffff
mov ecx, dword [esi + ecx*4 + 0x3d98]
lea edx, [ecx + ecx*2]
mov ecx, dword [esi + 0x154]
cmp byte [ecx + edx*2 + 2], 1
jne 0x409a6c
mov dl, byte [esi + 0x4d9a]
mov ecx, esi
push edx
push 0x55
push 2
push eax
call fcn.00409ca0
mov cx, word [esi + 0x4d98]
mov eax, ecx
and eax, 0xffff
mov eax, dword [esi + eax*4 + 0x3d98]
lea edx, [eax + eax*2]
mov eax, dword [esi + 0x154]
cmp byte [eax + edx*2 + 3], 1
jne 0x409aa8
mov al, byte [esi + 0x4d9a]
push 0
test al, al
sete dl
push eax
push edx
push ecx
mov ecx, esi
call fcn.00409e30
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push 0x44bf20
call fcn.004271af
push 8
push 0x44b6b0
mov ecx, esi
call fcn.00405a30
mov byte [esi + 0x4d9b], 0
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
cmp eax, 1
jne 0x409c90
mov eax, dword [esp + 0x14]
xor cx, cx
mov bl, byte [eax + 8]
movzx di, byte [eax + 7]
mov al, bl
and al, 0x7f
shl edi, 4
mov cl, al
add edi, ecx
shr bl, 7
cmp word [esi + 0x4d98], di
mov byte [esp + 0x1c], bl
jne 0x409bb0
cmp byte [esi + 0x4d9a], bl
jne 0x409bb0
mov al, byte [esi + 0x4d9f]
test al, al
je 0x409bb0
cmp di, 0x400
jae 0x409c43
mov eax, edi
and eax, 0xffff
lea edx, [eax + eax*2]
add eax, esi
mov cl, byte [eax + edx*4 + 0x595]
and cl, 0xf
cmp cl, bl
je 0x409c43
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov word [esi + 0x4d98], di
mov byte [esi + 0x4d9a], bl
call ebp
mov edx, dword [esi + 0x4e5c]
mov dword [esi + 0x4e4c], eax
sub eax, edx
cdq
xor eax, edx
sub eax, edx
cmp eax, 0x7530
jle 0x409c43
mov byte [esi + 0x4d9f], 0
call ebp
mov dl, byte [esi + 0x4d9a]
mov dword [esi + 0x4e5c], eax
mov ax, word [esi + 0x4d98]
push edx
push 0x55
push 1
push eax
mov ecx, esi
call fcn.00409ca0
jmp 0x409c43
cmp di, 0x400
jae 0x409c43
mov eax, edi
and eax, 0xffff
lea ecx, [eax + eax*2]
lea edx, [esi + eax]
mov cl, byte [edx + ecx*4 + 0x595]
and cl, 0xf
cmp cl, bl
je 0x409c43
mov byte [esi + 0x4d9f], 0
mov word [esi + 0x4d98], di
mov byte [esi + 0x4d9a], bl
mov eax, dword [esi + eax*4 + 0x3d98]
lea edx, [eax + eax*2]
mov eax, dword [esi + 0x154]
lea ecx, [eax + edx*2]
mov al, byte [eax + edx*2 + 2]
cmp al, 1
jne 0x409c24
mov ecx, dword [esp + 0x1c]
push ecx
push 0x55
push 1
push edi
mov ecx, esi
call fcn.00409ca0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0x4e5c], eax
jmp 0x409c43
test al, al
jne 0x409c43
cmp byte [ecx + 3], 1
jne 0x409c43
mov edx, dword [esp + 0x1c]
push 1
test bl, bl
sete al
push edx
push eax
push edi
mov ecx, esi
call fcn.00409e30
push ecx
mov word [esi + 0x4d98], di
mov ecx, esp
mov dword [esp + 0x20], esp
push 0x44bf00
mov byte [esi + 0x4d9a], bl
call fcn.004271af
push 8
push 0x44b6b0
mov ecx, esi
call fcn.00405a30
mov cx, word [esi + 0x4d98]
mov dl, byte [esi + 0x4d9a]
mov byte [esi + 0x4d9b], 1
mov word [esi + 0x4d9c], cx
mov byte [esi + 0x4d9e], dl
pop edi
pop esi
pop ebp
pop ebx
ret 0xc