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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1b4
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
cmp word [esi + 0x184], 3
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
je 0x4e3868
cmp dword [esi + 0xa4], edi
lea ebx, [esi + 0xa4]
je 0x4e3166
call fcn.004c096e
add eax, dword [ebx]
mov dword [esi + 0xa8], eax
jmp 0x4e316d
or dword [esi + 0xa8], 0xffffffff
cmp dword [ebp + 0xc], edi
je 0x4e3182
lea eax, [ebp - 0x24]
push eax
push dword [ebp + 0xc]
call fcn.004ae31d
pop ecx
pop ecx
jmp 0x4e3192
mov eax, dword [0x5a7508]
mov dword [ebp - 0x24], eax
mov eax, dword [0x5a750c]
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0x9c]
test al, 2
je 0x4e31a7
mov word [esi + 0x130], 1
jmp 0x4e31bd
test al, 4
je 0x4e31b6
mov word [esi + 0x130], 2
jmp 0x4e31bd
mov word [esi + 0x130], di
cmp word [esi + 0x130], 2
jne 0x4e31de
cmp word [esi + 0x124], 1
jne 0x4e31de
cmp word [esi + 0x132], di
je 0x4e3868
xor ecx, ecx
cmp dword [esi + 0x2c], edi
setne cl
cmp dword [esi + 0xb0], edi
mov dword [ebp - 0x10], ecx
je 0x4e31fa
mov dword [ebp - 4], 0x10
jmp 0x4e3209
cmp dword [esi + 0xb4], edi
je 0x4e3209
mov dword [ebp - 4], 0x20
test al, 0x80
je 0x4e3211
push 1
jmp 0x4e3212
push edi
push dword [esi + 0x10]
call fcn.004876c0
mov dword [ebp - 0x14], eax
mov eax, dword [0x5b7bf4]
mov dword [ebp - 0x1b4], eax
pop ecx
lea eax, [ebp - 0x1b4]
pop ecx
mov dword [0x5b7bf4], eax
lea eax, [ebp - 0x1a4]
push edi
push eax
mov dword [ebp - 0x18], 0x5b7bf4
mov dword [ebp - 0x1b0], edi
call fcn.0052a5c0
pop ecx
test eax, eax
pop ecx
jne 0x4e3841
mov ebx, dword [ebp + 8]
cmp word [ebx + 0x8c], di
je 0x4e327b
push ebx
push 0x4e3d5d
push 0x75
push dword [ebx + 8]
push dword [ebx + 4]
call fcn.004e3d7d
add esp, 0x14
cmp word [ebx + 0x184], di
jne 0x4e32be
lea eax, [ebp - 0x24]
push eax
push ebx
call fcn.004d3ced
test byte [ebx + 0x9c], 0x10
pop ecx
lea esi, [ebx + 0x194]
pop ecx
lea edi, [ebx + 0x1d4]
push 8
pop ecx
rep movsd dword es:[edi], dword [esi]
je 0x4e32b3
mov word [ebx + 0x98], 1
mov word [ebx + 0x184], 1
xor edi, edi
mov ax, word [ebx + 0x18a]
cmp ax, di
je 0x4e3377
cmp dword [ebx + 0x150], edi
je 0x4e336e
cmp word [ebp - 0x10], di
je 0x4e32e4
or dword [ebp - 4], 0xf
mov eax, dword [0x5b7bf4]
push edi
mov dword [ebp - 0x164], eax
lea eax, [ebp - 0x164]
mov dword [0x5b7bf4], eax
lea eax, [ebp - 0x154]
push eax
mov dword [ebp - 0xc], 0x5b7bf4
mov dword [ebp - 0x160], edi
call fcn.0052a5c0
mov ebx, dword [ebp + 8]
pop ecx
test eax, eax
pop ecx
jne 0x4e333d
mov ax, word [ebp - 4]
push ebx
mov word [ebx + 0x128], ax
call dword [ebx + 0x150]
mov eax, dword [ebp - 0xc]
pop ecx
mov ecx, dword [ebp - 0x164]
mov dword [eax], ecx
jmp 0x4e3359
mov eax, dword [ebp - 0x158]
cmp eax, 0x400a0013
mov dword [ebp - 8], eax
jne 0x4e3359
test byte [ebx + 0x9c], 0x80
je 0x4e3359
mov dword [ebp - 8], edi
test byte [ebp - 4], 4
je 0x4e37fb
push ebx
call fcn.004d66ec
jmp 0x4e37fa
cmp ax, di
jne 0x4e3495
cmp word [ebx + 0x124], di
je 0x4e3495
cmp word [ebp - 0x10], di
jne 0x4e339d
cmp word [ebx + 0x8c], di
jne 0x4e339d
test byte [ebp - 4], 0x30
je 0x4e37fb
cmp dword [ebp - 8], edi
jne 0x4e37fb
cmp word [ebx + 0x184], 1
jne 0x4e37fb
cmp word [ebp - 0x10], di
je 0x4e33be
or dword [ebp - 4], 0xf
cmp word [ebx + 0x8c], di
je 0x4e33cb
or dword [ebp - 4], 0x40
push 1
mov esi, 0x4dfdfd
push ebx
push esi
call fcn.00484073
mov eax, dword [0x5b7bf4]
add esp, 0xc
mov dword [ebp - 0x74], eax
lea eax, [ebp - 0x74]
mov dword [0x5b7bf4], eax
lea eax, [ebp - 0x64]
push edi
push eax
mov dword [ebp - 0xc], 0x5b7bf4
mov dword [ebp - 0x70], edi
call fcn.0052a5c0
mov ebx, dword [ebp + 8]
pop ecx
test eax, eax
pop ecx
jne 0x4e3428
push 1
lea eax, [ebx + 0x1d4]
push dword [ebp - 4]
push eax
push ebx
call fcn.005032e6
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x74]
add esp, 0x10
mov dword [eax], ecx
jmp 0x4e3441
mov eax, dword [ebp - 0x68]
cmp eax, 0x400a0013
mov dword [ebp - 8], eax
jne 0x4e3441
test byte [ebx + 0x9c], 0x80
je 0x4e3441
mov dword [ebp - 8], edi
test byte [ebp - 4], 4
je 0x4e344e
push ebx
call fcn.004d66ec
pop ecx
push ebx
push esi
call fcn.004840ef
mov eax, dword [ebx + 0x1d4]
pop ecx
cmp eax, dword [ebx + 0x1b4]
pop ecx
jne 0x4e37fb
mov eax, dword [ebx + 0x1d8]
cmp eax, dword [ebx + 0x1b8]
jne 0x4e37fb
cmp dword [ebx + 0x150], edi
jne 0x4e37fb
mov word [ebx + 0x184], 2
jmp 0x4e37fb
push 5
push ebx
push 0x4dfdfd
call fcn.00484073
mov eax, dword [0x5b7bf4]
add esp, 0xc
mov dword [ebp - 0xc4], eax
lea eax, [ebp - 0xc4]
mov dword [0x5b7bf4], eax
lea eax, [ebp - 0xb4]
push edi
push eax
mov dword [ebp - 0xc], 0x5b7bf4
mov dword [ebp - 0xc0], edi
call fcn.0052a5c0
mov ebx, dword [ebp + 8]
pop ecx
test eax, eax
pop ecx
jne 0x4e36f1
cmp word [ebx + 0x11e], di
jne 0x4e353c
push dword [ebx + 8]
lea eax, [ebx + 0xcc]
push dword [ebx + 4]
push eax
call fcn.004e386d
and word [ebx + 0x18a], 0
add esp, 0xc
cmp dword [ebx + 0xe4], 0
lea esi, [ebx + 0x194]
push 8
lea edi, [ebx + 0x1b4]
pop ecx
rep movsd dword es:[edi], dword [esi]
je 0x4e3529
push ebx
call fcn.004e39ac
pop ecx
and word [ebx + 0xec], 0
mov word [ebx + 0x11e], 1
xor edi, edi
mov ax, word [ebp - 0x10]
neg ax
sbb eax, eax
and eax, 6
inc eax
or al, 8
or dword [ebp - 4], eax
cmp word [ebx + 0x8c], di
je 0x4e355b
or dword [ebp - 4], 0x40
mov ax, word [ebp - 4]
cmp word [ebx + 0xec], di
mov word [ebx + 0x128], ax
je 0x4e3598
push ebx
call fcn.004e4748
cmp dword [ebx + 0xa4], edi
lea esi, [ebx + 0xa4]
pop ecx
mov word [ebx + 0xec], di
je 0x4e3598
call fcn.004c096e
add eax, dword [esi]
mov dword [ebx + 0xa8], eax
cmp dword [ebx + 0xe4], edi
je 0x4e36be
push 1
push ebx
call fcn.004e54de
pop ecx
cmp eax, 0x400a0013
pop ecx
mov dword [ebp - 8], eax
je 0x4e3682
cmp word [ebx + 0xec], di
jne 0x4e3682
cmp eax, edi
jne 0x4e368e
mov eax, dword [ebx + 0x1b4]
lea esi, [ebx + 0x1d4]
cmp eax, dword [esi]
jae 0x4e35ef
mov eax, dword [ebx + 0x1b8]
cmp eax, dword [ebx + 0x1d8]
jb 0x4e35fe
push 1
push dword [ebp - 4]
push esi
push ebx
call fcn.005032e6
add esp, 0x10
push edi
push ebx
call fcn.004e5ff6
pop ecx
test ax, ax
pop ecx
je 0x4e3615
mov word [ebx + 0x88], 1
cmp word [ebx + 0x88], di
jne 0x4e368e
cmp word [ebx + 0x8a], di
jne 0x4e368e
cmp word [ebx + 0x126], di
je 0x4e3646
mov eax, dword [ebx + 0x1c]
cmp eax, edi
jne 0x4e363b
xor eax, eax
jmp 0x4e3641
push dword [ebx + 0x20]
call eax
pop ecx
cmp ax, di
jne 0x4e368e
call fcn.004c096e
cmp eax, dword [ebx + 0xa8]
jae 0x4e368e
cmp word [ebx + 0x11e], 1
je 0x4e35a4
mov eax, dword [esi]
cmp eax, dword [ebx + 0x1b4]
jne 0x4e35a4
mov eax, dword [ebx + 0x1d8]
cmp eax, dword [ebx + 0x1b8]
je 0x4e368e
jmp 0x4e35a4
mov word [ebx + 0xec], 1
mov dword [ebp - 8], edi
cmp word [ebx + 0x11e], 2
jne 0x4e36e4
mov eax, dword [ebx + 0x1d4]
cmp eax, dword [ebx + 0x1b4]
jne 0x4e36e4
mov eax, dword [ebx + 0x1d8]
cmp eax, dword [ebx + 0x1b8]
jne 0x4e36e4
cmp dword [ebx + 0x150], edi
jne 0x4e36e4
jmp 0x4e36db
mov ax, word [ebp - 4]
mov word [ebx + 0x11e], 2
mov word [ebx + 0x128], ax
mov word [ebx + 0x124], 1
mov word [ebx + 0x184], 2
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc4]
mov dword [eax], ecx
jmp 0x4e372f
mov eax, dword [ebp - 0xb8]
cmp eax, 0x400a0013
mov dword [ebp - 8], eax
jne 0x4e372f
test byte [ebx + 0x9c], 0x80
je 0x4e372f
mov eax, dword [ebx + 0xe4]
lea esi, [ebx + 0xe4]
cmp eax, edi
mov word [ebx + 0xec], 1
je 0x4e372a
push eax
call fcn.004c325e
pop ecx
mov dword [esi], edi
mov dword [ebp - 8], edi
test byte [ebp - 4], 4
je 0x4e373c
push ebx
call fcn.004d66ec
pop ecx
push ebx
push 0x4dfdfd
call fcn.004840ef
cmp dword [ebp - 8], edi
pop ecx
pop ecx
jne 0x4e3760
cmp word [ebx + 0x88], di
jne 0x4e3760
cmp word [ebx + 0x8a], di
je 0x4e37c0
mov eax, dword [0x5b7bf4]
push edi
mov dword [ebp - 0x114], eax
lea eax, [ebp - 0x114]
mov dword [0x5b7bf4], eax
lea eax, [ebp - 0x104]
push eax
mov dword [ebp - 0x1c], 0x5b7bf4
mov dword [ebp - 0x110], edi
call fcn.0052a5c0
pop ecx
test eax, eax
pop ecx
jne 0x4e37b4
mov ebx, dword [ebp + 8]
push 1
push dword [ebp - 8]
push ebx
call fcn.004e50f8
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x114]
add esp, 0xc
mov dword [eax], ecx
jmp 0x4e37c0
mov eax, dword [ebp - 0x108]
mov ebx, dword [ebp + 8]
mov dword [ebp - 8], eax
cmp word [ebx + 0x124], di
je 0x4e37fb
cmp word [ebx + 0x12c], 1
jle 0x4e37fb
lea eax, [ebx + 0x24]
cmp eax, edi
je 0x4e37f0
mov eax, dword [eax]
cmp eax, edi
je 0x4e37f0
push edi
push 0x20070018
push dword [ebx + 0x28]
call eax
add esp, 0xc
jmp 0x4e37fb
push 0x20070018
call fcn.00401daf
pop ecx
cmp word [ebx + 0x184], 2
je 0x4e3813
cmp dword [ebp - 8], edi
jne 0x4e3813
cmp word [ebx + 0x88], di
je 0x4e3834
push ebx
call fcn.004d3dd5
cmp word [ebx + 0x184], 2
pop ecx
jne 0x4e3834
inc word [ebx + 0x186]
mov word [ebx + 0x184], 3
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1b4]
mov dword [eax], ecx
jmp 0x4e384d
mov eax, dword [ebp - 0x1a8]
mov ebx, dword [ebp + 8]
mov dword [ebp - 8], eax
push dword [ebp - 0x14]
push dword [ebx + 0x10]
call fcn.004876c0
cmp dword [ebp - 8], edi
pop ecx
pop ecx
je 0x4e3868
push dword [ebp - 8]
call fcn.00401daf
pop ecx
pop edi
pop esi
pop ebx
leave
ret