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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
cmp dword [0x103c2d60], 1
push ebx
push esi
push edi
jne 0x10041884
cmp byte [0x1035ef13], 1
jne 0x100417ca
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
mov ecx, 0x3e8
div ecx
mov byte [0x1035ef13], 0
mov dword [0x1035ed3c], eax
jmp 0x10041edf
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
mov edi, 0x3e8
xor edx, edx
mov ecx, edi
div ecx
sub eax, dword [0x1035ed3c]
cmp eax, 5
jbe 0x10041edf
cmp byte [0x100a52ac], 1
je 0x10041edf
push 0
call dword [sym.imp.MSVCR100.dll__time64]
push eax
call dword [sym.imp.MSVCR100.dll_srand]
pop ecx
pop ecx
call fcn.100383dc
call esi
xor edx, edx
div edi
mov esi, dword [sym.imp.MSVCR100.dll_rand]
mov dword [0x1035ed3c], eax
call esi
push 5
pop ecx
cdq
idiv ecx
push ecx
push ecx
mov dword [esp + 0x30], edx
fild dword [esp + 0x30]
fadd dword [0x1035edc8]
fsub qword [0x1009dae8]
fstp dword [esp + 0x30]
fld dword [esp + 0x30]
fstp dword [esp + 4]
fldz
fstp dword [esp]
call esi
push 5
cdq
pop ecx
idiv ecx
push ecx
mov dword [esp + 0x34], edx
fild dword [esp + 0x34]
fadd dword [0x1035edc4]
fsub qword [0x1009dae8]
fstp dword [esp + 0x34]
fld dword [esp + 0x34]
fstp dword [esp]
call fcn.10039ece
add esp, 0xc
jmp 0x10041edf
mov ebx, dword [0x2fb7ac4]
test ebx, ebx
je 0x10041edf
mov eax, dword [ebx + 0x1d20]
mov ecx, 0xd71444
mov dword [esp + 0x10], eax
call fcn.10006671
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
mov dword [esp + 0x28], edi
call esi
test edi, edi
je 0x10041e96
fld dword [ebx + 0x1f60]
mov dword [0x103d778c], eax
movzx eax, word [edi + 0x14]
mov dword [esp + 0x24], eax
call fcn.10082ff0
mov dword [esp + 0x1c], eax
mov eax, ebx
add eax, 0x1f68
mov dword [esp + 0x14], eax
fld dword [eax]
call fcn.10082ff0
cmp dword [0x103c2c88], 0
mov dword [esp + 0x18], eax
jne 0x10041bd6
cmp byte [0x100a52ac], 1
je 0x10041edf
mov eax, dword [0x1035f990]
cmp eax, 8
jge 0x1004192c
mov ecx, ebx
mov ecx, dword [ecx + 0x1d44]
mov dword [eax*4 + 0x1035f800], ecx
inc dword [0x1035f990]
jmp 0x10041a12
mov eax, dword [0x1035f800]
mov ecx, 0x1035f800
cmp dword [ecx], eax
jne 0x100419c2
add ecx, 4
cmp ecx, 0x1035f820
jl 0x10041936
test eax, eax
je 0x1004195b
cmp eax, 0xff
je 0x1004195b
cmp eax, 0xfe
jne 0x100419c2
xor edi, edi
inc edi
cmp dword [0x10111788], edi
jne 0x10041998
fild dword [esp + 0x18]
push ecx
push ecx
fstp dword [esp + 4]
fild dword [esp + 0x24]
fstp dword [esp]
call fcn.1003996e
push dword [esp + 0x2c]
xor ecx, ecx
push 0xffffffffffffffff
call fcn.10039a9d
add esp, 0x10
mov dword [0x10111788], 2
jmp 0x100419b6
mov eax, dword [esp + 0x10]
mov dword [0x1035eed4], eax
call esi
push 0
mov dword [0x1035ed48], eax
call fcn.10037d26
pop ecx
mov dword [0x10111788], edi
and dword [0x1035f990], 0
jmp 0x10041edf
mov eax, dword [0x1035f804]
mov dword [0x1035f800], eax
mov eax, dword [0x1035f808]
mov dword [0x1035f804], eax
mov eax, dword [0x1035f80c]
mov dword [0x1035f808], eax
mov eax, dword [0x1035f810]
mov dword [0x1035f80c], eax
mov eax, dword [0x1035f814]
mov dword [0x1035f810], eax
mov eax, dword [0x1035f818]
mov dword [0x1035f814], eax
mov eax, dword [0x1035f81c]
mov dword [0x1035f818], eax
mov dword [0x1035f990], 7
cmp dword [0x1035ef08], 2
je 0x10041a22
and dword [0x101117c4], 0
cmp byte [0x1035ef13], 1
jne 0x10041a51
mov dword [0x10111788], 1
mov byte [0x1035ef13], 0
call esi
xor edx, edx
mov ecx, 0x3e8
div ecx
mov dword [0x1035ed3c], eax
jmp 0x10041edf
call esi
mov edi, 0x3e8
xor edx, edx
mov ecx, edi
div ecx
sub eax, dword [0x1035ed3c]
cmp eax, 0xf
jbe 0x10041edf
mov eax, dword [esp + 0x28]
xor ebx, ebx
inc ebx
cmp dword [eax + 0x610], ebx
jle 0x10041edf
call esi
xor edx, edx
div edi
mov dword [0x1035ed3c], eax
mov eax, dword [esp + 0x10]
mov dword [0x1035eed4], eax
call esi
mov dword [0x1035ed48], eax
mov al, byte [0x1035ef2a]
cmp dword [0x103c2c84], ebx
jne 0x10041b1c
test al, al
jne 0x10041b1c
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
push 0xffff
call fcn.10039b8d
push 0x10097c64
mov dword [0x10111788], ebx
call fcn.100060fb
add esp, 0x14
jmp 0x10041edf
cmp dword [0x103c2d58], ebx
jne 0x10041bbf
test al, al
jne 0x10041bbf
push 0xffff
call fcn.10039b8d
pop ecx
xor esi, esi
mov eax, dword [0x10113488]
lea eax, [eax + esi + 0x44]
push eax
push dword [0x100ded8c]
call dword [sym.imp.USER32.dll_KillTimer]
inc esi
cmp esi, 0xa
jl 0x10041b3d
mov eax, dword [0x10113488]
push fcn.10049457
push 0x12c
add eax, 0x4d
push eax
push dword [0x100ded8c]
mov byte [0x1035ef0e], 0
call dword [sym.imp.USER32.dll_SetTimer]
fld dword [0x1035edc8]
and dword [0x10111c0c], 0
sub esp, 0xc
fstp dword [esp + 8]
mov dword [0x10111788], ebx
fldz
fstp dword [esp + 4]
fld dword [0x1035edc4]
fstp dword [esp]
call fcn.10039ece
push 0x10097c6c
call fcn.100060fb
add esp, 0x10
jmp 0x10041edf
push 0
call fcn.10037d26
fild dword [esp + 0x1c]
fstp dword [esp]
fild dword [esp + 0x20]
jmp 0x10041ed4
mov eax, dword [edi + 0x10a4]
fld dword [eax + 0x288]
sub esp, 0x10
fstp dword [esp + 0xc]
fld dword [eax + 0x280]
mov eax, dword [esp + 0x24]
fstp dword [esp + 8]
fld dword [eax]
fstp dword [esp + 4]
fld dword [ebx + 0x1f60]
fstp dword [esp]
call fcn.1000640b
call fcn.10082ff0
fld dword [edi + 0x107c]
fstp dword [esp + 0xc]
mov dword [esp + 0x30], eax
fld dword [edi + 0x1074]
mov eax, dword [esp + 0x24]
fstp dword [esp + 8]
fld dword [eax]
fstp dword [esp + 4]
fld dword [ebx + 0x1f60]
fstp dword [esp]
call fcn.1000640b
add esp, 0x10
call fcn.10082ff0
cmp eax, 0x1e
jge 0x10041c60
cmp dword [esp + 0x20], 0x1e
jle 0x10041c60
mov byte [0x1035ef13], 1
jmp 0x10041edf
cmp byte [0x1035ef13], 1
je 0x10041a2b
call esi
mov edi, 0x3e8
xor edx, edx
mov ecx, edi
div ecx
sub eax, dword [0x1035ed3c]
cmp eax, 7
jb 0x10041cc7
cmp dword [0x10111788], 1
jne 0x10041cc7
call esi
xor edx, edx
div edi
push dword [esp + 0x24]
xor ecx, ecx
mov dword [0x1035ed3c], eax
mov eax, dword [0x103c4450]
dec eax
push eax
call fcn.10039a9d
mov ecx, dword [0x103c4450]
push 0x37
dec ecx
call fcn.1003a1be
add esp, 0xc
inc dword [0x10111788]
jmp 0x10041edf
call esi
xor edx, edx
mov ecx, edi
div ecx
sub eax, dword [0x1035ed3c]
cmp eax, 1
jb 0x10041d2c
cmp dword [0x10111788], 2
jne 0x10041d2c
call esi
xor edx, edx
div edi
mov dword [0x1035ed3c], eax
mov eax, dword [esp + 0x14]
fld dword [eax]
call fcn.10082ff0
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
push ecx
fstp dword [esp]
fld dword [ebx + 0x1f60]
call fcn.10082ff0
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
push ecx
fstp dword [esp]
call fcn.1003996e
inc dword [0x10111788]
jmp 0x10041edd
call esi
xor edx, edx
mov ecx, edi
div ecx
sub eax, dword [0x1035ed3c]
cmp eax, 1
jb 0x10041edf
cmp dword [0x10111788], 3
jne 0x10041edf
cmp byte [0x100a52ac], 1
je 0x10041edf
cmp dword [0x103c2d64], 1
jne 0x10041e72
mov eax, dword [esp + 0x28]
mov edi, dword [eax + 0x10a4]
fld dword [edi + 0x280]
call fcn.10082ff0
fld dword [edi + 0x288]
mov dword [0x1035ee84], eax
call fcn.10082ff0
fild dword [esp + 0x18]
sub esp, 0x10
mov dword [0x1035ee88], eax
fstp dword [esp + 0xc]
fild dword [esp + 0x2c]
fstp dword [esp + 8]
fild dword [0x1035ee88]
fstp dword [esp + 4]
fild dword [0x1035ee84]
fstp dword [esp]
call fcn.1000640b
fcomp qword [0x1009da28]
add esp, 0x10
sub esp, 0xc
fnstsw ax
test ah, 1
jne 0x10041dda
fld dword [0x1009db68]
jmp 0x10041de0
fld dword [0x1009db64]
fstp dword [esp + 8]
fild dword [0x1035ee88]
fstp dword [esp + 4]
fild dword [0x1035ee84]
fstp dword [esp]
call fcn.1000658f
mov dword [esp + 0x38], edx
fld dword [esp + 0x38]
add esp, 0xc
mov dword [esp + 0x28], eax
call fcn.10082ff0
fld dword [esp + 0x28]
mov dword [0x1035ee8c], eax
call fcn.10082ff0
mov dword [0x1035ee90], eax
mov eax, dword [esp + 0x10]
mov dword [0x1035edf4], eax
call esi
mov dword [0x1035ed4c], eax
mov eax, dword [0x10113488]
push 0x10041ee6
push 0x12c
add eax, 0x46
push eax
push dword [0x100ded8c]
xor esi, esi
mov dword [0x1035ee94], esi
call dword [sym.imp.USER32.dll_SetTimer]
mov dword [0x10111c14], esi
mov dword [0x10111c0c], esi
mov dword [0x101117c4], 4
jmp 0x10041edf
call esi
xor edx, edx
div edi
mov dword [0x1035ed3c], eax
mov eax, dword [esp + 0x10]
mov dword [0x1035eed4], eax
call esi
push 0
mov dword [0x1035ed48], eax
call fcn.10037d26
jmp 0x10041ede
sub eax, dword [0x103d778c]
cmp eax, 0x2710
jb 0x10041edf
call esi
fld dword [ebx + 0x1f68]
mov dword [0x103d778c], eax
call fcn.10082ff0
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
push ecx
fstp dword [esp]
fld dword [ebx + 0x1f60]
call fcn.10082ff0
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
push ecx
fstp dword [esp]
call fcn.1003996e
pop ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret