Function at 0x417410
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x38
push esi
xor esi, esi
cmp eax, esi
push edi
mov dword [esp + 0x10], esi
je 0x417437
mov ecx, dword [eax]
mov dword [0x68c18c], ecx
mov eax, dword [eax + 4]
mov dword [0x68c190], eax
jmp 0x417442
mov eax, dword [0x68c190]
mov ecx, dword [0x68c18c]
shr eax, 0x10
movsx eax, ax
mov edx, ecx
shr edx, 0x10
movsx edx, dx
sub eax, edx
sub eax, 4
mov dword [esp + 0x18], eax
movsx eax, cx
add eax, 2
mov dword [esp + 0xc], eax
mov eax, 0x68c18c
mov edi, ebx
call fcn.005106f0
cmp dword [0x68c17c], esi
mov dword [esp + 8], esi
jle 0x417586
nop
mov ecx, dword [0x68c180]
mov edi, dword [esi + ecx]
test edi, edi
jne 0x4174ac
movzx eax, word [esi + ecx + 4]
push eax
call fcn.004170e0
mov ecx, dword [0x68c180]
mov edi, eax
mov dword [esi + ecx], edi
mov ecx, dword [0x68c180]
add esp, 4
cmp dword [edi + 0x10], 0
je 0x4174f8
mov edx, dword [esi + ecx]
push edx
mov ecx, ebx
call fcn.00467be0
mov ecx, dword [edi + 0x30]
mov eax, dword [edi + 0x34]
lea eax, [eax + ecx + 2]
mov ecx, dword [esp + 0x1c]
add esp, 4
cmp eax, ecx
jle 0x4174d4
mov eax, ecx
cmp eax, dword [0x68c194]
jle 0x4174e1
mov dword [0x68c194], eax
mov edi, dword [edi + 0x30]
cmp edi, dword [0x68c198]
mov ecx, dword [0x68c180]
jle 0x4174f8
mov dword [0x68c198], edi
movsx eax, word [0x68c18c]
mov edi, dword [esi + ecx]
lea edx, [eax + 2]
mov eax, dword [esp + 0xc]
cmp eax, edx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x14], edx
jle 0x417535
mov edx, dword [edi + 0x24]
movsx edi, word [0x68c190]
add edx, eax
sub edi, 2
cmp edx, edi
jl 0x417535
mov eax, dword [esp + 0x14]
add dword [esp + 0x10], 1
mov dword [esp + 0xc], eax
mov edx, dword [esp + 0x10]
mov dword [esi + ecx + 8], edx
mov ecx, dword [0x68c180]
mov word [esi + ecx + 0xc], ax
mov ecx, dword [0x68c194]
imul ecx, edx
mov edx, dword [0x68c180]
add ecx, 2
mov word [esi + edx + 0xe], cx
mov ecx, dword [esp + 0x1c]
add eax, dword [ecx + 0x24]
add esi, 0x10
mov dword [esp + 0xc], eax
mov eax, dword [esp + 8]
add eax, 1
cmp eax, dword [0x68c17c]
mov dword [esp + 8], eax
jl 0x417480
xor esi, esi
mov ecx, dword [0x68c1b4]
mov eax, dword [0x68c1b8]
cmp ecx, eax
je 0x41759f
cmp dword [0x68c1c0], esi
je 0x41759f
mov ecx, eax
movsx edx, word [0x68c18e]
movsx eax, word [0x68c192]
sub eax, edx
sub eax, 4
cdq
idiv dword [0x68c194]
mov dword [0x68c1a0], eax
call fcn.00416bc0
cmp dword [0x68c17c], esi
mov dword [esp + 8], esi
jle 0x4177d2
mov ecx, dword [0x68c19c]
mov edx, dword [0x68c180]
xor edi, edi
mov dword [esp + 0xc], edi
jmp 0x4175f0
mov eax, dword [edi + edx + 8]
cmp eax, ecx
jl 0x4177b2
mov esi, dword [0x68c1a0]
add esi, ecx
cmp eax, esi
jge 0x4177b2
imul ecx, dword [0x68c194]
movsx eax, word [edi + edx + 0xe]
mov esi, dword [esp + 8]
sub eax, ecx
cmp esi, dword [0x68c1b4]
mov ecx, dword [edi + edx]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
jl 0x417641
cmp esi, dword [0x68c1b8]
mov dword [esp + 0x10], 1
jl 0x417649
mov dword [esp + 0x10], 0
movzx edx, word [edi + edx + 0xc]
mov word [ebx + 0x1c], dx
movzx edx, word [0x68c198]
add dx, word [0x68c18e]
add dx, ax
mov word [ebx + 0x1e], dx
mov edx, dword [esp + 8]
cmp edx, dword [0x68c1bc]
mov edx, 1
mov word [ebx + 0x14], dx
mov word [ebx + 0x16], dx
jge 0x417686
mov word [ebx + 0x12], dx
jmp 0x41768c
mov word [ebx + 0x12], 0x100
cmp dword [esp + 0x10], 0
je 0x417738
mov ecx, dword [0x68c180]
mov dx, word [edi + ecx + 0xc]
mov si, word [0x68c18e]
add si, ax
mov word [esp + 0x20], dx
mov edx, dword [0x68c194]
mov word [esp + 0x22], si
mov eax, dword [esp + 0x22]
add edx, eax
mov eax, dword [edi + ecx]
mov di, word [eax + 0x24]
mov eax, dword [ebx]
mov ecx, dword [eax + 0x80]
add di, word [esp + 0x20]
push ecx
mov word [esp + 0x2a], dx
mov word [esp + 0x28], di
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
test eax, eax
mov dword [esp + 0x1c], eax
je 0x41772c
movsx edx, word [esp + 0x20]
mov dword [esp + 0x30], edx
movsx ecx, di
mov dword [esp + 0x38], ecx
movsx ecx, word [esp + 0x26]
movsx edx, si
push eax
mov eax, dword [ebx]
mov dword [esp + 0x38], edx
lea edx, [esp + 0x34]
mov dword [esp + 0x40], ecx
mov ecx, dword [eax + 8]
push edx
push ecx
call dword [sym.imp.USER32.dll_FillRect]
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov edi, dword [esp + 0xc]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov edx, dword [0x68c180]
mov dx, word [edi + edx + 4]
and dx, 0xf000
cmp dx, 0x6000
jne 0x41779a
mov si, word [0x68c18e]
mov dx, word [ebx + 0x1c]
add si, ax
mov ax, word [ecx + 0x24]
add ax, dx
mov word [esp + 0x28], dx
mov edx, dword [0x68c194]
mov word [esp + 0x2a], si
mov word [esp + 0x2c], ax
mov eax, dword [esp + 0x2a]
add edx, eax
mov word [esp + 0x2e], dx
mov edx, dword [esp + 0x10]
push edx
push ecx
lea ecx, [esp + 0x30]
mov esi, ebx
call fcn.004d4270
add esp, 8
jmp 0x4177a6
push 0
mov edx, ebx
call fcn.004679e0
add esp, 4
mov edx, dword [0x68c180]
mov ecx, dword [0x68c19c]
mov eax, dword [esp + 8]
add eax, 1
add edi, 0x10
cmp eax, dword [0x68c17c]
mov dword [esp + 8], eax
mov dword [esp + 0xc], edi
jl 0x4175f0
xor esi, esi
mov eax, dword [0x68c1b4]
cmp eax, dword [0x68c1b8]
jne 0x4178b4
call fcn.00416ce0
cmp dword [0x68c1d8], esi
je 0x4178a8
mov eax, dword [0x68c1b4]
cmp eax, dword [0x68c1b8]
jne 0x4178b4
mov ecx, dword [0x68c1e0]
mov edx, dword [0x68c1dc]
mov edi, 1
push edi
push ecx
push edx
mov eax, ebx
mov dword [0x68c1d8], edi
call fcn.00510f30
mov eax, dword [0x692a7c]
add esp, 0xc
cmp eax, esi
jne 0x417897
push 0x685a18
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x417867
push 0x68c1e8
mov dword [0x692a7c], edi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edi, 0x1f4
mov esi, 0x68c1e8
call fcn.0053b1d0
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov dword [0x692a7c], 2
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x68c1e8], eax
mov dword [0x68c1ec], esi
mov edi, 0x1f4
mov esi, 0x68c1e8
call fcn.0053b1d0
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp eax, edi
jne 0x417871
push 0x68c1e8
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
jmp 0x417882
mov dword [0x68c1e8], esi
mov dword [0x68c1ec], esi
pop edi
pop esi
mov esp, ebp
pop ebp
ret