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

Disassembly:
mov eax, 0x6188c4
call fcn.0044c164
sub esp, 0x60
mov eax, dword [ebp + 0x1c]
and dword [ebp - 0x28], 0
push ebx
cmp dword [ebp + 0x18], eax
push esi
push edi
mov dword [ebp - 0x10], esp
push 1
pop esi
mov dword [ebp - 0x38], esi
jge 0x4c257b
mov eax, dword [ebp + 0x20]
test eax, eax
jne 0x4c2299
xor edi, edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], esi
jmp 0x4c22f9
cmp eax, esi
jne 0x4c22b8
push dword [ebp + 8]
call fcn.004739a5
push eax
call fcn.004654e5
mov di, ax
pop ecx
neg di
sbb edi, edi
pop ecx
inc edi
jmp 0x4c2291
cmp eax, 2
jne 0x4c22e6
push dword [ebp + 8]
call fcn.004739a5
push eax
call fcn.004654e5
mov di, ax
pop ecx
neg di
sbb edi, edi
xor eax, eax
inc edi
pop ecx
test di, di
sete al
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], eax
jmp 0x4c22f9
cmp eax, 3
jne 0x4c22f6
and dword [ebp - 0x1c], 0
mov edi, esi
mov dword [ebp - 0x18], edi
jmp 0x4c22f9
mov edi, dword [ebp - 0x18]
lea eax, [ebp - 0x50]
push eax
push dword [ebp + 8]
call fcn.00473e3a
cmp word [ebp - 0x50], 0x8000
pop ecx
pop ecx
jne 0x4c2335
cmp word [ebp - 0x4e], 0x8000
jne 0x4c2335
cmp word [ebp - 0x4c], 0x7fff
jne 0x4c2335
cmp word [ebp - 0x4a], 0x7fff
jne 0x4c2335
lea eax, [ebp - 0x50]
push eax
push dword [ebp + 8]
call fcn.00476815
pop ecx
pop ecx
push dword [ebp + 8]
call fcn.004739a5
mov esi, eax
push esi
call fcn.0048ba50
mov ebx, eax
push esi
mov dword [ebp - 0x44], ebx
call fcn.0048ba50
push esi
mov dword [ebp - 0x48], eax
call fcn.0048ba50
push esi
mov dword [ebp - 0x2c], eax
call fcn.0048ba50
push eax
mov dword [ebp - 0x34], eax
call fcn.0048ba34
add esp, 0x18
mov dword [0x6b1510], eax
call fcn.0059d186
mov esi, dword [ebp + 0x18]
and dword [ebp - 0x30], 0
and dword [ebp - 0x14], 0
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x24], esi
cmp esi, dword [ebp + 0x1c]
jge 0x4c254b
and dword [ebp - 4], 0
call fcn.00593582
mov dword [ebp - 0x5c], eax
mov ecx, dword [eax]
mov dword [ebp - 0x64], ecx
lea ecx, [ebp - 0x64]
mov dword [eax], ecx
mov dword [ebp - 0x60], 0x593563
cmp esi, dword [ebp + 0x10]
mov byte [ebp - 4], 1
jl 0x4c23da
mov eax, dword [ebp + 0x14]
cmp esi, eax
jge 0x4c23da
lea esi, [eax - 1]
mov dword [ebp - 0x20], esi
inc esi
and dword [ebp - 0x14], 0
mov dword [ebp - 0x24], esi
mov eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x64]
mov dword [eax], ecx
jmp 0x4c2542
lea eax, [ebp - 0x30]
push 0
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x58]
push ebx
push eax
push dword [ebp + 0x1c]
lea eax, [ebp - 0x50]
push dword [ebp - 0x14]
push esi
push dword [ebp + 0xc]
push eax
push dword [ebp + 8]
call fcn.004c258a
add esp, 0x2c
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.00466407
pop ecx
test ax, ax
pop ecx
je 0x4c24b6
push 0
lea eax, [ebp - 0x58]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
push ebx
push dword [ebp + 8]
call fcn.004c28ba
add esp, 0x1c
cmp dword [ebp - 0x14], 0
je 0x4c243f
inc esi
push dword [ebp - 0x14]
lea eax, [ebp - 0x58]
push esi
push dword [ebp + 0x18]
push dword [ebp + 0xc]
push eax
push ebx
push dword [ebp + 8]
call fcn.004c28ba
xor esi, esi
add esp, 0x1c
cmp word [ebp - 0x1c], si
je 0x4c24a3
cmp word [ebp - 0x38], si
jne 0x4c2483
push dword [ebp - 0x34]
push dword [ebp - 0x2c]
push ebx
call fcn.0048bb2e
add esp, 0xc
push ebx
push dword [ebp - 0x34]
push ebx
call fcn.0048bc2b
add esp, 0xc
push dword [ebp - 0x2c]
push ebx
push dword [ebp - 0x2c]
call fcn.0048bbe6
add esp, 0xc
push 1
push ebx
push dword [ebp + 8]
call fcn.004742db
add esp, 0xc
mov dword [ebp - 0x38], esi
cmp di, si
je 0x4c24b6
lea eax, [ebp - 0x58]
push eax
push dword [ebp + 8]
call fcn.0047499c
pop ecx
pop ecx
cmp dword [ebp + 0x20], 0
jne 0x4c24ed
cmp dword [ebp - 0x28], 0
jne 0x4c24ed
mov esi, dword [ebp - 0x20]
cmp esi, dword [ebp + 0x1c]
jge 0x4c24f0
call fcn.0059d186
sub eax, dword [ebp - 0x40]
cmp eax, 0x3c
jbe 0x4c24ed
call fcn.0045c547
push 1
push 0x458
mov dword [ebp - 0x28], eax
call fcn.0045c55c
pop ecx
pop ecx
mov esi, dword [ebp - 0x20]
cmp word [ebp - 0x3c], 0
je 0x4c23c5
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x14], eax
jmp 0x4c23cd
or dword [ebp - 4], 0xffffffff
jmp 0x4c2389
cmp dword [ebp - 0x28], 0
je 0x4c255a
push dword [ebp - 0x28]
call fcn.0045c5b7
pop ecx
push dword [ebp - 0x34]
call fcn.0048baaa
push dword [ebp - 0x2c]
call fcn.0048baaa
push ebx
call fcn.0048baaa
push dword [ebp - 0x48]
call fcn.0048baaa
add esp, 0x10
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret