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

Disassembly:
push ebp
mov ebp, esp
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ebx
push esi
push edi
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x516215
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebx + 0x408], esi
mov ax, word [esi + 0x1a]
test ax, ax
jbe 0x515ff0
cmp ax, 0xffff
ja 0x515ff0
cmp word [esi + 0x1c], 0
jne 0x515fc1
cmp byte [esi + 0x24], 0
jne 0x515fc1
call sub.kernel32.dll_GetTickCount
mov dword [esi + 0x28], eax
cmp dword [ebx + 0x404], 0
je 0x515f19
lea eax, [ebx + 0x404]
call fcn.0040f704
xor ecx, ecx
mov dl, 1
mov eax, dword [0x4eced4]
call fcn.004ee954
mov edi, eax
mov dword [ebx + 0x404], edi
xor edx, edx
mov eax, edi
call fcn.004ee63c
xor edx, edx
mov eax, dword [ebx + 0x404]
call fcn.004ee6fc
mov eax, dword [ebx + 0x404]
mov dword [eax + 0x54], ebx
mov dword [eax + 0x50], 0x5163d8
mov dword [eax + 0x64], ebx
mov dword [eax + 0x60], 0x516448
mov dword [eax + 0x8c], ebx
mov dword [eax + 0x88], 0x516458
mov dword [eax + 0x7c], ebx
mov dword [eax + 0x78], 0x516470
mov eax, dword [esi + 0xc]
call fcn.004c3888
test al, al
je 0x515f95
mov edx, dword [esi + 0xc]
mov eax, dword [ebx + 0x404]
call fcn.004ee67c
jmp 0x515fa3
mov edx, dword [esi + 0xc]
mov eax, dword [ebx + 0x404]
call fcn.004ee6fc
movzx edx, word [esi + 0x1a]
mov eax, dword [ebx + 0x404]
call fcn.004ee77c
mov dl, 1
mov eax, dword [ebx + 0x404]
call fcn.004ee63c
jmp 0x515ff0
cmp dword [ebx + 0x38c], 0
je 0x515ff0
push 1
movzx eax, word [esi + 0x1a]
push eax
mov eax, dword [esi + 0xc]
call fcn.004051dc
push eax
push 0
push 0xf827ad
call dword [ebx + 0x38c]
cmp eax, 1
sete al
mov byte [esi + 0x24], al
mov eax, dword [ebx + 0x408]
cmp byte [eax + 0x1e], 0
je 0x51601b
call sub.kernel32.dll_GetTickCount
mov edx, dword [ebx + 0x408]
sub eax, dword [edx + 0x20]
cmp eax, 0x2bf20
jb 0x51601b
mov eax, dword [ebx + 0x408]
mov byte [eax + 0x1e], 0
mov eax, dword [ebx + 0x408]
cmp byte [eax + 0x1e], 0
je 0x516095
mov eax, dword [ebx + 0x390]
mov edx, dword [eax + 0x67b]
mov eax, dword [ebx + 0x318]
mov eax, dword [eax + 0x68]
call fcn.00428260
lea edx, [ebp - 4]
mov eax, dword [0x526ab8]
call fcn.00406ef8
mov edx, dword [ebp - 4]
mov eax, dword [ebx + 0x318]
call fcn.00447604
mov dl, 1
mov eax, dword [ebx + 0x31c]
mov ecx, dword [eax]
call dword [ecx + 0x64]
mov dl, 1
mov eax, dword [ebx + 0x328]
mov ecx, dword [eax]
call dword [ecx + 0x64]
mov dl, 1
mov eax, dword [ebx + 0x32c]
mov ecx, dword [eax]
call dword [ecx + 0x64]
mov dl, 1
mov eax, dword [ebx + 0x330]
mov ecx, dword [eax]
call dword [ecx + 0x64]
jmp 0x5161fa
mov eax, dword [ebx + 0x390]
mov edx, dword [eax + 0x677]
mov eax, dword [ebx + 0x318]
mov eax, dword [eax + 0x68]
call fcn.00428260
lea edx, [ebp - 8]
mov eax, dword [0x526960]
call fcn.00406ef8
mov edx, dword [ebp - 8]
mov eax, dword [ebx + 0x318]
call fcn.00447604
mov eax, dword [0x526bd8]
mov eax, dword [eax]
mov eax, dword [eax + 0x32c]
mov eax, dword [eax + 0x68]
mov edx, 0xffffff
call fcn.00428260
lea edx, [ebp - 0xc]
mov eax, dword [0x526960]
call fcn.00406ef8
mov edx, dword [ebp - 0xc]
mov eax, dword [0x526bd8]
mov eax, dword [eax]
mov eax, dword [eax + 0x32c]
call fcn.00447604
mov eax, dword [0x526ad0]
mov eax, dword [eax]
mov eax, dword [eax + 0x314]
mov eax, dword [eax + 0x68]
mov edx, 0xffffff
call fcn.00428260
lea edx, [ebp - 0x10]
mov eax, dword [0x526960]
call fcn.00406ef8
mov edx, dword [ebp - 0x10]
mov eax, dword [0x526ad0]
mov eax, dword [eax]
mov eax, dword [eax + 0x314]
call fcn.00447604
mov eax, dword [0x52691c]
mov eax, dword [eax]
mov eax, dword [eax + 0x30c]
mov eax, dword [eax + 0x68]
mov edx, 0xffffff
call fcn.00428260
lea edx, [ebp - 0x14]
mov eax, dword [0x526960]
call fcn.00406ef8
mov edx, dword [ebp - 0x14]
mov eax, dword [0x52691c]
mov eax, dword [eax]
mov eax, dword [eax + 0x30c]
call fcn.00447604
xor edx, edx
mov eax, dword [ebx + 0x31c]
mov ecx, dword [eax]
call dword [ecx + 0x64]
xor edx, edx
mov eax, dword [ebx + 0x328]
mov ecx, dword [eax]
call dword [ecx + 0x64]
xor edx, edx
mov eax, dword [ebx + 0x32c]
mov ecx, dword [eax]
call dword [ecx + 0x64]
xor edx, edx
mov eax, dword [ebx + 0x330]
mov ecx, dword [eax]
call dword [ecx + 0x64]
xor eax, eax
mov dword [ebx + 0x398], eax
mov byte [ebx + 0x39c], 0
lea eax, [ebx + 0x3a0]
call fcn.00404d0c
lea eax, [ebx + 0x3a4]
call fcn.00404d0c
lea eax, [ebx + 0x3a8]
call fcn.00404d0c
xor eax, eax
mov dword [ebx + 0x3ac], eax
push 1
mov cx, word [esi + 0x10]
mov edx, dword [esi + 0xc]
mov eax, ebx
call fcn.00515d9c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51621c
lea eax, [ebp - 0x14]
mov edx, 5
call fcn.00404d30
ret