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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
mov eax, dword [0x100a509c]
xor eax, esp
mov dword [esp + 0x40], eax
push ebx
mov ebx, dword [0x2fb7ac4]
push esi
push edi
xor edi, edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x14], edi
mov dword [esp + 0x20], edi
cmp ebx, edi
je 0x10041696
call fcn.10072f3e
mov edx, dword [ebx + 0x1d20]
or dword [0x1035eee0], 0xffffffff
mov ecx, 0xd71444
mov eax, edx
call fcn.10006671
mov esi, eax
test esi, esi
je 0x10041167
movzx ecx, word [esi + 0x14]
mov edi, dword [esi + 0x5f4]
mov eax, dword [esi + 0x610]
mov dword [esp + 0x20], ecx
mov ecx, dword [esi + 0x3b0]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x14], eax
cmp ecx, 0x270f
jg 0x10041116
push 0xffff
call fcn.10039b8d
jmp 0x10041695
test edi, edi
jne 0x10041139
cmp dword [0x2f92a08], 0xa7f9
jne 0x10041139
cmp eax, 0xee6b280
jle 0x10041139
push 0
call fcn.10037d26
jmp 0x10041695
fild dword [esp + 0x1c]
fidiv dword [esp + 0x14]
fcomp qword [0x1009db70]
fnstsw ax
test ah, 5
jp 0x10041194
cmp ecx, 0x2af9
jl 0x1004115e
cmp ecx, 0x2b35
jle 0x10041194
push esi
call fcn.10047260
pop ecx
jmp 0x10041194
cmp dword [0x103d0f48], edi
je 0x10041194
cmp byte [0x1035ef2a], 1
jne 0x10041194
cmp dword [0x103d2844], edi
jne 0x10041194
mov ecx, 0xd740a0
mov eax, edx
call fcn.10006671
test eax, eax
jne 0x10041696
cmp dword [0x103c2c84], 1
jne 0x10041696
test esi, esi
je 0x10041204
fld dword [0x1035edc8]
sub esp, 0x10
fstp dword [esp + 0xc]
fld dword [0x1035edc4]
fstp dword [esp + 8]
fld dword [ebx + 0x1f68]
fstp dword [esp + 4]
fld dword [ebx + 0x1f60]
fstp dword [esp]
call fcn.1000640b
add esp, 0x10
call fcn.10082ff0
cmp eax, dword [0x103c2d4c]
jge 0x10041223
cmp dword [0x103c423c], 1
mov byte [0x1031ecff], 1
jne 0x1004122d
cmp edi, dword [0x10127464]
jge 0x1004122d
cmp edi, dword [0x103c4240]
jge 0x1004122d
call fcn.100416b9
cmp dword [0x103c2c8c], 1
mov byte [0x1031ecff], 0
jne 0x10041223
call fcn.10040e57
jmp 0x10041696
call fcn.10040d97
jmp 0x10041696
cmp dword [0x103c2c84], 1
jne 0x100413bc
cmp dword [0x103c2c88], 1
jne 0x100413bc
fld dword [esi + 0x1074]
call fcn.10082ff0
fld dword [esi + 0x107c]
mov dword [esp + 0x10], eax
call fcn.10082ff0
mov esi, dword [esi + 0x10a4]
fld dword [esi + 0x280]
mov dword [esp + 0x18], eax
call fcn.10082ff0
fld dword [esi + 0x288]
mov dword [esp + 0x24], eax
call fcn.10082ff0
fld dword [0x1035edc8]
sub esp, 0x10
fstp dword [esp + 0xc]
mov dword [esp + 0x38], eax
fld dword [0x1035edc4]
fstp dword [esp + 8]
fld dword [ebx + 0x1f68]
fstp dword [esp + 4]
fld dword [ebx + 0x1f60]
fstp dword [esp]
call fcn.1000640b
fcomp dword [0x1009daf4]
add esp, 0x10
fnstsw ax
test ah, 1
jne 0x1004133e
mov eax, dword [0x10113488]
and dword [0x10111c14], 0
and dword [0x10111c0c], 0
push fcn.10037595
push 0x1f4
add eax, 0x4d
push eax
push dword [0x100ded8c]
call dword [sym.imp.USER32.dll_SetTimer]
fld dword [0x1035edc8]
sub esp, 0xc
fstp dword [esp + 8]
fldz
fstp dword [esp + 4]
fld dword [0x1035edc4]
fstp dword [esp]
call fcn.10039ece
add esp, 0xc
push 0xffff
call fcn.10039b8d
mov dword [0x10111788], 1
mov dword [esp], 0x10097c2c
call fcn.100060fb
jmp 0x10041695
fld dword [ebx + 0x1f68]
sub esp, 0x10
fstp dword [esp + 0xc]
fld dword [ebx + 0x1f60]
fstp dword [esp + 8]
fild dword [esp + 0x28]
fstp dword [esp + 4]
fild dword [esp + 0x20]
fstp dword [esp]
call fcn.1000640b
fild dword [0x1035ede8]
add esp, 0x10
fcompp
fnstsw ax
test ah, 5
jp 0x100413bc
fld dword [ebx + 0x1f68]
sub esp, 0x10
fstp dword [esp + 0xc]
fld dword [ebx + 0x1f60]
fstp dword [esp + 8]
fild dword [esp + 0x38]
fstp dword [esp + 4]
fild dword [esp + 0x34]
fstp dword [esp]
call fcn.1000640b
fild dword [0x1035ede8]
add esp, 0x10
fcompp
fnstsw ax
test ah, 5
jnp 0x1004112d
cmp dword [0x103c4448], 1
jne 0x1004145c
xor edi, edi
lea esi, [esp + 0x2c]
mov ecx, edi
call fcn.10006368
mov eax, esi
mov esi, dword [sym.imp.MSVCR100.dll_strcmp]
push 0x100975cc
push eax
call esi
pop ecx
pop ecx
test eax, eax
je 0x10041406
lea eax, [esp + 0x2c]
push 0x100975d8
push eax
call esi
pop ecx
pop ecx
test eax, eax
je 0x10041406
inc edi
cmp edi, 0x14
jl 0x100413cb
jmp 0x1004145c
cmp dword [esp + 0x44], 0
je 0x10041423
cmp dword [esp + 0x44], 0x1770
jbe 0x10041455
mov byte [0x1031ecff], 0
jmp 0x10041696
fild dword [esp + 0x1c]
fidiv dword [esp + 0x14]
fild dword [0x103c444c]
fdiv qword [0x1009d9f0]
fcompp
fnstsw ax
test ah, 0x41
jp 0x10041455
push 0xb
mov ecx, edi
call fcn.1003a1be
mov byte [0x1031ecff], 0
jmp 0x10041695
mov byte [0x1031ecff], 1
cmp dword [0x103c2ffc], 1
jne 0x10041483
cmp byte [0x1035ef0d], 0
jne 0x10041483
cmp dword [0x103c439c], 0
jg 0x10041483
push 2
call fcn.10037d26
jmp 0x10041570
cmp dword [0x103c43a0], 1
jne 0x10041571
xor eax, eax
mov edi, 0x270f
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], eax
cmp dword [0x103cbc1c], eax
jle 0x10041531
mov ecx, dword [esp + 0x20]
mov esi, eax
mov eax, dword [0x103cc3b4]
mov eax, dword [eax + esi*4]
cmp dword [eax], ecx
je 0x1004152c
mov eax, dword [0x103cbc14]
mov eax, dword [eax + esi*4]
cmp dword [eax], 0x2c
jne 0x10041519
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [0x103ccdac]
mov ecx, dword [ecx + esi*4]
sub eax, dword [ecx]
cmp eax, 0x1388
ja 0x10041519
mov eax, dword [0x103cc3b4]
mov eax, dword [eax + esi*4]
push edi
push dword [eax]
call fcn.10048a59
mov esi, eax
pop ecx
pop ecx
test esi, esi
jle 0x10041519
mov ecx, 0xd71444
call fcn.10006671
test eax, eax
je 0x10041519
fld dword [eax + 0x35c]
call fcn.10082ff0
mov edi, eax
mov dword [esp + 0x10], esi
mov eax, dword [esp + 0x18]
inc eax
mov dword [esp + 0x18], eax
cmp eax, dword [0x103cbc1c]
jl 0x100414ab
jmp 0x10041531
mov edi, 0x270f
cmp edi, dword [0x1035ede8]
jg 0x10041571
push dword [esp + 0x10]
mov esi, 0x10111128
push 0x10097c40
push esi
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0xc
push esi
call fcn.100060fb
pop ecx
push dword [esp + 0x10]
call fcn.10039b8d
pop ecx
mov ecx, dword [0x103c4450]
push 0
dec ecx
call fcn.1003a1be
pop ecx
mov eax, dword [ebx + 0x2a50]
cmp eax, 8
je 0x1004158f
cmp eax, 9
je 0x1004158f
cmp eax, 0xb
je 0x1004158f
cmp eax, 0xd
jne 0x10041677
xor ebx, ebx
cmp dword [0x103d600c], ebx
jle 0x10041677
xor edi, edi
lea esi, [esp + 0x2c]
mov ecx, edi
call fcn.10006368
mov eax, dword [0x103d6004]
push dword [eax + ebx*4]
mov eax, esi
mov esi, dword [sym.imp.MSVCR100.dll_strcmp]
push eax
call esi
pop ecx
pop ecx
test eax, eax
jne 0x10041660
cmp dword [esp + 0x44], eax
jne 0x10041660
lea eax, [esp + 0x2c]
push 0x10097c54
push eax
call esi
pop ecx
pop ecx
test eax, eax
jne 0x10041631
xor esi, esi
cmp dword [0x103cbc1c], esi
jle 0x10041660
mov eax, dword [0x103cc3b4]
mov eax, dword [eax + esi*4]
mov ecx, dword [esp + 0x20]
cmp dword [eax], ecx
jne 0x10041626
mov eax, dword [0x103cbc14]
mov eax, dword [eax + esi*4]
cmp dword [eax], 0x2c
jne 0x10041626
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [0x103ccdac]
mov ecx, dword [ecx + esi*4]
sub eax, dword [ecx]
cmp eax, 0x1388
jbe 0x100416a8
inc esi
cmp esi, dword [0x103cbc1c]
jl 0x100415ed
jmp 0x10041660
lea eax, [esp + 0x2c]
push 0x10097c5c
push eax
call esi
pop ecx
pop ecx
test eax, eax
jne 0x100416a8
fild dword [esp + 0x1c]
fidiv dword [esp + 0x14]
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
fcomp qword [0x1009db18]
fnstsw ax
test ah, 1
je 0x100416a8
inc edi
cmp edi, 0x14
jl 0x1004159f
inc ebx
cmp ebx, dword [0x103d600c]
jl 0x1004159d
call fcn.10040f83
cmp al, 1
je 0x10041696
mov ecx, dword [0x103c4450]
push 0
dec ecx
call fcn.1003a1be
or dword [0x100a52a0], 0xffffffff
pop ecx
mov ecx, dword [esp + 0x4c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10082395
mov esp, ebp
pop ebp
ret
push 0xb
mov ecx, edi
call fcn.1003a1be
mov dword [0x100a52a0], edi
jmp 0x10041695