Function at 0x51d930
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 - 0x2c], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
xor eax, eax
push ebp
push 0x51e1e0
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x66ee78]
mov eax, dword [eax]
cmp dword [eax + 0x17c], 0
jne 0x51e1a0
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov byte [eax + 0x124], 0
call fcn.0064e1d0
mov dword [ebp - 4], eax
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
mov ebx, dword [eax + 0x30]
mov edx, dword [0x66ee78]
mov esi, dword [eax + 0x34]
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov ecx, dword [eax + 0x34]
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov edx, dword [eax + 0x30]
mov eax, dword [0x66ee78]
mov eax, dword [eax]
call fcn.00606bc8
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
cmp ebx, dword [eax + 0x30]
jne 0x51d9e2
mov edx, dword [0x66ee78]
cmp esi, dword [eax + 0x34]
jne 0x51d9e2
xor eax, eax
jmp 0x51d9e4
mov al, 1
mov byte [ebp - 0x1a], al
mov eax, dword [0x66ee78]
mov eax, dword [eax]
cmp byte [eax + 0x170], 1
jne 0x51da12
mov eax, dword [0x66f1e0]
mov eax, dword [eax]
cmp dword [eax + 0x18], 1
jg 0x51da12
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov byte [eax + 0x170], 0
mov eax, dword [0x66ee78]
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 0x51da79
mov eax, esi
call fcn.006361b8
test eax, eax
jl 0x51da79
mov edx, 1
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x48]
test eax, eax
setge al
mov edx, dword [0x66f1e0]
mov edx, dword [edx]
cmp dword [edx + 0x18], 1
setg dl
cmp al, dl
jne 0x51da79
mov eax, esi
call fcn.0063614c
mov edx, dword [0x66ee78]
mov edx, dword [edx]
movzx edx, byte [edx + 0x170]
cmp eax, edx
je 0x51daec
mov eax, ebx
call fcn.0064f7c8
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0x34]
mov edx, dword [0x6703bc]
mov edx, dword [edx]
xor ecx, ecx
mov eax, ebx
call fcn.0064f5f8
mov eax, dword [0x66f1e0]
mov eax, dword [eax]
cmp dword [eax + 0x18], 1
jle 0x51daba
mov edx, dword [0x6703bc]
mov edx, dword [edx + 4]
mov ecx, 1
mov eax, ebx
call fcn.0064f5f8
mov edx, dword [0x6703bc]
mov edx, dword [edx + 8]
mov ecx, 2
mov eax, ebx
call fcn.0064f5f8
mov eax, dword [0x66ee78]
mov eax, dword [eax]
xor edx, edx
mov dl, byte [eax + 0x170]
mov eax, esi
call fcn.00636168
mov eax, ebx
call fcn.0064f7e0
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov byte [eax + 0x172], 1
call fcn.005fe7e0
mov al, byte [eax + 0x3a]
mov byte [ebp - 0x19], al
cmp byte [ebp - 0x19], 0
jne 0x51db3c
mov eax, dword [0x66e960]
mov eax, dword [eax]
mov esi, dword [eax + 0x18]
dec esi
cmp esi, 0
jl 0x51db3c
mov eax, dword [0x66e960]
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 0x51db1b
mov bl, byte [ebp - 0x19]
xor bl, 1
mov edx, ebx
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x128]
call fcn.0063fa04
mov edx, ebx
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x12c]
call fcn.0063fa04
mov edx, ebx
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x138]
call fcn.0063fa04
lea edx, [ebp - 0x24]
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x138]
call fcn.0063faa4
mov eax, dword [ebp - 0x24]
push eax
call fcn.005fe7e0
mov eax, dword [eax + 0x1a8]
lea edx, [ebp - 0x28]
call fcn.0063faa4
mov edx, dword [ebp - 0x28]
pop eax
call fcn.00403bc0
je 0x51dc24
call fcn.005fe7e0
mov eax, dword [eax + 0x1a8]
lea edx, [ebp - 0x24]
call fcn.0063faa4
mov edx, dword [ebp - 0x24]
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x138]
call fcn.0063fb9c
call fcn.0053ac04
mov eax, dword [0x66ee78]
mov eax, dword [eax]
cmp byte [eax + 0x173], 0
je 0x51dc16
push 0xffff0000
push 0
push 0x142
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x138]
call fcn.00643864
push eax
call sub.user32.dll_SendMessageW
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov byte [eax + 0x173], 0
call fcn.005fe7e0
mov eax, dword [eax + 0x1a8]
mov edx, dword [eax + 0x120]
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x138]
mov eax, dword [eax + 0x120]
call fcn.0064f758
mov edx, ebx
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x13c]
call fcn.0063fa04
mov edx, ebx
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x140]
call fcn.0063fa04
call fcn.005fe7e0
mov eax, dword [eax + 0x1ac]
call fcn.006374f8
mov edx, eax
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x140]
call fcn.00637504
mov edx, ebx
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x148]
call fcn.0063fa04
call fcn.005fe7e0
mov eax, dword [eax + 0x1b4]
lea edx, [ebp - 0x24]
call fcn.0063faa4
mov edx, dword [ebp - 0x24]
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x148]
call fcn.0063fb9c
call fcn.005fe7e0
mov eax, dword [eax + 0x1b4]
mov edx, dword [eax + 0x120]
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x148]
mov eax, dword [eax + 0x120]
call fcn.0064f758
mov edx, ebx
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x14c]
call fcn.0063fa04
call fcn.005fe7e0
mov eax, dword [eax + 0x1b8]
call fcn.006374f8
mov edx, eax
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x14c]
call fcn.00637504
mov bl, 1
mov esi, ebx
and esi, 0x7f
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + esi*4 + 0x150]
mov dl, byte [ebp - 0x19]
xor dl, 1
call fcn.0063fa04
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + esi*4 + 0x158]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
call fcn.00641764
mov esi, eax
dec esi
cmp esi, 0
jl 0x51ddcb
mov edx, esi
mov eax, dword [ebp - 0x20]
call fcn.00641734
mov edi, eax
mov dl, byte [ebp - 0x19]
xor dl, 1
mov eax, edi
call fcn.0063fa04
call fcn.005fe7e0
xor edx, edx
mov dl, bl
cmp dword [eax + edx*4 + 0x200], 0
je 0x51ddc5
call fcn.005fe7e0
xor edx, edx
mov dl, bl
mov eax, dword [eax + edx*4 + 0x200]
mov edx, esi
call fcn.00641734
mov edx, dword [eax + 0x58]
lea eax, [edi + 0x58]
call fcn.004032c8
dec esi
cmp esi, 0xffffffff
jne 0x51dd77
dec ebx
cmp bl, 0xff
jne 0x51dd38
cmp byte [ebp - 0x19], 0
je 0x51de06
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov byte [eax + 0x171], 0
lea eax, [ebp - 0x2c]
mov edx, dword [0x66f4e8]
mov edx, dword [edx]
call fcn.00403438
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.0064e44c
jmp 0x51de20
lea edx, [ebp - 0x2c]
mov eax, dword [0x66ee78]
mov eax, dword [eax]
call fcn.00607254
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.0064e44c
mov byte [ebp - 5], 0
xor edi, edi
cmp byte [ebp - 0x1a], 0
jne 0x51de4a
call fcn.00658fe8
mov edx, dword [0x66ee78]
mov edx, dword [edx]
sub eax, dword [edx + 0x174]
cmp eax, 0x3e8
jle 0x51e149
mov eax, dword [0x66ee78]
mov eax, dword [eax]
xor edx, edx
mov dword [eax + 0x174], edx
mov eax, dword [0x66ee78]
mov eax, dword [eax]
cmp byte [eax + 0x171], 0
je 0x51e016
mov eax, dword [0x66ee78]
mov eax, dword [eax]
call fcn.006071f8
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov esi, dword [eax + 0x18]
dec esi
cmp esi, 0
jl 0x51dedc
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x1c]
mov ebx, dword [eax + esi*4]
cmp byte [ebx + 0x9e4], 0
je 0x51dea3
cmp dword [ebx + 0x9f4], 0
jl 0x51deb1
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov byte [eax + 0x172], 0
cmp byte [ebx + 0x9e4], 0
je 0x51ded6
mov eax, dword [ebx + 0x9e8]
call fcn.00547d5c
test al, al
jne 0x51ded6
mov eax, dword [ebx + 0x9e8]
call fcn.00547ce4
add edi, eax
dec esi
cmp esi, 0xffffffff
jne 0x51de88
mov eax, dword [0x66ee78]
mov eax, dword [eax]
cmp byte [eax + 0x172], 0
je 0x51dfa0
test edi, edi
jne 0x51df2e
mov edx, dword [0x66ef00]
mov edx, dword [edx]
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x160]
call fcn.0063fb4c
lea eax, [ebp - 0x2c]
mov edx, dword [0x66fbe8]
mov edx, dword [edx]
call fcn.00403438
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.0064e44c
jmp 0x51e00c
lea eax, [ebp - 0x2c]
push eax
lea edx, [ebp - 0x40]
mov eax, edi
call fcn.00619c40
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, dword [0x66ea24]
mov eax, dword [eax]
mov ecx, 1
call fcn.00655a28
mov edx, dword [ebp - 0x2c]
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x160]
call fcn.0063fadc
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax + 0x18]
dec ebx
test ebx, ebx
jl 0x51e00c
inc ebx
xor esi, esi
push ebp
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax + esi*4]
call fcn.0051d3c8
pop ecx
inc esi
dec ebx
jne 0x51df8a
jmp 0x51e00c
test edi, edi
jle 0x51dfae
lea edx, [ebp - 0x14]
mov eax, edi
call fcn.00619c40
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x3c], eax
mov byte [ebp - 0x38], 0xb
call fcn.00658fe8
mov ecx, 0x12c
cdq
idiv ecx
and eax, 0x80000003
jns 0x51dfd5
dec eax
or eax, 0xfffffffc
inc eax
mov eax, dword [eax*4 + 0x6694ac]
mov dword [ebp - 0x34], eax
mov byte [ebp - 0x30], 0xb
lea edx, [ebp - 0x3c]
mov eax, dword [0x66ea24]
mov eax, dword [eax]
mov ecx, 1
call fcn.00655a28
mov edx, dword [ebp - 0x2c]
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x160]
call fcn.0063fadc
mov eax, dword [ebp - 0xc]
call fcn.0064edac
jmp 0x51e030
mov edx, dword [0x66ef00]
mov edx, dword [edx]
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x160]
call fcn.0063fb4c
mov eax, dword [0x66ee78]
mov eax, dword [eax]
cmp byte [eax + 0x170], 0
jne 0x51e04d
call fcn.00539564
lea ebx, [eax + 0x9f8]
jmp 0x51e05a
mov eax, dword [0x66ee78]
mov eax, dword [eax]
lea ebx, [eax + 0x178]
mov eax, dword [0x66ee78]
mov eax, dword [eax]
cmp byte [eax + 0x172], 0
je 0x51e149
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
cmp dword [eax + 0x30], 0
jle 0x51e149
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.00654c74
cmp byte [ebp - 0x1a], 0
jne 0x51e103
mov eax, dword [ebp - 0x18]
call fcn.00403aa8
mov esi, eax
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
mov eax, dword [eax + 0x144]
call fcn.00403aa8
cmp esi, eax
jne 0x51e103
mov eax, dword [ebp - 0x18]
mov edx, dword [0x66ee78]
mov edx, dword [edx]
mov edx, dword [edx + 0x164]
mov edx, dword [edx + 0x144]
call fcn.00403bc0
jne 0x51e103
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
cmp ebx, dword [eax + 0x14c]
je 0x51e149
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
add eax, 0x144
mov edx, dword [ebp - 0x18]
call fcn.004038bc
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
mov ecx, ebx
xor edx, edx
call fcn.00615ddc
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x164]
mov bx, 0xffe8
call fcn.00403254
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x168]
mov dl, byte [ebp - 5]
call fcn.0063fa04
mov eax, dword [0x66ee78]
mov eax, dword [eax]
cmp byte [eax + 0x172], 0
je 0x51e172
test edi, edi
jg 0x51e176
xor edx, edx
jmp 0x51e178
mov dl, 1
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov eax, dword [eax + 0x16c]
call fcn.0063fa04
mov eax, dword [ebp - 4]
call fcn.0064e20c
mov eax, dword [0x66ee78]
mov eax, dword [eax]
mov byte [eax + 0x124], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51e1e7
lea eax, [ebp - 0x40]
call fcn.00403274
lea eax, [ebp - 0x2c]
call fcn.00403274
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.00403898
lea eax, [ebp - 0x18]
call fcn.00403880
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.00403298
ret