Function at 0x410ea0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x5c
mov eax, dword [0x5b2ebc]
push ebx
push ebp
push esi
push edi
xor ebx, ebx
xor ebp, ebp
xor edi, edi
mov dword [esp + 0x1c], 3
mov dword [esp + 0x18], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x14], edi
call fcn.0040e680
mov ecx, dword [0x540738]
imul ecx, dword [esp + 0x1c]
add edi, ecx
cmp edi, 0x7c0
mov dword [esp + 0x20], edi
jle 0x410f0d
cmp dword [esp + 0x18], ebx
jne 0x410eff
call fcn.004090d0
mov dword [esp + 0x18], 1
mov dword [esp + 0x20], 0x7c0
mov edi, dword [esp + 0x20]
jmp 0x410f15
cmp edi, ebx
jl 0x4112ea
cmp dword [esp + 0x18], ebx
je 0x410fd1
call fcn.00409100
mov esi, eax
cmp esi, 0x1b
je 0x410f38
cmp esi, 8
je 0x410f38
cmp esi, dword [0x5b2ec8]
jne 0x410f56
push 0x16
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], 0xfffffffc
mov dword [esp + 0x2c], 1
call fcn.0040ab20
add esp, 4
cmp esi, 0x26
je 0x410f63
cmp esi, dword [0x5b2ec0]
jne 0x410f7c
mov eax, dword [esp + 0x10]
cmp eax, ebx
jle 0x410f7c
mov edx, eax
push 0x15
dec edx
mov dword [esp + 0x14], edx
call fcn.0040ab20
add esp, 4
cmp esi, 0x28
je 0x410f89
cmp esi, dword [0x5b2ec4]
jne 0x410fa9
mov edx, dword [0x5b1200]
mov eax, dword [esp + 0x10]
dec edx
cmp eax, edx
jae 0x410fa9
mov edx, eax
push 0x15
inc edx
mov dword [esp + 0x14], edx
call fcn.0040ab20
add esp, 4
cmp esi, 0xd
je 0x410fbb
cmp esi, 0x20
je 0x410fbb
cmp esi, dword [0x5b2ecc]
jne 0x410fd1
push 0x16
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], 0xfffffffc
call fcn.0040ab20
add esp, 4
push ebx
call fcn.0040b9f0
push 5
push 0xc
push 0xff00
push 0x10
push str.SELECT_THE_GAME:
call fcn.0040bac0
mov eax, dword [0x5b1200]
add esp, 0x18
cmp eax, ebx
jbe 0x4110bd
mov esi, 7
mov ebx, 0x5b1264
mov edi, 0x5b1204
mov ecx, dword [esp + 0x10]
lea eax, [esi - 7]
cmp eax, ecx
push esi
push 8
jne 0x411056
push 0xffffff
push 0xb
push edi
call fcn.0040bac0
mov edx, dword [ebx]
lea ecx, [esp + 0x40]
push ecx
push edx
call fcn.00408f00
mov ecx, 0x19
push esi
sub ecx, eax
lea edx, [esp + 0x4c]
push ecx
push 0xffffff
push eax
push edx
call fcn.0040bac0
push esi
push 0x1a
push 0xffffff
jmp 0x411091
push 0x8fff
push 0xb
push edi
call fcn.0040bac0
mov ecx, dword [ebx]
lea eax, [esp + 0x40]
push eax
push ecx
call fcn.00408f00
mov edx, 0x19
push esi
sub edx, eax
push edx
push 0x8fff
push eax
lea eax, [esp + 0x58]
push eax
call fcn.0040bac0
push esi
push 0x1a
push 0x8fff
push 6
push str.Levels
call fcn.0040bac0
mov eax, dword [0x5b1200]
add esp, 0x44
add edi, 0xc
add ebx, 4
inc esi
lea ecx, [esi - 7]
cmp ecx, eax
jb 0x41100b
mov edi, dword [esp + 0x20]
xor ebx, ebx
mov edx, edi
sar edx, 3
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
fstp dword [esp + 0x20]
mov eax, dword [esp + 0x20]
push eax
push eax
push eax
call fcn.0040bca0
mov eax, dword [0x540738]
mov ecx, dword [esp + 0x30]
push 0xe
lea eax, [ecx + eax*2]
and eax, 0x7ff
mov dword [esp + 0x34], eax
fld dword [eax*8 + 0x538f6c]
fadd dword [0x43923c]
fmul dword [0x439298]
fadd dword [0x43929c]
call fcn.0042ff3c
shl eax, 0x10
push eax
call fcn.0040bb10
add esp, 0x14
call fcn.00405c40
test eax, eax
je 0x410ece
mov esi, edi
push ebx
sar esi, 4
call fcn.004056e0
mov eax, dword [0x44c1e4]
add esp, 4
cmp eax, ebx
je 0x4111ad
push ebx
call fcn.004056b0
mov edx, dword [0x540738]
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x38], edx
add esp, 4
fild qword [esp + 0x34]
fmul dword [0x4392f0]
fadd dword [esp + 0x14]
fst dword [esp + 0x14]
fcomp dword [0x43923c]
fnstsw ax
test ah, 0x41
jne 0x411183
fld dword [esp + 0x14]
fsub dword [0x43923c]
fstp dword [esp + 0x14]
mov eax, esi
shl eax, 8
add eax, esi
fld dword [esp + 0x14]
shl eax, 8
add eax, esi
push eax
push 0x40800000
push 0x40800000
push ecx
fchs
fstp dword [esp]
push ebx
call fcn.0040deb0
add esp, 0x14
push 3
call fcn.004056b0
push 1
call fcn.00405720
mov ecx, edi
sar ecx, 6
push ecx
call fcn.0040baa0
push ebx
call fcn.00405720
mov edx, dword [0x5b1124]
push 0x3ba3d70a
push ebx
push ebx
push edx
call fcn.0040be30
mov eax, dword [0x540738]
lea ecx, [esp + 0x64]
push ecx
lea ebp, [ebp + eax*2]
call fcn.004012b0
lea edx, [esp + 0x68]
push ebp
push edx
call fcn.004012f0
lea eax, [esp + 0x70]
push 0x3e051eb8
push eax
call fcn.00401480
mov edx, dword [0x57abd0]
lea ecx, [esp + 0x78]
push ecx
push edx
call fcn.00401610
fild dword [esp + 0x4c]
mov eax, dword [0x57eda0]
add esp, 0x38
fmul dword [0x4392ec]
fsubr dword [0x4392e8]
fstp dword [esp]
push ebx
push 0xbc54fdf4
push eax
call fcn.0040be30
push 1
call fcn.004056e0
lea ecx, [esp + 0x58]
push ecx
call fcn.004012b0
lea edx, [esp + 0x5c]
push 0x200
push edx
call fcn.004012f0
lea eax, [esp + 0x64]
push ebp
push eax
call fcn.00401400
mov dword [esp + 0x64], ebp
mov dword [esp + 0x68], ebx
fild qword [esp + 0x64]
add esp, 0x24
lea ecx, [esp + 0x48]
fmul dword [0x4392e4]
fsin
fmul dword [0x4392e0]
fadd dword [0x4392dc]
fstp dword [esp]
push ecx
call fcn.00401480
mov eax, dword [0x5810ac]
lea edx, [esp + 0x4c]
push edx
push eax
call fcn.00401610
mov ecx, dword [0x57ac14]
push 0x3ba3d70a
push ebx
push 0xbc23d70a
push ecx
call fcn.0040be30
push 0x3ba3d70a
mov edx, dword [0x57ac14]
push ebx
push 0x3c1ba5e3
push edx
call fcn.0040be30
add esp, 0x30
call fcn.00405cd0
jmp 0x410ece
cmp dword [esp + 0x28], ebx
je 0x4112fb
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x5c
ret
mov esi, dword [esp + 0x10]
mov dword [0x5b2ebc], esi
call fcn.004212a0
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret