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

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor edi, edi
cmp dword [esi + 4], edi
je 0x40c15b
lea eax, [esi + 0x20]
push eax
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.USER32.dll_CopyRect]
mov eax, dword [esi + 8]
mov dword [esp + 0x10], 0xffffffff
cmp eax, edi
je 0x40be77
mov ecx, dword [eax + 0x38]
mov dword [esp + 0x10], ecx
je 0x40be77
push eax
call fcn.004098f0
add esp, 4
mov dword [esi + 8], edi
mov ebp, dword [esi + 0x60]
mov edx, dword [esi + 4]
inc ebp
xor ecx, ecx
mov dword [esi + 0x14], edi
mov dword [esi + 0x60], ebp
mov cx, word [edx + 0x1a]
mov eax, ebp
cmp eax, ecx
mov ebp, 1
jle 0x40bebb
mov cx, word [edx + 0x18]
cmp cx, di
jle 0x40beb8
cmp cx, 0xffff
je 0x40beb8
mov cx, word [esi + 0x2f8]
cmp cx, di
jbe 0x40bed6
dec ecx
mov word [esi + 0x2f8], cx
mov dword [esi + 0x60], ebp
xor ebx, ebx
lea ecx, [esi + 0x74]
mov eax, dword [ecx]
cmp eax, edi
je 0x40beeb
cmp eax, dword [esi + 0x60]
je 0x40bedc
inc ebx
add ecx, 0x20
cmp ebx, 0x14
jl 0x40bec0
jmp 0x40beeb
dec eax
mov dword [esi + 0x60], eax
jmp 0x40bebb
mov eax, ebx
shl eax, 5
mov ecx, dword [eax + esi + 0x8c]
mov dword [esi + 0x14], ecx
mov eax, dword [esi + 0x14]
lea edi, [esi + 0x14]
test eax, eax
jne 0x40bfec
cmp dword [esi + 0x60], ebp
jne 0x40bf07
push edx
call fcn.00409890
add esp, 4
mov edx, dword [esi + 4]
lea ebp, [esi + 8]
push ebp
push edi
push edx
call fcn.00409990
add esp, 0xc
cmp ebx, 0x14
jne 0x40bf47
mov eax, dword [esi + 0x70]
shl eax, 5
mov eax, dword [eax + esi + 0x8c]
test eax, eax
je 0x40bf35
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ebx, dword [esi + 0x70]
cmp ebx, 0x13
jne 0x40bf41
xor eax, eax
jmp 0x40bf44
lea eax, [ebx + 1]
mov dword [esi + 0x70], eax
mov edx, dword [esi + 0x14]
mov ecx, ebx
shl ecx, 5
lea edi, [ecx + esi]
mov dword [edi + 0x8c], edx
mov eax, dword [ebp]
mov ecx, dword [eax + 0x28]
mov dword [edi + 0x78], ecx
mov edx, dword [ebp]
mov eax, dword [edx + 0x2c]
lea edx, [ebx + 4]
mov dword [edi + 0x7c], eax
mov ecx, dword [ebp]
shl edx, 5
mov eax, dword [ecx + 4]
mov dword [edx + esi], eax
mov ecx, dword [ebp]
mov edx, dword [ecx + 8]
mov dword [edi + 0x84], edx
mov dword [edi + 0x88], 0x14
mov eax, dword [esi + 0x60]
mov dword [edi + 0x74], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebp]
mov edx, dword [ecx + 0x34]
lea edx, [edx + edx*4]
lea eax, [eax + edx*2]
mov dword [esi + 0x34], eax
mov ecx, dword [ecx + 0x34]
lea ecx, [ecx + ecx*4]
shl ecx, 1
mov dword [edi + 0x88], ecx
mov edx, dword [ebp]
mov ebp, dword [edx + 0x30]
test ebp, ebp
jl 0x40bfe2
mov eax, dword [esi + 4]
xor ecx, ecx
xor edx, edx
mov ch, byte [eax + ebp*4 + 0x28]
mov dl, byte [eax + ebp*4 + 0x2a]
mov cl, byte [eax + ebp*4 + 0x29]
shl ecx, 8
or ecx, edx
mov dword [edi + 0x90], ecx
jmp 0x40bfec
mov dword [edi + 0x90], 0xffffffff
mov eax, dword [esi + 0x2f4]
test eax, eax
jne 0x40c15b
mov eax, ebx
add ebx, 4
shl eax, 5
shl ebx, 5
mov edx, dword [eax + esi + 0x84]
lea edi, [eax + esi]
lea ebp, [esi + 0x20]
mov eax, dword [edi + 0x7c]
mov ecx, dword [edi + 0x78]
add edx, eax
push edx
mov edx, dword [ebx + esi]
add edx, ecx
push edx
push eax
push ecx
push ebp
call dword [sym.imp.USER32.dll_SetRect]
mov eax, dword [esi + 0x48]
mov ecx, dword [esi + 0x44]
push eax
push ecx
push ebp
call dword [sym.imp.USER32.dll_OffsetRect]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, dword [edi + 0x88]
mov ecx, dword [esp + 0x10]
add edx, eax
sub ecx, 2
mov dword [esi + 0x34], edx
mov eax, dword [edi + 0x90]
mov dword [esi + 0x6c], eax
je 0x40c094
dec ecx
jne 0x40c116
mov ecx, dword [esp + 0x24]
mov ebx, dword [esp + 0x1c]
mov eax, dword [esi + 0x10]
mov edx, dword [esp + 0x20]
push 0
push 0
sub ecx, ebx
push eax
mov eax, dword [esi + 0xc]
push ecx
sub edx, dword [esp + 0x28]
push edx
push 0
push 0
push eax
call fcn.00408010
add esp, 0x20
jmp 0x40c116
cmp eax, 0xffffffff
je 0x40c116
push eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push 0
mov dword [esp + 0x14], eax
call dword [sym.imp.USER32.dll_GetDC]
push eax
mov dword [esp + 0x18], eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ecx, dword [esp + 0x14]
mov ebx, eax
push ecx
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push ebx
call fcn.004079e0
mov edx, dword [esi + 0xc]
add esp, 4
push edx
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push eax
push ecx
push ebx
call dword [sym.imp.USER32.dll_FillRect]
push ebx
call fcn.00407a10
mov edx, dword [esp + 0x18]
add esp, 4
push edx
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
push ebx
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [edi + 0x8c]
mov dword [esi + 0x14], ecx
mov ecx, esi
call fcn.0040c170
mov eax, dword [esi + 8]
test eax, eax
je 0x40c15b
cmp dword [eax + 0x38], 3
jne 0x40c15b
mov eax, dword [esi + 0x24]
mov ebp, dword [ebp]
mov edx, dword [esi + 0xc]
mov ecx, dword [esi + 0x2c]
push eax
push ebp
push edx
mov edx, dword [esi + 0x28]
sub ecx, eax
mov eax, dword [esi + 0x10]
sub edx, ebp
push ecx
push edx
push 0
push 0
push eax
call fcn.00408010
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret