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

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xc
push 0
push 0
dec ecx
jne 0x4f04dc
push ebx
push esi
push edi
mov ebx, edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x4f091e
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, ebx
mov eax, dword [ebp - 4]
call fcn.0054e378
mov eax, dword [ebp - 4]
cmp byte [eax + 0x2d8], 0
je 0x4f08d4
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0x2e6]
sub al, 2
jae 0x4f053e
lea edx, [ebp - 0x34]
mov eax, dword [ebp - 4]
call fcn.00546678
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 4]
add eax, 0x2e0
call fcn.004c1644
jmp 0x4f0572
call sub.KERNEL32.DLL_GetTickCount
mov edx, dword [ebp - 4]
sub eax, dword [edx + 0x2dc]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x304]
jb 0x4f0564
mov eax, dword [ebp - 4]
add eax, 0x2e0
call fcn.004c1264
call sub.KERNEL32.DLL_GetTickCount
mov edx, dword [ebp - 4]
mov dword [edx + 0x2dc], eax
movzx eax, word [ebx]
sub ax, 8
je 0x4f05be
dec ax
je 0x4f058f
sub ax, 0x12
jne 0x4f0759
jmp 0x4f08d4
mov eax, dword [ebp - 4]
cmp byte [eax + 0x2d9], 0
je 0x4f08d4
mov eax, dword [ebp - 4]
call fcn.004eef70
test al, al
je 0x4f08d4
xor edx, edx
mov eax, dword [ebp - 4]
call fcn.004eef94
jmp 0x4f08d4
push ebp
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x10]
call fcn.004f03ec
pop ecx
test al, al
je 0x4f05e1
push ebp
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
call fcn.004f0430
pop ecx
jmp 0x4f0743
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0x2e6]
sub al, 2
jae 0x4f0613
lea edx, [ebp - 0x38]
mov eax, dword [ebp - 4]
call fcn.00546678
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x4f060c
sub eax, 4
mov eax, dword [eax]
test eax, eax
setg al
jmp 0x4f0615
xor eax, eax
test al, al
je 0x4f06fb
lea edx, [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.00546678
mov esi, dword [ebp - 0x10]
jmp 0x4f062e
dec esi
mov edx, esi
mov eax, dword [ebp - 0xc]
call fcn.004aa060
cmp al, 2
je 0x4f062d
lea eax, [ebp - 8]
push eax
mov ecx, esi
dec ecx
mov edx, 1
mov eax, dword [ebp - 0xc]
call fcn.004c2668
push 0
push 0xffffffffffffffff
push 0x14e
mov eax, dword [ebp - 4]
call fcn.0054f634
push eax
call sub.USER32.DLL_SendMessageW
lea eax, [ebp - 0x44]
push eax
mov edx, dword [ebp - 0x14]
inc edx
mov ecx, closesocket
mov eax, dword [ebp - 0xc]
call fcn.004c2668
mov ecx, dword [ebp - 0x44]
lea eax, [ebp - 0x40]
mov edx, dword [ebp - 8]
call fcn.004c2498
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 4]
call fcn.005466b0
mov edi, esi
dec edi
movzx edi, di
mov eax, edi
shl edi, 0x10
or eax, edi
push eax
push 0
push 0x142
mov eax, dword [ebp - 4]
call fcn.0054f634
push eax
call sub.USER32.DLL_SendMessageW
lea edx, [ebp - 0x48]
mov eax, dword [ebp - 4]
call fcn.00546678
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 4]
add eax, 0x2e0
call fcn.004c1644
jmp 0x4f0743
mov eax, dword [ebp - 4]
mov esi, dword [eax + 0x2e0]
test esi, esi
je 0x4f06e7
sub esi, 4
mov esi, dword [esi]
mov eax, dword [ebp - 4]
add eax, 0x2e0
mov ecx, 1
mov edx, esi
call fcn.004c26b0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2e0]
call fcn.004c1730
mov edx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2e0]
call fcn.004aa060
cmp al, 2
je 0x4f06d5
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2e0]
test eax, eax
je 0x4f072f
sub eax, 4
mov eax, dword [eax]
mov edx, dword [ebp - 4]
add edx, 0x2e0
mov ecx, 1
xchg edx, eax
call fcn.004c26b0
mov word [ebx], 0
mov eax, dword [ebp - 4]
mov si, 0xffaf
call fcn.004bfa18
jmp 0x4f08d4
mov eax, dword [ebp - 4]
cmp byte [eax + 0x2d9], 0
je 0x4f077b
mov eax, dword [ebp - 4]
call fcn.004eef70
test al, al
jne 0x4f077b
mov dl, 1
mov eax, dword [ebp - 4]
call fcn.004eef94
push ebp
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x10]
call fcn.004f03ec
pop ecx
mov eax, dword [ebp - 4]
cmp byte [eax + 0x2e6], 2
jae 0x4f07ae
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2e0]
test eax, eax
je 0x4f07a6
sub eax, 4
mov eax, dword [eax]
cmp eax, dword [ebp - 0x10]
setg al
jmp 0x4f07b0
xor eax, eax
test al, al
je 0x4f081b
mov eax, dword [ebp - 4]
mov esi, dword [eax + 0x2e0]
test esi, esi
je 0x4f07c6
sub esi, 4
mov esi, dword [esi]
lea eax, [ebp - 0x4c]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2e0]
mov ecx, dword [ebp - 0x10]
mov edx, 1
call fcn.004c2668
push dword [ebp - 0x4c]
lea eax, [ebp - 0x50]
movzx edx, word [ebx]
call fcn.004c2254
push dword [ebp - 0x50]
lea eax, [ebp - 0x54]
push eax
mov edx, dword [ebp - 0x14]
inc edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2e0]
mov ecx, esi
call fcn.004c2668
push dword [ebp - 0x54]
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.004c2520
jmp 0x4f083a
lea eax, [ebp - 0x58]
movzx edx, word [ebx]
call fcn.004c2254
mov ecx, dword [ebp - 0x58]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2e0]
lea eax, [ebp - 0xc]
call fcn.004c2498
movzx eax, word [ebx]
cmp ax, 0xd800
jb 0x4f0849
cmp ax, 0xdfff
jbe 0x4f084d
xor eax, eax
jmp 0x4f084f
mov al, 1
test al, al
je 0x4f08c0
push 0
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.0054f634
push eax
lea eax, [ebp - 0x30]
push eax
call sub.USER32.DLL_PeekMessageW
test eax, eax
je 0x4f08d4
cmp dword [ebp - 0x2c], 0x102
jne 0x4f08d4
lea eax, [ebp - 0x60]
movzx edx, word [ebp - 0x28]
call fcn.004c2254
mov ecx, dword [ebp - 0x60]
lea eax, [ebp - 0x5c]
mov edx, dword [ebp - 0xc]
call fcn.004c2498
mov edx, dword [ebp - 0x5c]
mov eax, dword [ebp - 4]
call fcn.004f092c
test al, al
je 0x4f08d4
push 1
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.0054f634
push eax
lea eax, [ebp - 0x30]
push eax
call sub.USER32.DLL_PeekMessageW
mov word [ebx], 0
jmp 0x4f08d4
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.004f092c
test al, al
je 0x4f08d4
mov word [ebx], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4f0925
lea eax, [ebp - 0x60]
mov edx, 6
call fcn.004c12c4
lea eax, [ebp - 0x48]
call fcn.004c1264
lea eax, [ebp - 0x44]
mov edx, 2
call fcn.004c12c4
lea eax, [ebp - 0x38]
mov edx, 2
call fcn.004c12c4
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.004c12c4
ret