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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x16
push 0
push 0
dec ecx
jne 0x505719
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov byte [ebp - 5], cl
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
call fcn.00405bbc
xor eax, eax
push ebp
push 0x505db9
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 0x5dc
push 1
mov cl, 1
mov dl, 1
mov eax, dword [0x54a740]
call fcn.0054a7a4
mov ebx, eax
cmp byte [ebp - 5], 0
je 0x5057a7
lea ecx, [ebp - 0x10]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
mov edx, 0x505dd0
call fcn.00486174
mov edx, dword [ebp - 0x10]
mov eax, ebx
call fcn.0054aa00
lea ecx, [ebp - 0x14]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
mov edx, 0x505df4
call fcn.00486174
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.0054aa60
jmp 0x5057eb
lea ecx, [ebp - 0x18]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
mov edx, 0x505e38
call fcn.00486174
mov edx, dword [ebp - 0x18]
mov eax, ebx
call fcn.0054aa00
lea ecx, [ebp - 0x1c]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
mov edx, 0x505e5c
call fcn.00486174
mov edx, dword [ebp - 0x1c]
mov eax, ebx
call fcn.0054aa60
lea ecx, [ebp - 0x20]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
mov edx, 0x505ea0
call fcn.00486174
mov edx, dword [ebp - 0x20]
mov eax, ebx
call fcn.0054a9a8
lea ecx, [ebp - 0x24]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
mov edx, 0x505eb0
call fcn.00486174
mov edx, dword [ebp - 0x24]
mov eax, ebx
call fcn.0054aae8
xor edx, edx
mov eax, ebx
call fcn.0054ac2c
lea ecx, [ebp - 0x28]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
mov edx, 0x505edc
call fcn.00486174
mov edx, dword [ebp - 0x28]
mov eax, ebx
call fcn.0054ae10
mov eax, ebx
call fcn.0054a880
mov eax, dword [0x55ab88]
mov eax, dword [eax]
call fcn.0047bd68
mov eax, ebx
call fcn.004268a8
call sub.kernel32.dll_GetTickCount_1
mov esi, eax
xor ecx, ecx
mov dl, 1
mov eax, dword [0x52c44c]
call fcn.0052c4c4
mov edi, eax
movzx ecx, byte [ebp - 5]
mov edx, dword [ebp - 4]
mov eax, edi
call fcn.0052c554
call sub.kernel32.dll_GetTickCount_1
sub eax, esi
cmp eax, 0xea60
jae 0x505d60
call sub.kernel32.dll_GetTickCount_1
sub eax, esi
cmp eax, 0x7d0
jb 0x505927
cmp byte [ebp - 5], 0
je 0x5058e3
lea ecx, [ebp - 0x2c]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
mov edx, 0x505f14
call fcn.00486174
mov edx, dword [ebp - 0x2c]
mov eax, ebx
call fcn.0054aae8
jmp 0x505905
lea ecx, [ebp - 0x30]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
mov edx, 0x505f48
call fcn.00486174
mov edx, dword [ebp - 0x30]
mov eax, ebx
call fcn.0054aae8
lea ecx, [ebp - 0x34]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
mov edx, 0x505f78
call fcn.00486174
mov edx, dword [ebp - 0x34]
mov eax, ebx
call fcn.0054ac2c
cmp byte [edi + 0x48], 0
je 0x505d51
mov eax, dword [0x55a544]
mov eax, dword [eax]
cmp eax, 0x20000002
jg 0x505965
je 0x505a26
sub eax, 1
jb 0x505983
sub eax, 0xb6
je 0x5059dd
sub eax, 0x1fffff4a
je 0x505a8c
jmp 0x505c3f
sub eax, 0x20000003
je 0x505af2
dec eax
je 0x505b58
dec eax
je 0x505bbe
jmp 0x505c3f
cmp byte [ebp - 5], 0
je 0x5059ad
lea ecx, [ebp - 0x38]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
mov edx, 0x505fb0
call fcn.00486174
mov edx, dword [ebp - 0x38]
mov eax, ebx
call fcn.0054aae8
jmp 0x5059cf
lea ecx, [ebp - 0x3c]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
mov edx, 0x505fe8
call fcn.00486174
mov edx, dword [ebp - 0x3c]
mov eax, ebx
call fcn.0054aae8
xor edx, edx
mov eax, ebx
call fcn.0054ac2c
jmp 0x505d60
lea ecx, [ebp - 0x40]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
mov edx, 0x50601c
call fcn.00486174
mov edx, dword [ebp - 0x40]
mov eax, ebx
call fcn.0054aae8
lea ecx, [ebp - 0x44]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
mov edx, 0x506044
call fcn.00486174
mov edx, dword [ebp - 0x44]
mov eax, ebx
call fcn.0054ac2c
jmp 0x505d60
lea ecx, [ebp - 0x48]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
mov edx, 0x506074
call fcn.00486174
mov edx, dword [ebp - 0x48]
mov eax, ebx
call fcn.0054aae8
lea eax, [ebp - 0x50]
push eax
mov eax, 0x506098
mov dword [ebp - 0x58], eax
mov byte [ebp - 0x54], 0xb
lea edx, [ebp - 0x58]
xor ecx, ecx
mov eax, 0x5060ac
call fcn.0040c558
mov edx, dword [ebp - 0x50]
lea ecx, [ebp - 0x4c]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
call fcn.00486174
mov edx, dword [ebp - 0x4c]
mov eax, ebx
call fcn.0054ac2c
jmp 0x505d60
mov edx, 0x506074
lea ecx, [ebp - 0x5c]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
call fcn.00486174
mov edx, dword [ebp - 0x5c]
mov eax, ebx
call fcn.0054aae8
lea eax, [ebp - 0x64]
push eax
mov eax, 0x506098
mov dword [ebp - 0x58], eax
mov byte [ebp - 0x54], 0xb
lea edx, [ebp - 0x58]
xor ecx, ecx
mov eax, 0x5060dc
call fcn.0040c558
mov edx, dword [ebp - 0x64]
lea ecx, [ebp - 0x60]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
call fcn.00486174
mov edx, dword [ebp - 0x60]
mov eax, ebx
call fcn.0054ac2c
jmp 0x505d60
mov edx, 0x506074
lea ecx, [ebp - 0x68]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
call fcn.00486174
mov edx, dword [ebp - 0x68]
mov eax, ebx
call fcn.0054aae8
lea eax, [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x70]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
mov edx, 0x50610c
call fcn.00486174
mov eax, dword [ebp - 0x70]
push eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0x58], eax
mov byte [ebp - 0x54], 0xb
lea edx, [ebp - 0x58]
xor ecx, ecx
pop eax
call fcn.0040c558
mov edx, dword [ebp - 0x6c]
mov eax, ebx
call fcn.0054ac2c
jmp 0x505d60
mov edx, 0x506074
lea ecx, [ebp - 0x74]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
call fcn.00486174
mov edx, dword [ebp - 0x74]
mov eax, ebx
call fcn.0054aae8
lea eax, [ebp - 0x7c]
push eax
mov eax, 0x50613c
mov dword [ebp - 0x58], eax
mov byte [ebp - 0x54], 0xb
lea edx, [ebp - 0x58]
mov eax, 0x5060dc
xor ecx, ecx
call fcn.0040c558
mov edx, dword [ebp - 0x7c]
lea ecx, [ebp - 0x78]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
call fcn.00486174
mov edx, dword [ebp - 0x78]
mov eax, ebx
call fcn.0054ac2c
jmp 0x505d60
mov edx, 0x506074
lea ecx, [ebp - 0x80]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
call fcn.00486174
mov edx, dword [ebp - 0x80]
mov eax, ebx
call fcn.0054aae8
lea eax, [ebp - 0x88]
push eax
lea edx, [ebp - 0x8c]
mov eax, dword [ebp - 4]
call fcn.00501c70
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0x58], eax
mov byte [ebp - 0x54], 0xb
lea edx, [ebp - 0x58]
xor ecx, ecx
mov eax, 0x506150
call fcn.0040c558
mov edx, dword [ebp - 0x88]
lea ecx, [ebp - 0x84]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
call fcn.00486174
mov edx, dword [ebp - 0x84]
mov eax, ebx
call fcn.0054ac2c
jmp 0x505d60
mov dword [ebp - 0xc], 0xbb8
cmp byte [ebp - 5], 0
je 0x505c76
lea ecx, [ebp - 0x90]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
mov edx, 0x506178
call fcn.00486174
mov edx, dword [ebp - 0x90]
mov eax, ebx
call fcn.0054aae8
jmp 0x505c9e
mov edx, 0x506074
lea ecx, [ebp - 0x94]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
call fcn.00486174
mov edx, dword [ebp - 0x94]
mov eax, ebx
call fcn.0054aae8
mov eax, dword [0x55a544]
cmp dword [eax], 0xffff
jae 0x505d46
lea eax, [ebp - 0x98]
push eax
lea ecx, [ebp - 0x9c]
mov eax, dword [0x560848]
mov eax, dword [eax + 0x360]
mov edx, 0x5061a0
call fcn.00486174
mov eax, dword [ebp - 0x9c]
push eax
mov eax, dword [0x55a544]
mov eax, dword [eax]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0xb0]
call fcn.0040b0b0
mov eax, dword [ebp - 0xb0]
mov dword [ebp - 0xac], eax
mov byte [ebp - 0xa8], 0xb
lea edx, [ebp - 0xb4]
mov eax, dword [0x55a544]
mov eax, dword [eax]
call fcn.0040f110
mov eax, dword [ebp - 0xb4]
mov dword [ebp - 0xa4], eax
mov byte [ebp - 0xa0], 0xb
lea edx, [ebp - 0xac]
mov ecx, 1
pop eax
call fcn.0040c558
mov edx, dword [ebp - 0x98]
mov eax, ebx
call fcn.0054ac2c
jmp 0x505d60
xor edx, edx
mov eax, ebx
call fcn.0054ac2c
jmp 0x505d60
mov eax, 5
call fcn.00505098
jmp 0x505899
mov eax, dword [ebp - 0xc]
call fcn.00505098
mov eax, ebx
call fcn.0054a8c0
mov eax, ebx
call fcn.004047e0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x505dc0
lea eax, [ebp - 0xb4]
mov edx, 2
call fcn.00405760
lea eax, [ebp - 0x9c]
mov edx, 0x11
call fcn.00405760
lea eax, [ebp - 0x50]
mov edx, 0x11
call fcn.00405760
lea eax, [ebp - 4]
call fcn.0040573c
ret