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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc0
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
xor eax, eax
push ebp
push 0x517487
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x66930c]
mov eax, dword [eax]
cmp dword [eax + 0x17c], 0
jne 0x517447
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov byte [eax + 0x124], 0
call fcn.0064da00
mov dword [ebp - 4], eax
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
mov ebx, dword [eax + 0x30]
mov edx, dword [0x66930c]
mov esi, dword [eax + 0x34]
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov ecx, dword [eax + 0x34]
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov edx, dword [eax + 0x30]
mov eax, dword [0x66930c]
mov eax, dword [eax]
call fcn.00603894
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
cmp ebx, dword [eax + 0x30]
jne 0x516c8e
mov edx, dword [0x66930c]
cmp esi, dword [eax + 0x34]
jne 0x516c8e
xor eax, eax
jmp 0x516c90
mov al, 1
mov byte [ebp - 0x1a], al
mov eax, dword [0x66930c]
mov eax, dword [eax]
cmp byte [eax + 0x170], 1
jne 0x516cbe
mov eax, dword [0x669468]
mov eax, dword [eax]
cmp dword [eax + 0x18], 1
jg 0x516cbe
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov byte [eax + 0x170], 0
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov esi, dword [eax + 0x128]
mov ebx, dword [esi + 0x120]
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0xc]
test eax, eax
je 0x516d29
mov eax, esi
call fcn.00636288
test eax, eax
jl 0x516d29
mov edx, 1
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x48]
test eax, eax
setge al
mov edx, dword [0x669468]
mov edx, dword [edx]
cmp dword [edx + 0x18], 1
setg dl
cmp al, dl
jne 0x516d29
mov eax, esi
call fcn.00636204
mov edx, dword [0x66930c]
mov edx, dword [edx]
movzx edx, byte [edx + 0x170]
cmp eax, edx
je 0x516dbd
mov eax, ebx
call fcn.0064ef14
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0x34]
lea eax, [ebp - 0x24]
mov edx, dword [0x669ba0]
mov edx, dword [edx]
call fcn.00403438
mov edx, dword [ebp - 0x24]
xor ecx, ecx
mov eax, ebx
call fcn.0064ed44
mov eax, dword [0x669468]
mov eax, dword [eax]
cmp dword [eax + 0x18], 1
jle 0x516d80
lea eax, [ebp - 0x24]
mov edx, dword [0x669ba0]
mov edx, dword [edx + 4]
call fcn.00403438
mov edx, dword [ebp - 0x24]
mov ecx, 1
mov eax, ebx
call fcn.0064ed44
lea eax, [ebp - 0x24]
mov edx, dword [0x669ba0]
mov edx, dword [edx + 8]
call fcn.00403438
mov edx, dword [ebp - 0x24]
mov ecx, 2
mov eax, ebx
call fcn.0064ed44
mov eax, dword [0x66930c]
mov eax, dword [eax]
xor edx, edx
mov dl, byte [eax + 0x170]
mov eax, esi
call fcn.00636220
mov eax, ebx
call fcn.0064ef2c
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov byte [eax + 0x172], 1
call fcn.005fad14
mov al, byte [eax + 0x3a]
mov byte [ebp - 0x19], al
cmp byte [ebp - 0x19], 0
jne 0x516e0d
mov eax, dword [0x669118]
mov eax, dword [eax]
mov esi, dword [eax + 0x18]
dec esi
cmp esi, 0
jl 0x516e0d
mov eax, dword [0x669118]
mov eax, dword [eax]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax + esi*4]
mov byte [eax + 0x8e4], 0
mov byte [eax + 0x474], 0
dec esi
cmp esi, 0xffffffff
jne 0x516dec
mov bl, byte [ebp - 0x19]
xor bl, 1
mov edx, ebx
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x128]
call fcn.0063fc88
mov edx, ebx
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x12c]
call fcn.0063fc88
mov edx, ebx
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x138]
call fcn.0063fc88
lea edx, [ebp - 0x28]
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x138]
call fcn.0063fd30
mov eax, dword [ebp - 0x28]
push eax
call fcn.005fad14
mov eax, dword [eax + 0x1a8]
lea edx, [ebp - 0x2c]
call fcn.0063fd30
mov edx, dword [ebp - 0x2c]
pop eax
call fcn.00403bd0
je 0x516ef5
call fcn.005fad14
mov eax, dword [eax + 0x1a8]
lea edx, [ebp - 0x28]
call fcn.0063fd30
mov edx, dword [ebp - 0x28]
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x138]
call fcn.0063fddc
call fcn.00534f18
mov eax, dword [0x66930c]
mov eax, dword [eax]
cmp byte [eax + 0x173], 0
je 0x516ee7
push 0xffff0000
push 0
push 0x142
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x138]
call fcn.00643a28
push eax
call sub.user32.dll_SendMessageW
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov byte [eax + 0x173], 0
call fcn.005fad14
mov eax, dword [eax + 0x1a8]
mov edx, dword [eax + 0x120]
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x138]
mov eax, dword [eax + 0x120]
call fcn.0064eea4
mov edx, ebx
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x13c]
call fcn.0063fc88
mov edx, ebx
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x140]
call fcn.0063fc88
call fcn.005fad14
mov eax, dword [eax + 0x1ac]
call fcn.00637604
mov edx, eax
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x140]
call fcn.00637610
mov edx, ebx
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x148]
call fcn.0063fc88
call fcn.005fad14
mov eax, dword [eax + 0x1b4]
lea edx, [ebp - 0x28]
call fcn.0063fd30
mov edx, dword [ebp - 0x28]
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x148]
call fcn.0063fddc
call fcn.005fad14
mov eax, dword [eax + 0x1b4]
mov edx, dword [eax + 0x120]
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x148]
mov eax, dword [eax + 0x120]
call fcn.0064eea4
mov edx, ebx
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x14c]
call fcn.0063fc88
call fcn.005fad14
mov eax, dword [eax + 0x1b8]
call fcn.00637604
mov edx, eax
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x14c]
call fcn.00637610
mov bl, 1
mov esi, ebx
and esi, 0x7f
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + esi*4 + 0x150]
mov dl, byte [ebp - 0x19]
xor dl, 1
call fcn.0063fc88
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + esi*4 + 0x158]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
call fcn.00641968
mov esi, eax
dec esi
cmp esi, 0
jl 0x51709c
mov edx, esi
mov eax, dword [ebp - 0x20]
call fcn.00641938
mov edi, eax
mov dl, byte [ebp - 0x19]
xor dl, 1
mov eax, edi
call fcn.0063fc88
call fcn.005fad14
xor edx, edx
mov dl, bl
cmp dword [eax + edx*4 + 0x200], 0
je 0x517096
call fcn.005fad14
xor edx, edx
mov dl, bl
mov eax, dword [eax + edx*4 + 0x200]
mov edx, esi
call fcn.00641938
mov edx, dword [eax + 0x58]
lea eax, [edi + 0x58]
call fcn.004032c8
dec esi
cmp esi, 0xffffffff
jne 0x517048
dec ebx
cmp bl, 0xff
jne 0x517009
cmp byte [ebp - 0x19], 0
je 0x5170c9
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov byte [eax + 0x171], 0
mov edx, 0x5174a0
mov eax, dword [ebp - 4]
call fcn.0064dc7c
jmp 0x5170e3
lea edx, [ebp - 0x24]
mov eax, dword [0x66930c]
mov eax, dword [eax]
call fcn.00603f20
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 4]
call fcn.0064dc7c
mov byte [ebp - 5], 0
xor ebx, ebx
cmp byte [ebp - 0x1a], 0
jne 0x51710d
call fcn.0065867c
mov edx, dword [0x66930c]
mov edx, dword [edx]
sub eax, dword [edx + 0x174]
cmp eax, 0x3e8
jle 0x5173f0
mov eax, dword [0x66930c]
mov eax, dword [eax]
xor edx, edx
mov dword [eax + 0x174], edx
mov eax, dword [0x66930c]
mov eax, dword [eax]
cmp byte [eax + 0x171], 0
je 0x5172c4
mov eax, dword [0x66930c]
mov eax, dword [eax]
call fcn.00603ec4
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov esi, dword [eax + 0x18]
dec esi
cmp esi, 0
jl 0x51719f
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x1c]
mov edi, dword [eax + esi*4]
cmp byte [edi + 0x9e4], 0
je 0x517166
cmp dword [edi + 0x9f4], 0
jl 0x517174
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov byte [eax + 0x172], 0
cmp byte [edi + 0x9e4], 0
je 0x517199
mov eax, dword [edi + 0x9e8]
call fcn.005422c0
test al, al
jne 0x517199
mov eax, dword [edi + 0x9e8]
call fcn.00542248
add ebx, eax
dec esi
cmp esi, 0xffffffff
jne 0x51714b
mov eax, dword [0x66930c]
mov eax, dword [eax]
cmp byte [eax + 0x172], 0
je 0x517250
test ebx, ebx
jne 0x5171e0
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x160]
mov edx, 0x5174f4
call fcn.0063fd6c
mov edx, 0x517508
mov eax, dword [ebp - 4]
call fcn.0064dc7c
jmp 0x5172ba
lea eax, [ebp - 0x24]
push eax
lea edx, [ebp - 0x40]
mov eax, ebx
call fcn.006197ac
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x3c], eax
mov byte [ebp - 0x38], 0xb
xor eax, eax
mov dword [ebp - 0x34], eax
mov byte [ebp - 0x30], 0xb
lea edx, [ebp - 0x3c]
mov eax, 0x517514
mov ecx, 1
call fcn.006550e0
mov edx, dword [ebp - 0x24]
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x160]
call fcn.0063fd6c
mov eax, dword [ebp - 0xc]
mov edi, dword [eax + 0x18]
dec edi
test edi, edi
jl 0x5172ba
inc edi
xor esi, esi
push ebp
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax + esi*4]
call fcn.00516640
pop ecx
inc esi
dec edi
jne 0x51723a
jmp 0x5172ba
test ebx, ebx
jle 0x51725e
lea edx, [ebp - 0x14]
mov eax, ebx
call fcn.006197ac
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x3c], eax
mov byte [ebp - 0x38], 0xb
call fcn.0065867c
mov ecx, 0x12c
cdq
idiv ecx
and eax, 0x80000003
jns 0x517285
dec eax
or eax, 0xfffffffc
inc eax
mov eax, dword [eax*4 + 0x663cac]
mov dword [ebp - 0x34], eax
mov byte [ebp - 0x30], 0xb
lea edx, [ebp - 0x3c]
mov eax, 0x517514
mov ecx, 1
call fcn.006550e0
mov edx, dword [ebp - 0x24]
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x160]
call fcn.0063fd6c
mov eax, dword [ebp - 0xc]
call fcn.0064e5c0
jmp 0x5172db
mov edx, 0x5174f4
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x160]
call fcn.0063fd6c
mov eax, dword [0x66930c]
mov eax, dword [eax]
cmp byte [eax + 0x170], 0
jne 0x5172f8
call fcn.005336e0
lea esi, [eax + 0x9f8]
jmp 0x517305
mov eax, dword [0x66930c]
mov eax, dword [eax]
lea esi, [eax + 0x178]
mov eax, dword [0x66930c]
mov eax, dword [eax]
cmp byte [eax + 0x172], 0
je 0x5173f0
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
cmp dword [eax + 0x30], 0
jle 0x5173f0
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 8]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 4]
lea eax, [ebp - 0x10]
call fcn.00403358
lea edx, [ebp - 0x18]
mov eax, dword [ebp - 0x10]
call fcn.0065432c
cmp byte [ebp - 0x1a], 0
jne 0x5173ae
mov eax, dword [ebp - 0x18]
call fcn.00403ab8
mov edi, eax
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
mov eax, dword [eax + 0x144]
call fcn.00403ab8
cmp edi, eax
jne 0x5173ae
mov eax, dword [ebp - 0x18]
mov edx, dword [0x66930c]
mov edx, dword [edx]
mov edx, dword [edx + 0x164]
mov edx, dword [edx + 0x144]
call fcn.00403bd0
jne 0x5173ae
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
cmp esi, dword [eax + 0x14c]
je 0x5173f0
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
add eax, 0x144
mov edx, dword [ebp - 0x18]
call fcn.004038bc
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
mov ecx, esi
xor edx, edx
call fcn.006130a8
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
mov edx, dword [eax]
call dword [edx + 0x38]
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x168]
mov dl, byte [ebp - 5]
call fcn.0063fc88
mov eax, dword [0x66930c]
mov eax, dword [eax]
cmp byte [eax + 0x172], 0
je 0x517419
test ebx, ebx
jg 0x51741d
xor edx, edx
jmp 0x51741f
mov dl, 1
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov eax, dword [eax + 0x16c]
call fcn.0063fc88
mov eax, dword [ebp - 4]
call fcn.0064da3c
mov eax, dword [0x66930c]
mov eax, dword [eax]
mov byte [eax + 0x124], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51748e
lea eax, [ebp - 0x40]
call fcn.00403274
lea eax, [ebp - 0x2c]
mov edx, 2
call fcn.00403898
lea eax, [ebp - 0x24]
call fcn.00403274
lea eax, [ebp - 0x18]
call fcn.00403880
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.00403298
ret