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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
mov byte [ebp - 5], cl
mov dword [ebp - 0x24], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov word [eax + 0x514], 0
mov eax, dword [ebp + 0xc]
mov dword [0x569190], eax
mov eax, dword [ebp + 8]
mov dword [0x569194], eax
mov byte [0x5691cd], 0
cmp byte [ebp - 5], 1
sete al
and al, byte [0x569068]
je 0x505192
mov eax, dword [0x52a298]
mov eax, dword [eax]
call fcn.004b8ebc
jmp 0x50588a
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
mov cl, byte [ebp + 0x10]
mov dl, byte [ebp - 5]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3b4]
call fcn.0049d314
test al, al
jne 0x50588a
cmp dword [0x567470], 0
je 0x50588a
mov eax, dword [0x5673f8]
mov eax, dword [eax + 0x28]
cmp eax, dword [0x567408]
jne 0x50588a
xor edx, edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4e4]
call fcn.00436248
mov eax, dword [ebp - 4]
call fcn.0051752c
test byte [ebp + 0x10], 0x10
je 0x50539a
mov al, byte [0x505890]
cmp al, byte [ebp + 0x10]
jne 0x505209
inc dword [0x569218]
mov eax, dword [0x569218]
push eax
lea eax, [ebp - 0x1c]
push eax
push 0
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov eax, dword [0x567408]
call fcn.004ed708
mov dword [ebp - 0x20], eax
mov eax, dword [0x569218]
cmp eax, dword [ebp - 0x1c]
je 0x505239
xor eax, eax
mov dword [0x569218], eax
cmp dword [0x5691b0], 0
je 0x505254
mov eax, dword [0x5691b0]
cmp byte [eax + 0x12], 0
je 0x505254
xor eax, eax
mov dword [0x5691b0], eax
cmp dword [ebp - 0x20], 0
je 0x5052b5
test byte [ebp + 0x10], 4
je 0x5052bc
call sub.kernel32.dll_GetTickCount_1
sub eax, dword [0x569064]
cmp eax, 0x3e8
jbe 0x5052bc
mov eax, dword [ebp - 0x20]
cmp byte [eax + 0x12], 0
jne 0x5052bc
mov eax, dword [ebp - 0x20]
cmp byte [eax + 0x30], 0
jne 0x5052bc
mov byte [0x5692a4], 1
mov eax, dword [ebp - 0x20]
movzx eax, word [eax + 8]
push eax
mov eax, dword [ebp - 0x20]
movzx eax, word [eax + 0xa]
push eax
push 0
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 4]
mov edx, 0x52
mov eax, dword [ebp - 4]
call fcn.00507364
jmp 0x50588a
xor eax, eax
mov dword [0x569218], eax
push 0x569188
push 0x56918c
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov eax, dword [0x567408]
call fcn.004ed4cc
mov eax, dword [0x567470]
movzx eax, word [eax + 8]
sub eax, dword [0x569188]
cdq
xor eax, edx
sub eax, edx
dec eax
jg 0x50537a
mov eax, dword [0x567470]
movzx eax, word [eax + 0xa]
sub eax, dword [0x56918c]
cdq
xor eax, edx
sub eax, edx
dec eax
jg 0x50537a
mov eax, dword [0x56918c]
push eax
mov eax, dword [0x567470]
movzx edx, word [eax + 0xa]
mov eax, dword [0x567470]
movzx eax, word [eax + 8]
mov ecx, dword [0x569188]
call fcn.004f21ec
and eax, 0xff
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
call fcn.00509a44
test al, al
je 0x50539a
mov eax, dword [ebp - 4]
call fcn.005099e8
test al, al
je 0x50539a
mov eax, dword [0x567470]
movzx eax, word [eax + 0xa]
push eax
mov eax, dword [ebp - 0xc]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [0x567470]
movzx ecx, word [eax + 8]
mov dx, 0xbc2
mov eax, dword [0x567470]
call fcn.004f3e30
jmp 0x50539a
mov byte [0x5691e0], 1
mov eax, dword [0x569188]
mov dword [0x569198], eax
mov eax, dword [0x56918c]
mov dword [0x5691a4], eax
jmp 0x50588a
test byte [ebp + 0x10], 8
je 0x50588a
mov eax, dword [0x569218]
push eax
lea eax, [ebp - 0x1c]
push eax
push 1
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov eax, dword [0x567408]
call fcn.004ed708
mov dword [ebp - 0x20], eax
push 0x569188
push 0x56918c
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov eax, dword [0x567408]
call fcn.004ed4cc
xor eax, eax
mov dword [0x5691b0], eax
cmp byte [0x5674b8], 0
je 0x5054cc
cmp dword [ebp - 0x20], 0
jne 0x5054cc
cmp byte [0x5674c8], 0x13
jne 0x5054cc
mov eax, dword [0x56918c]
push eax
mov eax, dword [0x567470]
movzx edx, word [eax + 0xa]
mov eax, dword [0x567470]
movzx eax, word [eax + 8]
mov ecx, dword [0x569188]
call fcn.004f21ec
and eax, 0xff
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [0x567470]
movzx edx, word [eax + 0xa]
mov eax, dword [0x567470]
movzx eax, word [eax + 8]
mov ecx, dword [ebp - 0xc]
call fcn.004f2514
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
mov eax, dword [0x567468]
call fcn.004e8d90
test al, al
je 0x50546f
test byte [ebp + 0x10], 1
je 0x5054cc
mov eax, dword [ebp - 4]
call fcn.00509aa0
test al, al
je 0x5054c0
mov eax, dword [ebp - 4]
call fcn.005099e8
test al, al
je 0x5054c0
mov eax, dword [ebp - 4]
call fcn.00509b10
test al, al
je 0x5054c0
mov eax, dword [0x567470]
movzx eax, word [eax + 0xa]
push eax
mov eax, dword [ebp - 0xc]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [0x567470]
movzx ecx, word [eax + 8]
mov dx, 0xbc7
mov eax, dword [0x567470]
call fcn.004f3e30
mov byte [0x5691cd], 1
jmp 0x50588a
test byte [ebp + 0x10], 2
je 0x5055dc
mov eax, dword [0x56918c]
push eax
mov eax, dword [0x567470]
movzx edx, word [eax + 0xa]
mov eax, dword [0x567470]
movzx eax, word [eax + 8]
mov ecx, dword [0x569188]
call fcn.004f21ec
and eax, 0xff
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
call fcn.00509a44
test al, al
je 0x5055cd
mov eax, dword [ebp - 4]
call fcn.005099e8
test al, al
je 0x5055cd
mov eax, dword [0x567470]
cmp byte [eax + 0x22], 0
jne 0x5055cd
mov ecx, dword [0x56918c]
mov edx, dword [0x569188]
mov eax, dword [0x567408]
call fcn.004ee80c
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x5055a0
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 4]
push eax
mov ecx, dword [0x56918c]
mov edx, dword [0x569188]
mov eax, dword [ebp - 4]
call fcn.005085b8
mov eax, dword [0x567470]
movzx eax, word [eax + 0xa]
push eax
mov eax, dword [ebp - 0xc]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [0x567470]
movzx ecx, word [eax + 8]
mov dx, 0xbc4
mov eax, dword [0x567470]
call fcn.004f3e30
jmp 0x50588a
mov eax, dword [0x567470]
movzx eax, word [eax + 0xa]
push eax
mov eax, dword [ebp - 0xc]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [0x567470]
movzx ecx, word [eax + 8]
mov dx, 0xbc4
mov eax, dword [0x567470]
call fcn.004f3e30
mov dword [0x569198], 0xffffffff
jmp 0x50588a
cmp dword [ebp - 0x20], 0
jne 0x5055ec
test byte [ebp + 0x10], 1
je 0x5057df
mov dword [0x569198], 0xffffffff
cmp dword [ebp - 0x20], 0
je 0x5056bc
call sub.kernel32.dll_GetTickCount_1
sub eax, dword [0x569064]
cmp eax, 0x1f4
jbe 0x505639
mov eax, dword [ebp - 0x20]
cmp byte [eax + 0x12], 0x32
jne 0x505639
push 0
push 0
push 0
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 4]
mov edx, 0x3f2
mov eax, dword [ebp - 4]
call fcn.00507364
jmp 0x50588a
mov eax, dword [ebp - 0x20]
cmp byte [eax + 0x30], 0
jne 0x50588a
mov eax, dword [ebp - 0x20]
mov dword [0x5691b0], eax
mov eax, dword [ebp - 0x20]
cmp byte [eax + 0x12], 0
je 0x50567d
mov eax, dword [ebp - 0x20]
cmp byte [eax + 0x12], 0
je 0x50567d
mov eax, dword [ebp - 0x20]
cmp byte [eax + 0x12], 0x32
je 0x50567d
mov eax, dword [ebp - 0x20]
mov edx, dword [eax + 0x44]
mov eax, 0x50589c
call fcn.0040560c
test eax, eax
je 0x5056a2
test byte [ebp + 0x10], 1
jne 0x5056a2
cmp byte [0x580965], 1
jne 0x505695
cmp byte [0x56d13e], 0
ja 0x5056a2
mov eax, dword [ebp - 0x20]
cmp dword [eax + 0x4c], 0x45
jne 0x50588a
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 4]
call fcn.00504d44
call sub.kernel32.dll_GetTickCount_1
mov dword [0x56915c], eax
jmp 0x50588a
mov eax, dword [0x56918c]
push eax
mov eax, dword [0x567470]
movzx edx, word [eax + 0xa]
mov eax, dword [0x567470]
movzx eax, word [eax + 8]
mov ecx, dword [0x569188]
call fcn.004f21ec
and eax, 0xff
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
call fcn.00509aa0
test al, al
je 0x5057d0
mov eax, dword [ebp - 4]
call fcn.005099e8
test al, al
je 0x5057d0
mov eax, dword [ebp - 4]
call fcn.00509b10
test al, al
je 0x5057d0
mov eax, 3
call fcn.004033b4
add eax, 0xbc6
mov dword [ebp - 0x18], eax
cmp byte [0x5692a1], 0
je 0x505748
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.00504820
test al, al
je 0x505748
mov dword [ebp - 0x18], 0xbcb
cmp byte [0x5692a2], 0
je 0x505773
mov eax, dword [0x567470]
cmp word [eax + 0x68], 3
jb 0x505773
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.005048e8
test al, al
je 0x505773
mov dword [ebp - 0x18], 0xbd0
cmp byte [0x5692a5], 0
je 0x505783
mov dword [ebp - 0x18], 0xbd2
cmp byte [0x5692a6], 0
je 0x505793
mov dword [ebp - 0x18], 0xbd5
cmp byte [0x5692a7], 0
je 0x5057a3
mov dword [ebp - 0x18], 0xbd4
mov eax, dword [0x567470]
movzx eax, word [eax + 0xa]
push eax
mov eax, dword [ebp - 0xc]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [0x567470]
movzx ecx, word [eax + 8]
mov dx, word [ebp - 0x18]
mov eax, dword [0x567470]
call fcn.004f3e30
call sub.kernel32.dll_GetTickCount_1
mov dword [0x569060], eax
jmp 0x50588a
mov eax, dword [0x567470]
movzx eax, word [eax + 8]
cmp eax, dword [0x569188]
jne 0x50584e
mov eax, dword [0x567470]
movzx eax, word [eax + 0xa]
cmp eax, dword [0x56918c]
jne 0x50584e
mov eax, dword [0x56918c]
push eax
mov eax, dword [0x567470]
movzx edx, word [eax + 0xa]
mov eax, dword [0x567470]
movzx eax, word [eax + 8]
mov ecx, dword [0x569188]
call fcn.004f21ec
and eax, 0xff
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
call fcn.00509a44
test al, al
je 0x50588a
mov eax, dword [ebp - 4]
call fcn.005099e8
test al, al
je 0x50588a
mov eax, dword [ebp - 4]
call fcn.00508324
jmp 0x50588a
call sub.kernel32.dll_GetTickCount_1
sub eax, dword [0x569060]
cmp eax, 0x3e8
jbe 0x50588a
test byte [ebp + 0x10], 4
je 0x50586f
mov byte [0x5691e0], 1
jmp 0x505876
mov byte [0x5691e0], 0
mov eax, dword [0x569188]
mov dword [0x569198], eax
mov eax, dword [0x56918c]
mov dword [0x5691a4], eax
mov esp, ebp
pop ebp
ret 0xc