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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov esi, eax
mov ebx, dword [ebp + 8]
xor eax, eax
push ebp
push 0x505516
push dword fs:[eax]
mov dword fs:[eax], esp
test ebx, ebx
je 0x5054fb
mov eax, dword [0x68eab8]
cmp dword [eax], 0
je 0x5054fb
mov eax, dword [0x68eab8]
mov eax, dword [eax]
cmp byte [eax + 0x134], 0
jne 0x5054fb
mov eax, dword [0x68eab8]
mov eax, dword [eax]
cmp byte [eax + 0x1c], 0
jne 0x5054fb
call sub.kernel32.dll_GetTickCount
mov edx, dword [0x68e8e4]
sub eax, dword [edx]
mov edx, dword [0x68e77c]
cmp eax, dword [edx]
jb 0x5054fb
call sub.kernel32.dll_GetTickCount
cmp eax, dword [ebx + 7]
jb 0x5054fb
mov eax, ebx
call fcn.00595424
mov edx, dword [0x68eab8]
mov edx, dword [edx]
cmp eax, dword [edx + 0x97]
jle 0x504bcd
cmp byte [ebx + 0x23], 0
jne 0x5054e3
cmp byte [ebx + 0x23], 0
jne 0x504d08
call sub.kernel32.dll_GetTickCount
mov edx, dword [0x68e8e4]
mov dword [edx], eax
mov eax, dword [0x68f1d8]
mov byte [eax], 0
mov eax, dword [0x68e77c]
mov dword [eax], 0x1f4
movzx eax, word [ebx + 0x12]
cmp ax, 0x64
jne 0x504cd9
mov edx, dword [0x68eab8]
mov edx, dword [edx]
cmp byte [edx + 0x1e], 0
je 0x504cd9
mov eax, dword [0x68ebac]
cmp dword [eax], 0
jne 0x504c32
mov eax, dword [0x68ecd4]
mov eax, dword [eax]
mov edx, dword [0x68f1f0]
mov dword [edx], eax
jmp 0x504c41
mov eax, dword [0x68ebac]
mov eax, dword [eax]
mov edx, dword [0x68f1f0]
mov dword [edx], eax
mov eax, dword [0x68f1f0]
mov eax, dword [eax]
mov edx, dword [0x68ecd4]
mov dword [edx], eax
mov edx, dword [0x68f1f0]
mov edx, dword [edx]
mov eax, dword [0x69a598]
call fcn.0052cf88
test al, al
jne 0x504c8c
mov eax, dword [0x68f1f0]
xor edx, edx
mov dword [eax], edx
push 1
push 0
mov ecx, 0xff00
mov edx, 0x505530
mov eax, dword [0x69a58c]
call fcn.0053d6d4
jmp 0x5054fb
mov eax, dword [0x68f1f0]
cmp dword [eax], 0
je 0x5054fb
mov eax, dword [0x68f1f0]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [0x68f1f0]
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x14], eax
mov eax, dword [0x68f1f0]
mov eax, dword [eax]
mov edi, dword [eax + 4]
mov eax, dword [ebp - 0x14]
push eax
movzx eax, word [ebx + 0x12]
push eax
push edi
mov ecx, dword [ebp - 0x10]
mov edx, 0x18
mov eax, esi
call fcn.0050c640
jmp 0x504cf8
push 0
movzx eax, ax
push eax
push 0
mov eax, dword [0x68eab8]
mov eax, dword [eax]
movzx ecx, byte [eax + 0x14]
mov edx, 0x18
mov eax, esi
call fcn.0050c640
mov eax, dword [0x68e740]
mov dword [eax], 0xffffffff
jmp 0x5054fb
mov eax, dword [ebp - 8]
push eax
mov edx, dword [0x68e9b0]
mov edx, dword [edx]
sub edx, 0x258
sar edx, 1
jns 0x504d21
adc edx, 0
add edx, 0xc
add edx, 0x120
mov eax, dword [0x68e9d8]
mov eax, dword [eax]
sub eax, 0x320
sar eax, 1
jns 0x504d3d
adc eax, 0
add eax, 0x16c
mov ecx, dword [ebp - 4]
call fcn.005b81f8
mov dword [ebp - 0xc], eax
mov eax, dword [0x68ecd4]
cmp dword [eax], 0
je 0x504d6d
mov eax, dword [0x68ecd4]
mov eax, dword [eax]
cmp byte [eax + 0x31], 0
je 0x504d6d
mov eax, dword [0x68ecd4]
xor edx, edx
mov dword [eax], edx
test byte [ebx + 0x7c], 8
jne 0x504dbc
mov eax, dword [0x68e600]
cmp byte [eax + 0x2b], 0
je 0x504d85
cmp word [ebx + 0x12], 2
je 0x504dbc
mov eax, dword [0x68e600]
cmp byte [eax + 0x2c], 0
jne 0x504d97
cmp word [ebx + 0x12], 0x21
je 0x504dbc
mov eax, dword [0x68e600]
cmp byte [eax + 0x2c], 0
jne 0x504daa
cmp word [ebx + 0x12], 0xd3
je 0x504dbc
mov eax, dword [0x68e600]
cmp byte [eax + 0x2d], 0
jne 0x504e04
cmp word [ebx + 0x12], 0x2f
jne 0x504e04
mov eax, dword [0x68ebac]
cmp dword [eax], 0
je 0x504dd3
mov eax, dword [0x68ebac]
mov eax, dword [eax]
cmp byte [eax + 0x31], 0
je 0x504de4
mov eax, dword [0x68ecd4]
mov eax, dword [eax]
mov edx, dword [0x68f1f0]
mov dword [edx], eax
jmp 0x504df3
mov eax, dword [0x68ebac]
mov eax, dword [eax]
mov edx, dword [0x68f1f0]
mov dword [edx], eax
mov eax, dword [0x68f1f0]
mov eax, dword [eax]
mov edx, dword [0x68ecd4]
mov dword [edx], eax
jmp 0x504e2c
mov eax, dword [0x68ebac]
mov eax, dword [eax]
mov edx, dword [0x68f1f0]
mov dword [edx], eax
mov eax, dword [0x68ecd4]
cmp dword [eax], 0
jne 0x504e2c
mov eax, dword [0x68ebac]
mov eax, dword [eax]
mov edx, dword [0x68ecd4]
mov dword [edx], eax
mov edx, dword [0x68f1f0]
mov edx, dword [edx]
mov eax, dword [0x69a598]
call fcn.0052cf88
test al, al
jne 0x504e4b
mov eax, dword [0x68f1f0]
xor edx, edx
mov dword [eax], edx
movzx eax, word [ebx + 0x12]
mov edx, eax
add edx, 0xfffffff8
cmp dx, 0xd7
ja 0x504e65
movzx edx, dx
bt dword [0x50554c], edx
jae 0x504f3c
movzx eax, word [ebx + 0x12]
cmp ax, 0x1e
je 0x504e7b
cmp ax, 0xdb
jne 0x504e84
mov dword [ebp - 0x18], 5
jmp 0x504e8b
mov dword [ebp - 0x18], 1
mov edx, 1
mov eax, dword [ebp - 0x18]
call fcn.00504948
test al, al
jne 0x50534e
lea ecx, [ebp - 0x1c]
mov edx, 1
mov eax, dword [ebp - 0x18]
call fcn.00504a28
mov edi, eax
test edi, edi
je 0x504f1f
mov eax, dword [0x68e3a0]
cmp byte [eax + 8], 0
jne 0x5054fb
mov eax, dword [0x68e3a0]
push esi
push edi
mov esi, edi
lea edi, [eax + 6]
mov ecx, 0x43
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
mov eax, dword [0x68e3a0]
mov byte [eax + 0x112], 0
mov eax, dword [0x68e3a0]
mov dword [eax], 9
lea eax, [ebp - 0x20]
lea edx, [edi + 2]
call fcn.004053cc
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [edi + 0x97]
mov dl, 9
mov eax, dword [0x69a588]
call fcn.0050c840
mov eax, dword [ebp - 0x1c]
call fcn.005b76b4
jmp 0x50534e
push 1
push 0
mov ecx, 0xff00
mov edx, 0x505570
mov eax, dword [0x69a58c]
call fcn.0053d6d4
jmp 0x5054fb
cmp ax, 6
jne 0x5050b2
mov dword [ebp - 0x18], 2
mov eax, dword [0x68f1f0]
cmp dword [eax], 0
je 0x504f83
mov eax, dword [0x68f1f0]
mov eax, dword [eax]
mov eax, dword [eax + 0x2c]
test eax, 0x40000000
jne 0x504f6f
mov dword [ebp - 0x18], 4
mov edx, dword [0x68f1f0]
test eax, 0x80000000
jne 0x504f83
mov dword [ebp - 0x18], 3
mov edx, dword [ebp - 0x18]
mov eax, 1
call fcn.00504948
test al, al
jne 0x50508e
lea ecx, [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
mov eax, 1
call fcn.00504a28
mov edi, eax
test edi, edi
jne 0x504fe9
mov eax, dword [0x68e7a8]
cmp byte [eax + 0x96e], 0
je 0x504fe9
mov eax, dword [0x68e7a8]
cmp byte [eax + 0x97e], 0xe
jne 0x504fe9
mov eax, dword [0x68e7a8]
cmp byte [eax + 0x980], 2
ja 0x504fe9
mov edi, dword [0x68e7a8]
add edi, 0x96c
jmp 0x50509a
test edi, edi
jne 0x505007
cmp dword [ebp - 0x18], 2
je 0x505007
lea ecx, [ebp - 0x1c]
mov edx, 2
mov eax, 1
call fcn.00504a28
mov edi, eax
test edi, edi
je 0x505071
mov eax, dword [0x68e3a0]
cmp byte [eax + 8], 0
jne 0x5054fb
mov eax, dword [0x68e3a0]
push esi
push edi
mov esi, edi
lea edi, [eax + 6]
mov ecx, 0x43
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
mov eax, dword [0x68e3a0]
mov byte [eax + 0x112], 0
mov eax, dword [0x68e3a0]
mov dword [eax], 9
lea eax, [ebp - 0x24]
lea edx, [edi + 2]
call fcn.004053cc
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [edi + 0x97]
mov dl, 9
mov eax, dword [0x69a588]
call fcn.0050c840
mov eax, dword [ebp - 0x1c]
call fcn.005b76b4
jmp 0x50509a
push 1
push 0
mov ecx, 0xff00
mov edx, 0x50558c
mov eax, dword [0x69a58c]
call fcn.0053d6d4
jmp 0x5054fb
mov edi, dword [0x68e7a8]
add edi, 0x96c
cmp byte [edi + 0x14], 1
jne 0x5050a9
mov byte [ebx + 0x24], 4
jmp 0x50534e
mov byte [ebx + 0x24], 0x65
jmp 0x50534e
cmp ax, 0xd6
jne 0x5051fa
mov dword [ebp - 0x18], 2
mov eax, dword [0x68f1f0]
cmp dword [eax], 0
je 0x5050f9
mov eax, dword [0x68f1f0]
mov eax, dword [eax]
mov eax, dword [eax + 0x2c]
test eax, 0x40000000
jne 0x5050e5
mov dword [ebp - 0x18], 4
mov edx, dword [0x68f1f0]
test eax, 0x80000000
jne 0x5050f9
mov dword [ebp - 0x18], 3
mov edx, dword [ebp - 0x18]
mov eax, 1
call fcn.00504948
test al, al
jne 0x50534e
lea ecx, [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
mov eax, 1
call fcn.00504a28
mov edi, eax
test edi, edi
jne 0x505152
mov eax, dword [0x68e7a8]
cmp byte [eax + 0x96e], 0
je 0x505152
mov eax, dword [0x68e7a8]
cmp byte [eax + 0x97e], 0xe
jne 0x505152
mov eax, dword [0x68e7a8]
cmp byte [eax + 0x980], 2
jbe 0x50534e
test edi, edi
jne 0x505170
cmp dword [ebp - 0x18], 2
je 0x505170
lea ecx, [ebp - 0x1c]
mov edx, 2
mov eax, 1
call fcn.00504a28
mov edi, eax
test edi, edi
je 0x5051dd
mov eax, dword [0x68e3a0]
cmp byte [eax + 8], 0
jne 0x5054fb
mov eax, dword [0x68e3a0]
push esi
push edi
mov esi, edi
lea edi, [eax + 6]
mov ecx, 0x43
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
mov eax, dword [0x68e3a0]
mov byte [eax + 0x112], 0
mov eax, dword [0x68e3a0]
mov dword [eax], 9
lea eax, [ebp - 0x28]
lea edx, [edi + 2]
call fcn.004053cc
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [edi + 0x97]
mov dl, 9
mov eax, dword [0x69a588]
call fcn.0050c840
mov eax, dword [ebp - 0x1c]
call fcn.005b76b4
jmp 0x50534e
push 1
push 0
mov ecx, 0xff00
mov edx, 0x50558c
mov eax, dword [0x69a58c]
call fcn.0053d6d4
jmp 0x5054fb
cmp ax, 0x26
jne 0x50534e
movzx eax, byte [esi + 0x410]
test al, al
je 0x505218
mov dword [ebp - 0x18], 3
jmp 0x50521f
mov dword [ebp - 0x18], 4
xor al, 1
mov byte [esi + 0x410], al
mov edx, dword [ebp - 0x18]
mov eax, 1
call fcn.00504948
test al, al
jne 0x505332
lea ecx, [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
mov eax, 1
call fcn.00504a28
mov edi, eax
test edi, edi
jne 0x50528d
mov eax, dword [0x68e7a8]
cmp byte [eax + 0x96e], 0
je 0x50528d
mov eax, dword [0x68e7a8]
cmp byte [eax + 0x97e], 0xe
jne 0x50528d
mov eax, dword [0x68e7a8]
cmp byte [eax + 0x980], 2
ja 0x50528d
mov edi, dword [0x68e7a8]
add edi, 0x96c
jmp 0x50533e
test edi, edi
jne 0x5052ab
cmp dword [ebp - 0x18], 2
je 0x5052ab
lea ecx, [ebp - 0x1c]
mov edx, 2
mov eax, 1
call fcn.00504a28
mov edi, eax
test edi, edi
je 0x505315
mov eax, dword [0x68e3a0]
cmp byte [eax + 8], 0
jne 0x5054fb
mov eax, dword [0x68e3a0]
push esi
push edi
mov esi, edi
lea edi, [eax + 6]
mov ecx, 0x43
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
mov eax, dword [0x68e3a0]
mov byte [eax + 0x112], 0
mov eax, dword [0x68e3a0]
mov dword [eax], 9
lea eax, [ebp - 0x2c]
lea edx, [edi + 2]
call fcn.004053cc
mov eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [edi + 0x97]
mov dl, 9
mov eax, dword [0x69a588]
call fcn.0050c840
mov eax, dword [ebp - 0x1c]
call fcn.005b76b4
jmp 0x50533e
push 1
push 0
mov ecx, 0xff00
mov edx, 0x50558c
mov eax, dword [0x69a58c]
call fcn.0053d6d4
jmp 0x5054fb
mov edi, dword [0x68e7a8]
add edi, 0x96c
cmp byte [edi + 0x14], 1
jne 0x50534a
mov byte [ebx + 0x24], 0x2f
jmp 0x50534e
mov byte [ebx + 0x24], 0x66
mov eax, dword [0x68f1f0]
cmp dword [eax], 0
jne 0x505374
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov eax, dword [0x69a598]
call fcn.0052c088
xor edi, edi
jmp 0x505398
mov eax, dword [0x68f1f0]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [0x68f1f0]
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x14], eax
mov eax, dword [0x68f1f0]
mov eax, dword [eax]
mov edi, dword [eax + 4]
mov eax, esi
call fcn.0050e0a0
test al, al
je 0x5054fb
mov eax, esi
call fcn.0050e03c
test al, al
je 0x5054fb
call sub.kernel32.dll_GetTickCount
mov edx, dword [0x68e8e4]
mov dword [edx], eax
mov eax, dword [0x68f1d8]
mov byte [eax], 1
mov eax, 0x24
call fcn.00402f54
mov esi, eax
mov eax, esi
xor ecx, ecx
mov edx, 0x24
call fcn.004883d0
movzx eax, byte [ebx + 0x24]
mov dword [esi + 0x10], eax
movzx eax, word [ebx + 0x12]
mov dword [esi + 4], eax
xor eax, eax
mov dword [esi], eax
mov eax, dword [ebx + 0x28]
add eax, 0x1f4
mov edx, dword [0x68e77c]
mov dword [edx], eax
mov eax, dword [esi + 4]
cmp eax, 0x19
jge 0x505426
sub eax, 2
je 0x50545e
sub eax, 0xa
je 0x50545e
add eax, 0xfffffffe
sub eax, 6
jb 0x50545e
dec eax
je 0x50545e
jmp 0x505451
cmp eax, 0xc9
jg 0x50543f
je 0x50545e
add eax, 0xffffffe7
sub eax, 2
jb 0x50545e
dec eax
sub eax, 4
jb 0x50545e
jmp 0x505451
add eax, 0xffffff35
sub eax, 2
jb 0x50545e
add eax, 0xfffffff5
sub eax, 4
jb 0x50545e
call sub.kernel32.dll_GetTickCount
mov edx, dword [0x68e5a0]
mov dword [edx], eax
mov eax, dword [0x68e628]
xor edx, edx
mov dword [eax], edx
mov eax, dword [0x68f1f0]
cmp dword [eax], 0
je 0x505495
mov eax, dword [0x68f1f0]
mov eax, dword [eax]
cmp byte [eax + 0x16], 0
jne 0x505495
mov eax, 0x44c
call fcn.00403440
add eax, 0x12c
mov edx, dword [0x68e628]
mov dword [edx], eax
cmp dword [esi + 4], 0x7b
jne 0x5054a9
mov eax, dword [0x68eab8]
mov eax, dword [eax]
movzx eax, byte [eax + 0x14]
mov dword [ebp - 0xc], eax
movzx eax, word [ebx + 0x12]
mov edx, dword [0x68e22c]
mov dword [edx], eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0xc]
push eax
push esi
push edi
push 0
push 0
mov eax, dword [0x68eab8]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x10]
mov dx, 0x18
call fcn.005a33d8
mov eax, dword [0x68e740]
mov dword [eax], 0xffffffff
jmp 0x5054fb
push 1
push 0
mov ecx, 0xff00
mov edx, 0x5055a4
mov eax, dword [0x69a58c]
call fcn.0053d6d4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50551d
lea eax, [ebp - 0x2c]
mov edx, 4
call fcn.0040517c
ret