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

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff0
mov ebx, eax
mov esi, dword [0x68eab8]
cmp dword [esi], 0
je 0x503ca9
mov eax, dword [0x68f140]
cmp byte [eax], 0
je 0x503639
mov eax, ebx
call fcn.0050e0a0
test al, al
je 0x503639
mov eax, ebx
call fcn.0050e03c
test al, al
je 0x503639
mov eax, dword [0x68e288]
cmp byte [eax], 0
jne 0x503639
mov eax, ebx
call fcn.00502a3c
mov eax, dword [0x68eba4]
cmp dword [eax], 0
jl 0x503b40
mov eax, ebx
call fcn.0050e0a0
test al, al
je 0x503b40
mov eax, ebx
call fcn.0050e03c
test al, al
je 0x503b40
mov eax, dword [esi]
mov eax, dword [eax + 0xc]
mov edx, dword [0x68eba4]
cmp eax, dword [edx]
jne 0x503687
mov edx, dword [0x68ea94]
mov edx, dword [edx]
mov ecx, dword [esi]
cmp edx, dword [ecx + 0x10]
je 0x503b40
mov dword [esp], eax
mov eax, dword [esi]
mov eax, dword [eax + 0x10]
mov dword [esp + 4], eax
mov edi, dword [0x68eba4]
mov edi, dword [edi]
mov ebp, dword [0x68ea94]
mov ebp, dword [ebp]
push ebp
mov ecx, edi
mov edx, dword [esp + 8]
mov eax, dword [esp + 4]
call fcn.005b7fb8
mov byte [esp + 0xc], al
mov eax, dword [0x68f1ac]
movzx eax, byte [eax]
sub al, 1
jb 0x5036d7
je 0x503910
sub al, 5
je 0x503a8b
jmp 0x503b40
mov eax, dword [esi]
call fcn.005a4908
mov dword [esp + 8], eax
mov eax, dword [esi]
mov eax, dword [eax + 0xc]
mov dword [esp], eax
mov eax, dword [esi]
mov eax, dword [eax + 0x10]
mov dword [esp + 4], eax
movzx ecx, byte [esp + 0xc]
mov edx, 2
mov eax, ebx
call fcn.0050e1ac
test al, al
je 0x503900
cmp dword [esp + 8], 0
jle 0x503900
lea ecx, [esp + 4]
mov edx, esp
movzx eax, byte [esp + 0xc]
call fcn.005b7e80
mov byte [esp + 0xf], 0
mov ecx, dword [esp + 4]
mov edx, dword [esp]
mov eax, dword [0x69a598]
call fcn.0052cd20
test al, al
jne 0x5038cc
mov byte [esp + 0xe], 0
mov byte [esp + 0xd], 0
cmp byte [esp + 0xe], 0
jne 0x50378e
mov eax, dword [esi]
mov eax, dword [eax + 0xc]
mov dword [esp], eax
mov eax, dword [esi]
mov eax, dword [eax + 0x10]
mov dword [esp + 4], eax
lea ecx, [esp + 4]
mov edx, esp
movzx eax, byte [esp + 0xc]
call fcn.005b7e80
mov ecx, dword [esp + 4]
mov edx, dword [esp]
mov eax, ebx
call fcn.00507ab4
test al, al
je 0x50378e
mov byte [esp + 0xf], 1
cmp byte [esp + 0xf], 0
jne 0x503846
mov ecx, dword [esp + 4]
mov edx, dword [esp]
mov eax, dword [0x69a598]
call fcn.0052cd68
test al, al
jne 0x503846
mov eax, dword [esi]
mov eax, dword [eax + 0xc]
mov dword [esp], eax
mov eax, dword [esi]
mov eax, dword [eax + 0x10]
mov dword [esp + 4], eax
movzx eax, byte [esp + 0xc]
call fcn.005b86dc
mov byte [esp + 0xd], al
lea ecx, [esp + 4]
mov edx, esp
movzx eax, byte [esp + 0xd]
call fcn.005b7e80
mov ecx, dword [esp + 4]
mov edx, dword [esp]
mov eax, dword [0x69a5ac]
call fcn.00523aa0
test al, al
jne 0x503841
mov eax, dword [esi]
mov eax, dword [eax + 0xc]
mov dword [esp], eax
mov eax, dword [esi]
mov eax, dword [eax + 0x10]
mov dword [esp + 4], eax
movzx eax, byte [esp + 0xc]
call fcn.005b86ec
mov byte [esp + 0xd], al
lea ecx, [esp + 4]
mov edx, esp
movzx eax, byte [esp + 0xd]
call fcn.005b7e80
mov ecx, dword [esp + 4]
mov edx, dword [esp]
mov eax, dword [0x69a5ac]
call fcn.00523aa0
test al, al
je 0x503846
mov byte [esp + 0xe], 1
jmp 0x503846
mov byte [esp + 0xe], 1
cmp byte [esp + 0xe], 0
je 0x503881
mov eax, dword [esp + 4]
push eax
movzx eax, byte [esp + 0x11]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [esi]
mov ecx, dword [esp + 0x18]
mov dx, 2
call fcn.005a34b4
call sub.kernel32.dll_GetTickCount
mov edx, dword [0x68e774]
mov dword [edx], eax
jmp 0x503b40
push ebp
mov eax, dword [esi]
mov edx, dword [eax + 0x10]
mov eax, dword [esi]
mov eax, dword [eax + 0xc]
mov ecx, edi
call fcn.005b7fb8
mov edx, dword [esi]
cmp al, byte [edx + 0x14]
je 0x5038bc
mov edx, dword [esi]
mov edx, dword [edx + 0x10]
push edx
movzx eax, al
push eax
push 0
push 0
push 0
push 0
mov eax, dword [esi]
mov ecx, dword [eax + 0xc]
mov eax, dword [esi]
mov dx, 1
call fcn.005a33d8
mov eax, dword [0x68eba4]
mov dword [eax], 0xffffffff
jmp 0x503b40
mov eax, dword [esp + 4]
push eax
movzx eax, byte [esp + 0x10]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [esi]
mov ecx, dword [esp + 0x18]
mov dx, 2
call fcn.005a34b4
call sub.kernel32.dll_GetTickCount
mov edx, dword [0x68e774]
mov dword [edx], eax
jmp 0x503b40
mov eax, dword [0x68eba4]
mov dword [eax], 0xffffffff
jmp 0x503b40
mov eax, dword [esi]
call fcn.005a492c
mov dword [esp + 8], eax
mov eax, dword [esi]
cmp byte [eax + 0x1c], 0
je 0x5039d9
push ebp
mov ecx, edi
mov edx, dword [esp + 8]
mov eax, dword [esp + 4]
call fcn.005b7e0c
cmp eax, 3
jl 0x5036d7
cmp dword [esp + 8], 0
jle 0x5036d7
movzx ecx, byte [esp + 0xc]
mov edx, 5
mov eax, ebx
call fcn.0050e1ac
test al, al
je 0x5039c9
lea ecx, [esp + 4]
mov edx, esp
movzx eax, byte [esp + 0xc]
call fcn.005b7f4c
mov eax, dword [esp]
push eax
mov eax, dword [esp + 8]
push eax
mov eax, dword [esi]
mov ecx, dword [eax + 0x10]
mov eax, dword [esi]
mov edx, dword [eax + 0xc]
mov eax, dword [0x69a598]
call fcn.0052c8d0
test al, al
je 0x5036d7
mov eax, dword [esp + 4]
push eax
movzx eax, byte [esp + 0x10]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [esi]
mov ecx, dword [esp + 0x18]
mov dx, 5
call fcn.005a34b4
call sub.kernel32.dll_GetTickCount
mov edx, dword [0x68e774]
mov dword [edx], eax
jmp 0x503b40
mov eax, dword [0x68eba4]
mov dword [eax], 0xffffffff
jmp 0x503b40
push ebp
mov ecx, edi
mov edx, dword [esp + 8]
mov eax, dword [esp + 4]
call fcn.005b7e0c
cmp eax, 2
jl 0x5036d7
cmp dword [esp + 8], 0
jle 0x5036d7
movzx ecx, byte [esp + 0xc]
mov edx, 4
mov eax, ebx
call fcn.0050e1ac
test al, al
je 0x503a7b
lea ecx, [esp + 4]
mov edx, esp
movzx eax, byte [esp + 0xc]
call fcn.005b7ee0
mov eax, dword [esp]
push eax
mov eax, dword [esp + 8]
push eax
mov eax, dword [esi]
mov ecx, dword [eax + 0x10]
mov eax, dword [esi]
mov edx, dword [eax + 0xc]
mov eax, dword [0x69a598]
call fcn.0052ca38
test al, al
je 0x5036d7
mov eax, dword [esp + 4]
push eax
movzx eax, byte [esp + 0x10]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [esi]
mov ecx, dword [esp + 0x18]
mov dx, 4
call fcn.005a34b4
call sub.kernel32.dll_GetTickCount
mov edx, dword [0x68e774]
mov dword [edx], eax
jmp 0x503b40
mov eax, dword [0x68eba4]
mov dword [eax], 0xffffffff
jmp 0x503b40
mov eax, dword [esi]
call fcn.005a492c
mov dword [esp + 8], eax
push ebp
mov ecx, edi
mov edx, dword [esp + 8]
mov eax, dword [esp + 4]
call fcn.005b7e0c
cmp eax, 2
jl 0x5036d7
cmp dword [esp + 8], 0
jle 0x5036d7
movzx ecx, byte [esp + 0xc]
mov edx, 6
mov eax, ebx
call fcn.0050e1ac
test al, al
je 0x503b35
lea ecx, [esp + 4]
mov edx, esp
movzx eax, byte [esp + 0xc]
call fcn.005b7ee0
mov eax, dword [esp]
push eax
mov eax, dword [esp + 8]
push eax
mov eax, dword [esi]
mov ecx, dword [eax + 0x10]
mov eax, dword [esi]
mov edx, dword [eax + 0xc]
mov eax, dword [0x69a598]
call fcn.0052ca08
test al, al
je 0x5036d7
mov eax, dword [esp + 4]
push eax
movzx eax, byte [esp + 0x10]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [esi]
mov ecx, dword [esp + 0x18]
mov dx, 6
call fcn.005a34b4
call sub.kernel32.dll_GetTickCount
mov edx, dword [0x68e774]
mov dword [edx], eax
jmp 0x503b40
mov eax, dword [0x68eba4]
mov dword [eax], 0xffffffff
mov eax, dword [0x68eba4]
mov dword [eax], 0xffffffff
mov eax, dword [esi]
mov eax, dword [eax + 0x3c8]
test eax, eax
jle 0x503ca9
mov dword [ebx + 0x3b4], eax
mov eax, dword [esi]
mov eax, dword [eax + 0x3d4]
mov dword [ebx + 0x3b8], eax
mov eax, dword [esi]
mov eax, dword [eax + 0x3c8]
cmp eax, 0x18
jne 0x503baa
mov edx, dword [esi]
mov edx, dword [edx + 0x3d0]
push edx
mov edx, dword [esi]
mov edx, dword [edx + 0x3d4]
push edx
mov edx, dword [esi]
mov edx, dword [edx + 0x3d8]
push edx
mov edx, dword [esi]
mov ecx, dword [edx + 0x3cc]
mov edx, eax
mov eax, ebx
call fcn.0050c640
jmp 0x503bfd
cmp eax, 3
jne 0x503bda
mov eax, dword [esi]
mov eax, dword [eax + 0x3d0]
push eax
mov eax, dword [esi]
mov eax, dword [eax + 0x3d4]
push eax
mov eax, dword [esi]
mov ecx, dword [eax + 0x3cc]
mov eax, dword [esi]
mov edx, dword [eax + 0x3dc]
mov eax, ebx
call fcn.0050c518
jmp 0x503bfd
mov edx, dword [esi]
mov edx, dword [edx + 0x3d0]
push edx
mov edx, dword [esi]
mov edx, dword [edx + 0x3d4]
push edx
mov edx, dword [esi]
mov ecx, dword [edx + 0x3cc]
mov edx, eax
mov eax, ebx
call fcn.0050c5a8
mov eax, dword [esi]
xor edx, edx
mov dword [eax + 0x3c8], edx
mov eax, dword [0x68f0dc]
cmp dword [eax], 0xffffffff
je 0x503c54
mov eax, dword [0x68f0dc]
mov eax, dword [eax]
mov edx, dword [esi]
sub eax, dword [edx + 0xc]
cdq
xor eax, edx
sub eax, edx
cmp eax, 8
jge 0x503c3d
mov eax, dword [0x68ef54]
mov eax, dword [eax]
mov edx, dword [esi]
sub eax, dword [edx + 0x10]
cdq
xor eax, edx
sub eax, edx
cmp eax, 8
jl 0x503c54
mov eax, dword [0x68f170]
mov eax, dword [eax]
call fcn.0057301c
mov eax, dword [0x68f0dc]
mov dword [eax], 0xffffffff
mov eax, dword [0x68f110]
cmp dword [eax], 0xffffffff
je 0x503ca9
mov eax, dword [0x68f110]
mov eax, dword [eax]
mov edx, dword [esi]
sub eax, dword [edx + 0xc]
cdq
xor eax, edx
sub eax, edx
cmp eax, 8
jge 0x503c8a
mov eax, dword [0x68ef94]
mov eax, dword [eax]
mov edx, dword [esi]
sub eax, dword [edx + 0x10]
cdq
xor eax, edx
sub eax, edx
cmp eax, 8
jl 0x503ca9
mov eax, dword [0x68ee04]
mov eax, dword [eax]
mov eax, dword [eax + 0x4c0]
xor edx, edx
call fcn.00493c78
mov eax, dword [0x68f110]
mov dword [eax], 0xffffffff
add esp, 0x10
pop ebp
pop edi
pop esi
pop ebx
ret