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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbfc
push ebx
push esi
push edi
mov ebx, dword [ebp + 8]
cmp dword [0x56e980], 0
jne 0x515b59
mov dword [0x56e980], 1
call fcn.00412da2
xor eax, eax
mov dword [ebp - 4], eax
xor edx, edx
mov dword [ebp - 8], edx
mov esi, ebx
test esi, esi
je 0x515747
push esi
call fcn.005141e8
test eax, eax
je 0x51573b
cmp dword [esi + 0x84], 0
jne 0x515737
cmp dword [esi + 0x80], 0
je 0x51573b
mov ebx, esi
jmp 0x515777
xor eax, eax
mov dword [0x56e980], eax
jmp 0x515b59
mov ebx, dword [0x56e970]
test ebx, ebx
je 0x515b0d
test esi, esi
jne 0x515b0d
cmp dword [ebx + 0x84], 0
jne 0x51576f
cmp dword [ebx + 0x80], 0
je 0x515777
mov ebx, dword [ebx + 0x494]
jmp 0x51574d
push dword [ebx + 0x48c]
call fcn.0041261f
test eax, eax
jne 0x515795
mov dword [ebx + 0x68], 0xffffffff
mov ebx, dword [ebx + 0x494]
jmp 0x51574d
cmp dword [ebx + 0x98], 0
jne 0x5157bc
push dword [ebx + 0x48c]
call fcn.004128db
test eax, eax
jne 0x5157bc
mov dword [ebx + 0x68], 0xffffffff
mov ebx, dword [ebx + 0x494]
jmp 0x51574d
cmp dword [ebx + 0x9c], 0
je 0x5157cd
mov ebx, dword [ebx + 0x494]
jmp 0x51574d
cmp dword [ebx + 0x70], 0
jl 0x51584f
cmp dword [ebx + 0x74], 0
jl 0x51584f
push 0
call fcn.0055ca2c
pop ecx
mov dword [ebp - 0x1c], eax
mov eax, dword [0x57931c]
cmp eax, dword [ebp - 0x1c]
jle 0x5157f1
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0x7ffffffe
jle 0x515801
mov dword [ebp - 0x1c], 0x7ffffffe
lea edx, [ebp - 0x1c]
push edx
call fcn.0055c3a8
pop ecx
mov ecx, dword [eax + 8]
cmp ecx, dword [ebx + 0x70]
jne 0x515844
mov edx, dword [eax + 4]
cmp edx, dword [ebx + 0x74]
jl 0x515844
mov ecx, dword [ebx + 0x74]
inc ecx
cmp edx, ecx
jg 0x515844
mov dword [ebx + 0x70], 0xffffffff
mov dword [ebx + 0x74], 0xffffffff
call fcn.0042e7ed
mov dword [ebx + 0x88], eax
mov dword [ebx + 0x8c], edx
jmp 0x51584f
mov ebx, dword [ebx + 0x494]
jmp 0x51574d
cmp dword [ebp - 8], 0
je 0x515866
cmp dword [ebx + 0x78], 0
jne 0x515866
mov ebx, dword [ebx + 0x494]
jmp 0x51574d
call fcn.0042e7ed
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
sub eax, dword [ebx + 0x88]
sbb edx, dword [ebx + 0x8c]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
cmp dword [ebx + 0x84], 0
jne 0x51589b
cmp dword [ebx + 0x80], 0
je 0x51590f
mov edi, dword [ebx + 0x64]
mov eax, edi
add eax, eax
lea eax, [eax + eax*4]
mov ecx, 0x64
cdq
idiv ecx
mov ecx, eax
cmp ecx, 0x1f4
jle 0x5158bc
mov ecx, 0x1f4
mov eax, edi
sub eax, ecx
cdq
cmp edx, dword [ebp - 0x14]
jne 0x5158cd
cmp eax, dword [ebp - 0x18]
jbe 0x5158da
jmp 0x5158cf
jle 0x5158da
mov ebx, dword [ebx + 0x494]
jmp 0x51574d
mov eax, dword [ebx + 0x64]
sub eax, ecx
cdq
sub dword [ebp - 0x18], eax
sbb dword [ebp - 0x14], edx
cmp dword [ebx + 0x78], 0
je 0x515984
mov eax, dword [ebx + 0x64]
cdq
cmp edx, dword [ebp - 0x14]
jne 0x515904
cmp eax, dword [ebp - 0x18]
ja 0x515984
jmp 0x515906
jg 0x515984
mov dword [ebp - 4], 1
jmp 0x515984
mov edi, dword [ebx + 0x64]
imul eax, edi, 0x2710
mov ecx, 0x64
cdq
idiv ecx
mov ecx, eax
cmp ecx, 0x1f4
jle 0x51592f
mov ecx, 0x1f4
imul eax, edi, 0x3e8
sub eax, ecx
cdq
cmp edx, dword [ebp - 0x14]
jne 0x515944
cmp eax, dword [ebp - 0x18]
jbe 0x515951
jmp 0x515946
jle 0x515951
mov ebx, dword [ebx + 0x494]
jmp 0x51574d
imul eax, dword [ebx + 0x64], 0x3e8
sub eax, ecx
cdq
sub dword [ebp - 0x18], eax
sbb dword [ebp - 0x14], edx
cmp dword [ebx + 0x78], 0
je 0x515984
imul eax, dword [ebx + 0x64], 0x3e8
cdq
cmp edx, dword [ebp - 0x14]
jne 0x51597b
cmp eax, dword [ebp - 0x18]
ja 0x515984
jmp 0x51597d
jg 0x515984
mov dword [ebp - 4], 1
cmp dword [ebx + 0x78], 0
jne 0x51599d
call fcn.0042e7ed
mov dword [ebx + 0x88], eax
mov dword [ebx + 0x8c], edx
jmp 0x5159b5
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
sub eax, dword [ebp - 0x18]
sbb edx, dword [ebp - 0x14]
mov dword [ebx + 0x88], eax
mov dword [ebx + 0x8c], edx
lea ecx, [ebx + 0xa0]
push esi
mov edi, ecx
lea esi, [ebp - 0x404]
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
xchg edi, esi
mov eax, edi
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop esi
push dword [ebx + 0x90]
call fcn.0051fafa
test eax, eax
jne 0x5159ff
mov eax, dword [ebx + 0x48c]
mov edx, dword [eax]
mov dword [ebx + 0x90], edx
cmp dword [ebx + 0x68], 0
jle 0x515a15
dec dword [ebx + 0x68]
cmp dword [ebx + 0x68], 0
jg 0x515a15
mov dword [ebx + 0x68], 0xffffffff
test esi, esi
je 0x515a47
push esi
call fcn.005141e8
test eax, eax
je 0x515a47
cmp dword [esi + 0x68], 0xffffffff
jne 0x515a47
mov eax, dword [esi + 0x84]
test eax, eax
je 0x515a3f
push eax
push dword [0x56f018]
call sub.USER32.dll_KillTimer
xor edx, edx
mov dword [esi + 0x84], edx
mov dword [ebx + 0x6c], 1
mov edi, dword [ebx + 0x494]
mov eax, dword [ebx + 0x488]
test eax, eax
je 0x515a70
push eax
call fcn.00427d80
test eax, eax
jne 0x515a70
xor edx, edx
mov dword [ebx + 0x488], edx
push dword [ebx + 0x48c]
push dword [ebx + 0x488]
push 0
push dword [ebx + 0x7c]
push 0
lea ecx, [ebp - 0x404]
push ecx
push dword [ebx + 0x90]
call fcn.004b07e0
push ebx
call fcn.005141e8
test eax, eax
je 0x515aea
cmp dword [ebx + 0x68], 0xffffffff
jne 0x515ae3
cmp dword [ebx + 0x94], 0
je 0x515ae3
push ebx
push 0
push 0x157d
call fcn.0042c771
push eax
lea eax, [ebp - 0x404]
push eax
call sub.USER32.dll_wsprintfA
add esp, 0xc
push dword [0x5618e8]
lea edx, [ebp - 0x404]
push edx
push dword [ebx + 0x90]
call fcn.004f0245
xor ecx, ecx
mov dword [ebx + 0x6c], ecx
jmp 0x515aff
test edi, edi
je 0x515b0d
push edi
call fcn.005141e8
test eax, eax
je 0x515b0d
mov ebx, edi
jmp 0x51574d
mov ebx, dword [ebx + 0x494]
test ebx, ebx
jne 0x515755
test esi, esi
je 0x515b2e
push esi
call fcn.005141e8
test eax, eax
je 0x515b2e
cmp dword [esi + 0x68], 0xffffffff
jne 0x515b39
push 0
push 0
push 2
call fcn.00514293
jmp 0x515b39
push 0
push 0
push 2
call fcn.00514293
cmp dword [ebp - 4], 0
je 0x515b51
xor eax, eax
mov dword [ebp - 4], eax
inc dword [ebp - 8]
cmp dword [ebp - 8], 0x64
jl 0x515717
xor edx, edx
mov dword [0x56e980], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4