Function at 0x401019
Capabilities:
Check for unmoving mouse cursor
Set current directory

Disassembly:
jmp 0x40ae00
sub esp, 8
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x15c]
test eax, eax
je 0x40ae1d
mov eax, dword [esi + 0x160]
test eax, eax
jne 0x40ae24
mov ecx, esi
call fcn.00401127
mov edi, dword [sym.imp.USER32.dll_GetCursorPos]
lea eax, [esp + 0x10]
push eax
call edi
mov ecx, dword [esp + 0x10]
cmp ecx, 0x280
jle 0x40ae44
mov ecx, 0x280
jmp 0x40ae4a
test ecx, ecx
jge 0x40ae4e
xor ecx, ecx
mov dword [esp + 0x10], ecx
mov eax, dword [esp + 0x14]
cmp eax, 0x1e0
jle 0x40ae60
mov eax, 0x1e0
jmp 0x40ae66
test eax, eax
jge 0x40ae6a
xor eax, eax
mov dword [esp + 0x14], eax
push eax
push ecx
call dword [sym.imp.USER32.dll_SetCursorPos]
mov eax, dword [esi + 0x16c]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
inc eax
and eax, 0x8000001f
mov dword [esi + 0x164], ecx
mov dword [esi + 0x168], edx
jns 0x40ae99
dec eax
or eax, 0xffffffe0
inc eax
xor ecx, ecx
mov dword [esi + 0x16c], eax
call fcn.004145e0
test al, al
je 0x40aec3
mov al, byte [0x437868]
test al, al
jne 0x40aeca
push 0x437860
mov byte [0x437868], 1
call edi
jmp 0x40aeca
mov byte [0x437868], 0
mov eax, dword [esi + 0x2fc]
test eax, eax
jne 0x40b4d1
mov edi, dword [esi + 0x2f8]
inc edi
and edi, 0x800000ff
jns 0x40aeef
dec edi
or edi, 0xffffff00
inc edi
mov ebp, dword [esi + 0x2f4]
xor eax, eax
xor ebx, ebx
mov dword [esi + 0x2f8], edi
test ebp, ebp
jle 0x40af56
mov ecx, dword [esi + 0x160]
add ecx, 4
mov dl, byte [ecx + 0x18]
test dl, dl
je 0x40af4e
mov eax, edi
cdq
idiv dword [ecx + 0x14]
test edx, edx
jne 0x40af2b
mov edx, dword [ecx + 0xc]
inc edx
mov dword [ecx + 0xc], edx
mov eax, dword [ecx + 0x10]
inc eax
mov dword [ecx + 0x10], eax
mov edx, dword [ecx + 8]
mov eax, dword [ecx]
add eax, edx
mov dword [ecx], eax
mov eax, dword [ecx + 0xc]
mov edx, dword [ecx + 4]
add edx, eax
mov dword [ecx + 4], edx
mov eax, dword [ecx + 0x10]
cmp eax, 0xf
jle 0x40af4b
mov byte [ecx + 0x18], 0
lea eax, [ebx + 1]
inc ebx
add ecx, 0x20
cmp ebx, ebp
jl 0x40af0c
mov ecx, edi
mov dword [esi + 0x2f4], eax
and ecx, 0x80000003
jns 0x40af6b
dec ecx
or ecx, 0xfffffffc
inc ecx
je 0x40afb4
and edi, 0x8000000f
jns 0x40af7a
dec edi
or edi, 0xfffffff0
inc edi
cmp edi, 8
jge 0x40af9b
mov edx, dword [esi + 0x188]
inc edx
and edx, 0x8000001f
jns 0x40af93
dec edx
or edx, 0xffffffe0
inc edx
mov dword [esi + 0x188], edx
jmp 0x40afb4
mov eax, dword [esi + 0x188]
dec eax
mov dword [esi + 0x188], eax
jns 0x40afb4
mov dword [esi + 0x188], 0x1f
lea eax, [esp + 0x10]
push 0x437860
push eax
lea ecx, [esi + 0x1ec]
call fcn.00414900
test al, al
je 0x40b05c
push 0
mov ecx, 0x434970
call fcn.00411690
lea ecx, [esi + 0xc4]
lea edx, [esi + 0xa8]
push ecx
push edx
push 0xc
push 0x113
push 0x1e0
push 0x50
push 0x50
lea ecx, [esi + 0x1cc]
call fcn.00414680
lea edi, [esi + 0x138]
lea ebp, [esi + 0xe0]
push edi
push ebp
push 0x14
push 0x5f
push 0x13d
push 0xa0
push 0x42b2dc
lea ecx, [esi + 0x28c]
call fcn.004148c0
push edi
push ebp
push 0x14
push 0x5f
push 0x13d
push 0x190
push 0x42b2e0
lea ecx, [esi + 0x2ac]
call fcn.004148c0
mov dword [esi + 0x2fc], 1
lea eax, [esp + 0x10]
push 0x437860
push eax
lea ecx, [esi + 0x20c]
call fcn.00414900
test al, al
je 0x40b136
push 0
mov ecx, 0x434970
call fcn.00411690
lea ecx, [esi + 0xc4]
lea edx, [esi + 0xa8]
push ecx
push edx
push 0xc
push 0x113
push 0x1e0
push 0x50
push 0x50
lea ecx, [esi + 0x1cc]
call fcn.00414680
lea edi, [esi + 0x138]
lea ebp, [esi + 0xe0]
push edi
push ebp
push 0x14
push 0x5f
push 0x13d
push 0xa0
push 0x42b2e8
lea ecx, [esi + 0x28c]
call fcn.004148c0
push edi
push ebp
push 0x14
push 0x5f
push 0x13d
push 0x190
push 0x42b2ec
lea ecx, [esi + 0x2ac]
call fcn.004148c0
lea eax, [esi + 0x118]
push edi
push eax
push 0x14
push 0x1ae
push 0x78
lea ebp, [esi + 0x2cc]
push 0x64
push 0x20
push 0x43786c
mov ecx, ebp
call fcn.00414a50
push 1
push 1
mov ecx, ebp
call fcn.00414d10
mov dword [esi + 0x2fc], 2
lea ecx, [esp + 0x10]
push 0x437860
push ecx
lea ecx, [esi + 0x22c]
call fcn.00414900
test al, al
je 0x40b210
push 0
mov ecx, 0x434970
call fcn.00411690
lea edx, [esi + 0xc4]
lea eax, [esi + 0xa8]
push edx
push eax
push 0xc
push 0x113
push 0x1e0
push 0x50
push 0x50
lea ecx, [esi + 0x1cc]
call fcn.00414680
lea edi, [esi + 0x138]
lea ebp, [esi + 0xe0]
push edi
push ebp
push 0x14
push 0x5f
push 0x13d
push 0xa0
push 0x42b2f4
lea ecx, [esi + 0x28c]
call fcn.004148c0
push edi
push ebp
push 0x14
push 0x5f
push 0x13d
push 0x190
push str.Cancel
lea ecx, [esi + 0x2ac]
call fcn.004148c0
lea ecx, [esi + 0x118]
push edi
push ecx
push 0x14
push 0x1ae
push 0x78
lea ebp, [esi + 0x2cc]
push 0x64
push 0x20
push 0x437870
mov ecx, ebp
call fcn.00414a50
push 1
push 1
mov ecx, ebp
call fcn.00414d10
mov dword [esi + 0x2fc], 3
lea edx, [esp + 0x10]
push 0x437860
push edx
lea ecx, [esi + 0x24c]
call fcn.00414900
test al, al
je 0x40b29d
push 0
mov ecx, 0x434970
call fcn.00411690
push 0x42b300
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0x42b304
push str.play.lev
call fcn.004186e7
mov ebx, dword [esi + 0x15c]
add esp, 8
mov ebp, eax
xor edi, edi
xor eax, eax
push ebp
mov al, byte [ebx + edi]
push eax
call fcn.00418798
add esp, 8
inc edi
cmp edi, 0x280
jl 0x40b25c
push ebp
call fcn.0041864c
add esp, 4
push 0x42b314
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push str.levplay.lev
push 1
push 3
push 0
mov ecx, 0x434db0
call fcn.00401046
lea ecx, [esp + 0x10]
push 0x437860
push ecx
lea ecx, [esi + 0x26c]
call fcn.00414900
test al, al
je 0x40b2cc
push 0
mov ecx, 0x434970
call fcn.00411690
mov ecx, 5
call fcn.00401069
xor ecx, ecx
call fcn.004145e0
test al, al
je 0x40b371
mov ecx, dword [esi + 0x164]
mov ebp, dword [esi + 0x174]
cmp ecx, ebp
jl 0x40b371
mov edx, dword [esi + 0x17c]
add edx, ebp
cmp ecx, edx
jge 0x40b371
mov eax, dword [esi + 0x168]
mov edx, dword [esi + 0x178]
cmp eax, edx
jl 0x40b371
mov edi, dword [esi + 0x180]
add edi, edx
cmp eax, edi
jge 0x40b371
sub eax, edx
sub ecx, ebp
mov edi, eax
mov eax, 0x88888889
imul edi
add edx, edi
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0x88888889
mov edi, edx
imul ecx
add edx, ecx
mov eax, dword [esi + 0x184]
sar edx, 4
shl edi, 4
mov ecx, edx
add edx, edi
shr ecx, 0x1f
lea edi, [ecx + edx + 1]
cmp eax, edi
je 0x40b4d1
push 0
mov ecx, 0x434970
call fcn.00411690
mov dword [esi + 0x184], edi
jmp 0x40b4d1
mov ebp, dword [esi + 0x168]
cmp ebp, 0x2d
jle 0x40b4d1
cmp ebp, 0x186
jge 0x40b4d1
mov ebx, dword [esi + 0x164]
cmp ebx, 0x14
jle 0x40b4d1
cmp ebx, 0x26c
jge 0x40b4d1
mov eax, dword [0x437864]
cmp eax, 0x2d
jle 0x40b4d1
cmp eax, 0x186
jge 0x40b4d1
mov eax, dword [0x437860]
cmp eax, 0x14
jle 0x40b4d1
cmp eax, 0x26c
jge 0x40b4d1
xor ecx, ecx
call fcn.004145e0
test al, al
je 0x40b45e
mov eax, 0x88888889
lea ecx, [ebx - 0x14]
imul ebp
add edx, ebp
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0x88888889
lea edi, [edx + edx*4]
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
lea edi, [edx + edi*4]
test edi, edi
jl 0x40b45e
cmp edi, 0x280
jge 0x40b45e
mov edx, dword [esi + 0x15c]
mov ecx, dword [esi + 0x184]
xor eax, eax
mov al, byte [edi + edx]
cmp eax, ecx
je 0x40b45e
push 8
push 0
push 0x10
push ebp
push ebx
mov ecx, esi
call fcn.00401109
push 0
mov ecx, 0x433f00
call fcn.00411690
mov ecx, dword [esi + 0x15c]
mov dl, byte [esi + 0x184]
mov byte [edi + ecx], dl
mov ecx, 2
call fcn.004145e0
test al, al
je 0x40b4d1
mov ecx, dword [esi + 0x168]
mov eax, 0x88888889
imul ecx
add edx, ecx
mov ecx, dword [esi + 0x164]
sar edx, 3
mov eax, edx
sub ecx, 0x14
shr eax, 0x1f
add edx, eax
mov eax, 0x88888889
lea edi, [edx + edx*4]
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
lea eax, [edx + edi*4]
test eax, eax
jl 0x40b4d1
cmp eax, 0x280
jge 0x40b4d1
mov edx, dword [esi + 0x15c]
lea edi, [eax + edx]
mov al, byte [eax + edx]
test al, al
je 0x40b4d1
push 0
mov ecx, 0x434640
call fcn.00411690
mov byte [edi], 0
cmp dword [esi + 0x2fc], 1
jne 0x40b556
lea eax, [esp + 0x10]
push 0x437860
push eax
lea ecx, [esi + 0x28c]
call fcn.00414900
test al, al
jne 0x40b503
push 0x1c
mov ecx, 0x431af8
call fcn.00413f10
test al, al
je 0x40b527
mov edi, dword [esi + 0x15c]
mov ecx, 0xa0
xor eax, eax
rep stosd dword es:[edi], eax
push eax
mov ecx, 0x434970
call fcn.00411690
mov dword [esi + 0x2fc], 0
lea ecx, [esp + 0x10]
push 0x437860
push ecx
lea ecx, [esi + 0x2ac]
call fcn.00414900
test al, al
je 0x40b556
push 0
mov ecx, 0x434970
call fcn.00411690
mov dword [esi + 0x2fc], 0
cmp dword [esi + 0x2fc], 2
jne 0x40b63f
lea edx, [esp + 0x10]
push 0x437860
push edx
lea ecx, [esi + 0x28c]
call fcn.00414900
test al, al
jne 0x40b58c
push 0x1c
mov ecx, 0x431af8
call fcn.00413f10
test al, al
je 0x40b5fb
push 0x42b328
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [esi + 0x2f0]
push 0x42b32c
push eax
call fcn.004186e7
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x40b5da
mov ebp, dword [esi + 0x15c]
xor edi, edi
xor ecx, ecx
push ebx
mov cl, byte [edi + ebp]
push ecx
call fcn.00418798
add esp, 8
inc edi
cmp edi, 0x280
jl 0x40b5b9
push ebx
call fcn.0041864c
add esp, 4
push 0x42b330
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0
mov ecx, 0x434970
call fcn.00411690
mov dword [esi + 0x2fc], 0
lea edx, [esp + 0x10]
push 0x437860
push edx
lea ecx, [esi + 0x2ac]
call fcn.00414900
test al, al
je 0x40b62a
push 0
mov ecx, 0x434970
call fcn.00411690
mov dword [esi + 0x2fc], 0
lea eax, [esp + 0x10]
push 0x431af8
push eax
lea ecx, [esi + 0x2cc]
call fcn.00414b00
cmp dword [esi + 0x2fc], 3
jne 0x40b725
lea ecx, [esp + 0x10]
push 0x437860
push ecx
lea ecx, [esi + 0x28c]
call fcn.00414900
test al, al
jne 0x40b675
push 0x1c
mov ecx, 0x431af8
call fcn.00413f10
test al, al
je 0x40b6e1
push 0x42b334
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov edx, dword [esi + 0x2f0]
push 0x42b338
push edx
call fcn.004186e7
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x40b6c0
mov ebp, dword [esi + 0x15c]
xor edi, edi
push ebx
call fcn.004186a2
add esp, 4
mov byte [edi + ebp], al
inc edi
cmp edi, 0x280
jl 0x40b6a2
push ebx
call fcn.0041864c
add esp, 4
push 0x42b33c
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0
mov ecx, 0x434970
call fcn.00411690
mov dword [esi + 0x2fc], 0
lea eax, [esp + 0x10]
push 0x437860
push eax
lea ecx, [esi + 0x2ac]
call fcn.00414900
test al, al
je 0x40b710
push 0
mov ecx, 0x434970
call fcn.00411690
mov dword [esi + 0x2fc], 0
lea ecx, [esp + 0x10]
push 0x431af8
push ecx
lea ecx, [esi + 0x2cc]
call fcn.00414b00
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 4