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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa0
push ebx
mov ebx, dword [ebp + 0x18]
push edi
push 1
xor ecx, ecx
cmp ebx, dword [ebp + 0x1c]
pop edi
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x4c], edi
jge 0x47870a
mov eax, dword [ebp + 0x20]
push esi
mov esi, dword [ebp + 8]
cmp eax, ecx
jne 0x478430
mov dword [ebp - 0x14], ecx
jmp 0x47844b
cmp eax, edi
jne 0x478450
push esi
call fcn.00456597
pop ecx
push eax
call fcn.00440143
neg ax
sbb eax, eax
pop ecx
inc eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], edi
jmp 0x478481
cmp eax, 2
jne 0x478476
push esi
call fcn.00456597
pop ecx
push eax
call fcn.00440143
neg ax
sbb eax, eax
pop ecx
inc eax
xor ecx, ecx
test ax, ax
mov dword [ebp - 0x14], eax
sete cl
jmp 0x47847e
cmp eax, 3
jne 0x478481
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ecx
lea eax, [ebp - 0x2c]
push eax
push esi
call fcn.00443a82
cmp word [ebp - 0x2c], 0x8000
pop ecx
pop ecx
jne 0x4784b9
cmp word [ebp - 0x2a], 0x8000
jne 0x4784b9
cmp word [ebp - 0x28], 0x7fff
jne 0x4784b9
cmp word [ebp - 0x26], 0x7fff
jne 0x4784b9
lea eax, [ebp - 0x2c]
push eax
push esi
call fcn.00445f84
pop ecx
pop ecx
push esi
call fcn.00456597
pop ecx
mov esi, eax
push esi
call fcn.00455029
pop ecx
mov dword [ebp - 0x24], eax
push esi
call fcn.00455029
pop ecx
mov dword [ebp - 0x50], eax
push esi
call fcn.00455029
pop ecx
mov dword [ebp - 0x10], eax
push esi
call fcn.00455029
pop ecx
mov dword [ebp - 0x20], eax
push eax
call fcn.0045500d
pop ecx
mov dword [0x5b3cbc], eax
call fcn.004c096e
xor esi, esi
mov dword [ebp - 0x48], eax
mov dword [ebp - 8], ebx
mov dword [ebp - 0x34], esi
mov dword [ebp - 4], esi
mov eax, dword [0x5b7bf4]
push esi
mov dword [ebp - 0xa0], eax
lea eax, [ebp - 0xa0]
mov dword [0x5b7bf4], eax
lea eax, [ebp - 0x90]
push eax
mov dword [ebp - 0x44], 0x5b7bf4
mov dword [ebp - 0x9c], esi
call fcn.0052a5c0
pop ecx
test eax, eax
pop ecx
jne 0x4786a4
mov ebx, dword [ebp - 8]
mov edi, dword [ebp + 0x14]
cmp ebx, dword [ebp + 0x10]
jl 0x47855e
cmp ebx, edi
jge 0x47855e
dec edi
and dword [ebp - 0x38], eax
mov dword [ebp - 0xc], edi
jmp 0x478675
lea eax, [ebp - 0x34]
push 0
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x40]
push dword [ebp - 0x24]
mov esi, dword [ebp + 8]
push eax
lea eax, [ebp - 0x2c]
push dword [ebp + 0x1c]
push dword [ebp - 4]
push ebx
push dword [ebp + 0xc]
push eax
push esi
call fcn.0047870e
add esp, 0x2c
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.0044204d
pop ecx
test ax, ax
pop ecx
je 0x47863e
push 0
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp - 0x24]
lea eax, [ebp - 0x40]
push dword [ebp + 0xc]
push eax
push edi
push esi
call fcn.00478a49
add esp, 0x1c
cmp dword [ebp - 4], 0
lea eax, [ebx + 1]
jne 0x4785c9
mov eax, ebx
push dword [ebp - 4]
push eax
lea eax, [ebp - 0x40]
push dword [ebp + 0x18]
push dword [ebp + 0xc]
push eax
push edi
push esi
call fcn.00478a49
xor ebx, ebx
add esp, 0x1c
cmp word [ebp - 0x18], bx
je 0x47862a
cmp word [ebp - 0x30], bx
jne 0x47860b
push dword [ebp - 0x20]
push dword [ebp - 0x10]
push edi
call fcn.004550f8
add esp, 0xc
push edi
push dword [ebp - 0x20]
push edi
call fcn.004551f5
add esp, 0xc
push dword [ebp - 0x10]
push edi
push dword [ebp - 0x10]
call fcn.004551b0
add esp, 0xc
push dword [ebp - 0x4c]
push edi
push esi
call fcn.00443f1b
add esp, 0xc
mov dword [ebp - 0x30], ebx
cmp word [ebp - 0x14], bx
je 0x478640
lea eax, [ebp - 0x40]
push eax
push esi
call fcn.00444536
pop ecx
pop ecx
jmp 0x478640
xor ebx, ebx
cmp dword [ebp + 0x20], ebx
jne 0x478675
cmp dword [ebp - 0x1c], ebx
jne 0x478675
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 0x1c]
jge 0x478675
call fcn.004c096e
sub eax, dword [ebp - 0x48]
cmp eax, 0x3c
jbe 0x478675
call fcn.0043bf5e
push 1
push 0x458
mov dword [ebp - 0x1c], eax
call fcn.0043bf73
pop ecx
pop ecx
cmp word [ebp - 0x38], 0
mov eax, dword [ebp - 0xc]
je 0x47868a
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 4], eax
jmp 0x478692
inc eax
and dword [ebp - 4], 0
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0xa0]
push 1
xor esi, esi
mov dword [eax], ecx
pop edi
jmp 0x4786cb
mov eax, dword [0x5b3cbc]
cmp eax, edi
jle 0x4786c5
cdq
sub eax, edx
sar eax, 1
cmp eax, edi
jle 0x4786bd
mov dword [0x5b3cbc], eax
jmp 0x4786cb
mov dword [0x5b3cbc], edi
jmp 0x4786cb
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x1c]
cmp dword [ebp - 8], eax
jl 0x478509
cmp dword [ebp - 0x1c], esi
je 0x4786e5
push dword [ebp - 0x1c]
call fcn.0043bfa3
pop ecx
push dword [ebp - 0x20]
call fcn.00455083
pop ecx
push dword [ebp - 0x10]
call fcn.00455083
pop ecx
push dword [ebp - 0x24]
call fcn.00455083
pop ecx
push dword [ebp - 0x50]
call fcn.00455083
pop ecx
pop esi
pop edi
pop ebx
leave
ret