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

Disassembly:
sub esp, 0x110
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor edi, edi
cmp dword [esi], edi
jne 0x40b3f5
call fcn.0040b270
test eax, eax
je 0x40bc1d
mov dword [esi], 1
fld dword [esp + 0x128]
fcomp dword [0x46f434]
mov eax, dword [0x47c078]
mov dword [esi + 0x48], eax
fnstsw ax
test ah, 1
jne 0x40bc1d
mov ecx, dword [esi + 0x44]
mov edx, dword [ecx + 0x48]
dec edx
mov dword [esp + 0x28], edx
fild dword [esp + 0x28]
fcomp dword [esp + 0x128]
fnstsw ax
test ah, 1
jne 0x40bc1d
fld dword [esp + 0x128]
call fcn.004616bc
mov ebx, eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x2c], edi
fild dword [esp + 0x18]
fsubr dword [esp + 0x128]
fcomp dword [0x46f430]
fnstsw ax
test ah, 0x41
jne 0x40b469
inc ebx
call dword [sym.imp.opengl32.dll_glPushMatrix]
call dword [sym.imp.opengl32.dll_glLoadIdentity]
mov ebp, dword [esp + 0x12c]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 4]
mov edx, dword [ebp]
push eax
push ecx
push edx
call dword [sym.imp.opengl32.dll_glTranslatef]
push edi
push edi
mov edi, dword [esp + 0x138]
push 0x3f800000
mov eax, dword [edi]
push eax
call dword [sym.imp.opengl32.dll_glRotatef]
mov ecx, dword [edi + 4]
push 0
push 0x3f800000
push 0
push ecx
call dword [sym.imp.opengl32.dll_glRotatef]
mov edx, dword [edi + 8]
push 0x3f800000
push 0
push 0
push edx
call dword [sym.imp.opengl32.dll_glRotatef]
lea eax, [esp + 0xd0]
push eax
push 0xba6
call dword [sym.imp.opengl32.dll_glGetFloatv]
call dword [sym.imp.opengl32.dll_glPopMatrix]
mov eax, dword [esi + 0x3c]
xor ecx, ecx
cmp eax, ecx
jle 0x40b5dd
mov eax, ebx
mov dword [esp + 0x14], ecx
shl eax, 6
mov dword [esp + 0x18], eax
xor eax, eax
mov edx, dword [esi + 0x44]
mov edi, dword [esp + 0x14]
fld dword [esp + 0xf0]
mov edx, dword [edx + edi + 0x70]
mov edi, dword [esp + 0x18]
add edx, edi
inc ecx
add eax, 0xc
mov edi, dword [edx]
mov dword [esp + 0x1c], edi
mov edi, dword [edx + 4]
mov dword [esp + 0x20], edi
mov edx, dword [edx + 8]
mov dword [esp + 0x24], edx
mov edx, dword [esi + 0x40]
fmul dword [esp + 0x24]
fld dword [esp + 0xe0]
fmul dword [esp + 0x20]
faddp st(1)
fld dword [esp + 0xd0]
fmul dword [esp + 0x1c]
faddp st(1)
fadd dword [esp + 0x100]
fstp dword [edx + eax - 0xc]
fld dword [esp + 0xf4]
fmul dword [esp + 0x24]
fld dword [esp + 0xe4]
fmul dword [esp + 0x20]
mov edx, dword [esi + 0x40]
faddp st(1)
fld dword [esp + 0xd4]
fmul dword [esp + 0x1c]
faddp st(1)
fadd dword [esp + 0x104]
fstp dword [edx + eax - 8]
fld dword [esp + 0xf8]
fmul dword [esp + 0x24]
fld dword [esp + 0xe8]
fmul dword [esp + 0x20]
mov edx, dword [esi + 0x40]
faddp st(1)
fld dword [esp + 0xd8]
fmul dword [esp + 0x1c]
faddp st(1)
fadd dword [esp + 0x108]
fstp dword [edx + eax - 4]
mov edx, dword [esp + 0x14]
add edx, 0xac
mov dword [esp + 0x14], edx
mov edx, dword [esi + 0x3c]
cmp ecx, edx
jl 0x40b500
xor ecx, ecx
mov eax, dword [esi + 0x3c]
mov dword [esp + 0x10], ecx
cmp eax, ecx
jle 0x40b642
mov eax, ebx
mov dword [esp + 0x14], ecx
shl eax, 6
mov dword [esp + 0x18], eax
xor edi, edi
jmp 0x40b5fd
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 0x44]
mov edx, dword [ecx + edi + 0x70]
mov ecx, dword [esi + 0x40]
mov eax, dword [edx + eax + 0x3c]
push eax
mov eax, dword [esp + 0x18]
add ecx, eax
push ecx
mov ecx, 0x732710
call fcn.00450620
test eax, eax
jne 0x40b642
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov ecx, dword [esi + 0x3c]
inc eax
add edi, 0xac
add edx, 0xc
cmp eax, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
jl 0x40b5f9
mov edx, dword [esp + 0x10]
mov eax, dword [esi + 0x3c]
cmp edx, eax
je 0x40bc1d
mov edi, dword [esp + 0x124]
cmp byte [edi + 8], 4
jne 0x40b6aa
mov al, byte [edi + 9]
test al, al
jne 0x40b687
push 0xbc0
mov dword [esp + 0x2c], 1
call dword [sym.imp.opengl32.dll_glEnable]
push 0
push 0x204
call dword [sym.imp.opengl32.dll_glAlphaFunc]
jmp 0x40b6aa
push 0xbe2
mov dword [esp + 0x30], 1
call dword [sym.imp.opengl32.dll_glEnable]
push 0x303
push 0x302
call dword [sym.imp.opengl32.dll_glBlendFunc]
mov eax, dword [edi + 0x14]
push eax
push 0xde1
call dword [sym.imp.opengl32.dll_glBindTexture]
mov eax, dword [esi + 0x3c]
xor edi, edi
cmp eax, edi
mov dword [esp + 0x10], edi
jle 0x40bbf9
call dword [sym.imp.opengl32.dll_glPushMatrix]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 4]
mov eax, dword [ebp]
push ecx
push edx
push eax
call dword [sym.imp.opengl32.dll_glTranslatef]
mov ecx, dword [esp + 0x130]
push 0
push 0
push 0x3f800000
mov edx, dword [ecx]
push edx
call dword [sym.imp.opengl32.dll_glRotatef]
mov eax, dword [esp + 0x130]
push 0
push 0x3f800000
push 0
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.opengl32.dll_glRotatef]
mov edx, dword [esp + 0x130]
push 0x3f800000
push 0
push 0
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.opengl32.dll_glRotatef]
mov ecx, dword [esi + 0x44]
add ecx, edi
mov dword [esp + 0x18], ecx
mov eax, dword [ecx + 0xc]
test eax, eax
je 0x40b7f3
fld dword [0x47c078]
fmul dword [ecx + 0x10]
fld dword [ecx + 0x18]
fsub dword [ecx + 0x14]
fcom dword [0x46f434]
fnstsw ax
test ah, 0x41
jne 0x40b7a2
fld st(1)
fdiv st(1)
call fcn.004616bc
mov dword [esp + 0x14], eax
and eax, reloc.dsound.dll_DirectSoundCreate
fild dword [esp + 0x14]
fmul st(1)
fsubp st(2)
fstp st(0)
jns 0x40b782
dec eax
or eax, 0xfffffffe
inc eax
jne 0x40b791
mov edx, dword [esp + 0x18]
fadd dword [edx + 0x14]
fstp dword [esp + 0x14]
jmp 0x40b7ad
mov eax, dword [esp + 0x18]
fld dword [eax + 0x18]
fsub st(1)
fstp dword [esp + 0x14]
fstp st(0)
jmp 0x40b7ad
mov ecx, dword [ecx + 0x14]
fstp st(0)
fstp st(0)
mov dword [esp + 0x14], ecx
mov ecx, dword [0x47211c]
call fcn.00449900
mov ecx, dword [0x47211c]
lea edx, [esp + 0x110]
push edx
call fcn.004497a0
mov eax, dword [esp + 0x14]
mov ecx, eax
mov edx, eax
mov dword [esp + 0x34], ecx
lea ecx, [esp + 0x30]
push ecx
mov ecx, dword [0x47211c]
mov dword [esp + 0x34], eax
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], eax
call fcn.00449770
mov edx, dword [esi + 0x44]
mov eax, dword [edx + edi + 0x3c]
lea ecx, [edx + edi]
test eax, eax
jne 0x40b94f
mov eax, dword [ecx + 0x4c]
mov ecx, dword [ecx + 0x60]
imul eax, ebx
lea eax, [eax + eax*2]
lea edx, [ecx + eax*4]
push edx
push 0
push 0x1406
call dword [sym.imp.opengl32.dll_glNormalPointer]
mov eax, dword [esi + 0x44]
mov ecx, dword [eax + edi + 0x5c]
push ecx
push 0
push 0x1406
push 2
call dword [sym.imp.opengl32.dll_glTexCoordPointer]
mov edx, dword [esi + 0x44]
mov eax, dword [edx + edi + 0x4c]
lea ecx, [edx + edi]
imul eax, ebx
mov ecx, dword [ecx + 0x58]
lea eax, [eax + eax*2]
lea edx, [ecx + eax*4]
push edx
push 0
push 0x1406
push 3
call dword [sym.imp.opengl32.dll_glVertexPointer]
mov eax, dword [esi + 0x44]
add eax, edi
mov ecx, dword [eax + 0x64]
mov eax, dword [eax + 0x54]
push ecx
push 0x1403
lea edx, [eax + eax*2]
push edx
push 4
call dword [sym.imp.opengl32.dll_glDrawElements]
mov eax, dword [esi + 0x44]
lea ecx, [eax + edi]
mov eax, dword [eax + edi + 4]
test eax, eax
je 0x40b901
mov eax, dword [ecx + 0x4c]
imul eax, ebx
lea edx, [eax + eax*2]
mov eax, dword [ecx + 0x68]
lea ecx, [eax + edx*4]
push ecx
push 0
push 0x1406
call dword [sym.imp.opengl32.dll_glNormalPointer]
mov edx, dword [esi + 0x44]
mov eax, dword [edx + edi + 0x5c]
push eax
push 0
push 0x1406
push 2
call dword [sym.imp.opengl32.dll_glTexCoordPointer]
mov ecx, dword [esi + 0x44]
add ecx, edi
mov eax, dword [ecx + 0x4c]
imul eax, ebx
lea edx, [eax + eax*2]
mov eax, dword [ecx + 0x58]
lea ecx, [eax + edx*4]
push ecx
push 0
push 0x1406
push 3
call dword [sym.imp.opengl32.dll_glVertexPointer]
mov edx, dword [esi + 0x44]
mov ecx, dword [edx + edi + 0x6c]
lea eax, [edx + edi]
push ecx
push 0x1403
mov eax, dword [eax + 0x54]
lea edx, [eax + eax*2]
push edx
push 4
call dword [sym.imp.opengl32.dll_glDrawElements]
mov eax, dword [esi + 0x44]
mov ecx, dword [eax + edi + 0xc]
test ecx, ecx
je 0x40b92a
lea ecx, [esp + 0x110]
push ecx
mov ecx, dword [0x47211c]
call fcn.00449770
mov ecx, dword [0x47211c]
call fcn.00449920
call dword [sym.imp.opengl32.dll_glPopMatrix]
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x3c]
inc eax
add edi, 0xac
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x40b6ca
jmp 0x40bbf9
call dword [sym.imp.opengl32.dll_glLoadIdentity]
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 4]
mov ecx, dword [ebp]
push edx
push eax
push ecx
call dword [sym.imp.opengl32.dll_glTranslatef]
mov edi, dword [esp + 0x130]
mov ebp, dword [sym.imp.opengl32.dll_glRotatef]
push 0
push 0
mov edx, dword [edi]
push 0x3f800000
push edx
call ebp
mov eax, dword [edi + 4]
push 0
push 0x3f800000
push 0
push eax
call ebp
mov ecx, dword [edi + 8]
push 0x3f800000
push 0
push 0
push ecx
call ebp
lea edx, [esp + 0x90]
push edx
push 0xba6
call dword [sym.imp.opengl32.dll_glGetFloatv]
call dword [sym.imp.opengl32.dll_glPopMatrix]
mov edi, dword [esp + 0x10]
mov ecx, dword [esi + 0x44]
fld dword [esp + 0xb0]
lea eax, [edi*8]
sub eax, edi
lea eax, [eax + eax*2]
lea edi, [edi + eax*2]
shl edi, 2
shl ebx, 6
mov edx, dword [edi + ecx + 0x70]
fmul dword [edx + ebx + 8]
fld dword [esp + 0xa0]
fmul dword [edx + ebx + 4]
lea eax, [edx + ebx]
faddp st(1)
fld dword [esp + 0x90]
fmul dword [eax]
faddp st(1)
fadd dword [esp + 0xc0]
fld dword [esp + 0xb4]
fmul dword [eax + 8]
fld dword [esp + 0xa4]
fmul dword [eax + 4]
faddp st(1)
fld dword [esp + 0x94]
fmul dword [eax]
faddp st(1)
fadd dword [esp + 0xc4]
fstp dword [esp + 0x20]
fld dword [esp + 0xb8]
fmul dword [eax + 8]
fld dword [esp + 0xa8]
fmul dword [eax + 4]
faddp st(1)
fld dword [esp + 0x98]
fmul dword [eax]
mov eax, dword [eax + 0x3c]
mov dword [esp + 0x40], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0x44], 0
faddp st(1)
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0x3f800000
mov dword [esp + 0x50], 0x3f800000
mov dword [esp + 0x54], 0x3f800000
fadd dword [esp + 0xc8]
mov dword [esp + 0x58], 0x3f800000
fstp dword [esp + 0x24]
fld dword [esp + 0x10]
fmul dword [0x7326d8]
push 0x8075
mov dword [esp + 0x60], 0
fadd st(1)
fstp dword [esp + 0x64]
fld dword [esp + 0x14]
fmul dword [0x7326dc]
fadd dword [esp + 0x24]
fstp dword [esp + 0x68]
fld dword [esp + 0x14]
fmul dword [0x7326e0]
fadd dword [esp + 0x28]
fstp dword [esp + 0x6c]
fld dword [esp + 0x14]
fmul dword [0x7326e4]
fadd st(1)
fstp dword [esp + 0x70]
fld dword [esp + 0x14]
fmul dword [0x7326e8]
fadd dword [esp + 0x24]
fstp dword [esp + 0x74]
fld dword [esp + 0x14]
fmul dword [0x7326ec]
fadd dword [esp + 0x28]
fstp dword [esp + 0x78]
fld dword [esp + 0x14]
fmul dword [0x7326f0]
fadd st(1)
fstp dword [esp + 0x7c]
fld dword [esp + 0x14]
fmul dword [0x7326f4]
fadd dword [esp + 0x24]
fstp dword [esp + 0x80]
fld dword [esp + 0x14]
fmul dword [0x7326f8]
fadd dword [esp + 0x28]
fstp dword [esp + 0x84]
fld dword [esp + 0x14]
fmul dword [0x7326fc]
fadd st(1)
fstp dword [esp + 0x88]
fstp st(0)
fld dword [esp + 0x14]
fmul dword [0x732700]
fadd dword [esp + 0x24]
fstp dword [esp + 0x8c]
fld dword [esp + 0x14]
fmul dword [0x732704]
fadd dword [esp + 0x28]
fstp dword [esp + 0x90]
call dword [sym.imp.opengl32.dll_glDisableClientState]
lea ecx, [esp + 0x40]
push ecx
push 0
push 0x1406
push 2
call dword [sym.imp.opengl32.dll_glTexCoordPointer]
lea edx, [esp + 0x60]
push edx
push 0
push 0x1406
push 3
call dword [sym.imp.opengl32.dll_glVertexPointer]
push 4
push 0
push 7
call dword [sym.imp.opengl32.dll_glDrawArrays]
push 0x8075
call dword [sym.imp.opengl32.dll_glEnableClientState]
mov eax, dword [esi + 0x44]
mov ecx, dword [edi + eax + 0xc]
test ecx, ecx
je 0x40bbf9
lea ecx, [esp + 0x110]
push ecx
mov ecx, dword [0x47211c]
call fcn.00449770
mov ecx, dword [0x47211c]
call fcn.00449920
mov eax, dword [esp + 0x2c]
mov esi, dword [sym.imp.opengl32.dll_glDisable]
test eax, eax
je 0x40bc0e
push 0xbe2
call esi
mov eax, dword [esp + 0x28]
test eax, eax
je 0x40bc1d
push 0xbc0
call esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret 0x10