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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
xor esi, esi
push edi
mov edi, ecx
cmp dword [ebp + 8], esi
je 0x4079fc
push dword [edi + 8]
push dword [0x50b230]
call fcn.004357f9
push eax
push dword [ebp + 8]
push str.::EnsureVisible__i___s
push 4
call fcn.0044def7
mov eax, dword [edi + 8]
add esp, 0x10
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push 1
mov ebx, 0x1104
push ebx
push dword [0x50b230]
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, eax
jne 0x4078da
push str.not_expanded____no_need_at_all
push 4
call fcn.0044def7
pop ecx
pop ecx
jmp 0x407ac7
mov ecx, dword [ebp - 0x10]
cmp ecx, esi
mov eax, dword [0x50b1f4]
jl 0x4078f2
cmp dword [ebp - 8], eax
jg 0x4078f2
push str.already_in_visible_range____no_need_to_move
jmp 0x4078cc
cmp ecx, eax
jle 0x4078fd
sub eax, dword [ebp - 8]
mov esi, eax
jmp 0x407906
cmp dword [ebp - 8], esi
jge 0x407906
neg ecx
mov esi, ecx
push esi
push str.NeededMove_is__i
push 4
call fcn.0044def7
add esp, 0xc
test esi, esi
je 0x407ac7
push dword [0x50b2cc]
push dword [0x4a2af4]
push str.g_FirstHighlightedItemTop_i_g_LastHighlightedItemBottom_i
push 4
call fcn.0044def7
mov eax, dword [0x4a2af4]
add esp, 0x10
cmp eax, 0x7d00
je 0x40796c
add eax, esi
jns 0x407953
push str.move_would_bring_first_hl_item_below_zero____nope
jmp 0x4078cc
mov eax, dword [0x50b2cc]
add eax, esi
cmp eax, dword [0x50b1f4]
jle 0x40796c
push str.move_would_bring_last_hl_item_below_height____nope
jmp 0x4078cc
push dword [0x50bb90]
call fcn.004345eb
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebp + 8]
sub eax, dword [ecx + 0xfe8]
cmp eax, 0x2710
jb 0x4079a6
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebp + 8]
sub eax, dword [ecx + 0xfe4]
cmp eax, 0x2710
jae 0x4079e9
mov eax, dword [0x50bb90]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push 1
push ebx
push dword [0x50b230]
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [ebp - 0x10]
add eax, esi
jns 0x4079d2
push str.move_would_bring_first_selected_item_below_zero____nope
jmp 0x4078cc
mov eax, dword [ebp - 8]
add esi, eax
cmp esi, dword [0x50b1f4]
jle 0x4079e9
push str.move_would_bring_first_selected_item_below_height____nope
jmp 0x4078cc
push dword [edi + 8]
push dword [0x50b230]
call fcn.0043b24f
jmp 0x407ac7
lea eax, [ebp - 0x14]
push eax
push dword [0x50b230]
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x10]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
mov dword [ebp - 4], eax
mov eax, dword [edi + 8]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push 1
mov ebx, 0x1104
push ebx
push dword [0x50b230]
call esi
test eax, eax
je 0x407ac7
cmp dword [ebp - 0x10], 0
mov edi, dword [edi + 8]
mov dword [ebp + 8], edi
push edi
jge 0x407a9f
push 7
push 0x110a
push dword [0x50b230]
call esi
test eax, eax
je 0x407ab9
mov dword [ebp + 8], eax
jmp 0x407ab9
lea eax, [ebp - 0x24]
push eax
push 1
push ebx
push dword [0x50b230]
mov dword [ebp - 0x24], edi
call esi
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x14]
jle 0x407ab6
lea eax, [ebp - 0x34]
push eax
push 1
push ebx
push dword [0x50b230]
mov dword [ebp - 0x34], edi
call esi
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
add eax, ecx
cmp dword [ebp - 0x28], eax
jg 0x407ab9
mov dword [ebp + 8], edi
push edi
push 6
push 0x110a
push dword [0x50b230]
call esi
mov edi, eax
test edi, edi
jne 0x407a62
jmp 0x407ab9
mov dword [ebp + 8], edi
push dword [ebp + 8]
push dword [0x50b230]
call fcn.0042e7cf
pop edi
pop esi
pop ebx
leave
ret 4