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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
push 0xffffffffffffffff
push 0x5972a1
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, 0x4bb8
call fcn.00581a30
push esi
push edi
mov eax, dword [0x5d5de8]
xor eax, esp
push eax
lea eax, [esp + 0x4bf8]
mov dword fs:[0], eax
mov ecx, dword [ebp + 0xc]
mov esi, edx
fld1
fcom dword [ebx + 0x34]
fnstsw ax
test ah, 1
jne 0x407581
fcom dword [ebx + 0x38]
fnstsw ax
test ah, 1
jne 0x407581
mov eax, dword [ebx + 4]
fstp st(0)
xor edi, edi
cmp eax, edi
je 0x4073ed
mov ecx, dword [ebx + 8]
sub ecx, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
jne 0x4073f2
call fcn.0056999e
mov eax, dword [ebx + 4]
mov eax, dword [eax]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push eax
push edi
push ecx
mov ecx, dword [edx + 0x8c]
call ecx
push eax
mov ecx, str.SetTexture_gTexture
call fcn.00404b10
add esp, 4
xor ecx, ecx
cmp dword [ebp + 0xc], edi
mov dword [esp + 0xc], edi
jle 0x40756a
fld dword [ebp + 0x18]
add esi, 0x10
fld dword [ebp + 0x14]
fldz
fld1
fld dword [esi - 0x10]
mov edx, dword [esi]
fadd st(3)
lea eax, [ecx + ecx*2]
shl eax, 5
lea eax, [esp + eax + 0x2644]
fstp dword [eax]
add ecx, 1
cmp edx, edi
fld dword [esi - 0xc]
fadd st(4)
fstp dword [eax + 4]
fxch st(1)
fst dword [eax + 8]
fxch st(1)
fst dword [eax + 0xc]
jne 0x407463
mov edx, dword [ebp + 0x10]
fld dword [esi - 8]
mov dword [eax + 0x10], edx
fmul dword [ebx + 0x34]
mov edx, dword [esi + 0x14]
cmp edx, edi
mov dword [eax + 0x14], edi
fstp dword [eax + 0x18]
fld dword [esi - 4]
fmul dword [ebx + 0x38]
fstp dword [eax + 0x1c]
fld dword [esi + 4]
fadd st(3)
fstp dword [eax + 0x20]
fld dword [esi + 8]
fadd st(4)
fstp dword [eax + 0x24]
fxch st(1)
fst dword [eax + 0x28]
fxch st(1)
fst dword [eax + 0x2c]
jne 0x40749f
mov edx, dword [ebp + 0x10]
fld dword [esi + 0xc]
mov dword [eax + 0x30], edx
fmul dword [ebx + 0x34]
mov edx, dword [esi + 0x28]
cmp edx, edi
mov dword [eax + 0x34], edi
fstp dword [eax + 0x38]
fld dword [esi + 0x10]
fmul dword [ebx + 0x38]
fstp dword [eax + 0x3c]
fld dword [esi + 0x18]
fadd st(3)
fstp dword [eax + 0x40]
fld dword [esi + 0x1c]
fadd st(4)
fstp dword [eax + 0x44]
fxch st(1)
fst dword [eax + 0x48]
fxch st(1)
fst dword [eax + 0x4c]
jne 0x4074db
mov edx, dword [ebp + 0x10]
cmp ecx, 0x64
fld dword [esi + 0x20]
fmul dword [ebx + 0x34]
mov dword [eax + 0x50], edx
mov dword [eax + 0x54], edi
fstp dword [eax + 0x58]
fld dword [esi + 0x24]
fmul dword [ebx + 0x38]
fstp dword [eax + 0x5c]
je 0x407504
mov edx, dword [ebp + 0xc]
add edx, 0xffffffff
cmp dword [esp + 0xc], edx
jne 0x40754b
mov eax, dword [ebp + 8]
fstp st(3)
mov edx, dword [eax]
fstp st(1)
mov edx, dword [edx + 0x64]
fstp st(0)
push edi
fstp st(0)
lea ecx, [ecx + ecx*2]
push ecx
lea ecx, [esp + 0x264c]
push ecx
push 0x1c4
push 4
push eax
call edx
push eax
mov ecx, str.DrawPrimitive__TriList_
call fcn.00404b10
fldz
fld1
add esp, 4
fld dword [ebp + 0x14]
xor ecx, ecx
fld dword [ebp + 0x18]
fxch st(3)
fxch st(1)
fxch st(2)
mov eax, dword [esp + 0xc]
add eax, 1
add esi, 0x3c
cmp eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
jl 0x407431
fstp st(3)
fstp st(1)
fstp st(0)
fstp st(0)
mov ecx, dword [esp + 0x4bf8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x14
test ecx, ecx
jle 0x407568
fld dword [ebp + 0x18]
add esi, 0x10
fld dword [ebp + 0x14]
mov dword [esp + 0x24], esi
fldz
mov dword [esp + 0x28], ecx
jmp 0x4075ae
fldz
fld1
fld dword [ebp + 0x14]
fld dword [ebp + 0x18]
fxch st(2)
fxch st(3)
mov eax, dword [esp + 0x24]
fld dword [eax - 0x10]
mov ecx, dword [eax]
mov esi, dword [ebp + 0x10]
fadd st(2)
xor edx, edx
cmp ecx, edx
fstp dword [esp + 0x34]
mov dword [esp + 0x44], ecx
fld dword [eax - 0xc]
fadd st(3)
fstp dword [esp + 0x38]
fst dword [esp + 0x3c]
fxch st(3)
fst dword [esp + 0x40]
jne 0x4075e1
mov dword [esp + 0x44], esi
fld dword [eax - 8]
mov ecx, dword [eax + 0x14]
cmp ecx, edx
fmul dword [ebx + 0x34]
mov dword [esp + 0x48], edx
mov dword [esp + 0x64], ecx
fstp dword [esp + 0x4c]
fld dword [eax - 4]
fmul dword [ebx + 0x38]
fstp dword [esp + 0x50]
fld dword [eax + 4]
fadd st(2)
fstp dword [esp + 0x54]
fld dword [eax + 8]
fadd st(3)
fstp dword [esp + 0x58]
fxch st(3)
fst dword [esp + 0x5c]
fxch st(3)
fst dword [esp + 0x60]
jne 0x407626
mov dword [esp + 0x64], esi
fld dword [eax + 0xc]
mov ecx, dword [eax + 0x28]
cmp ecx, edx
fmul dword [ebx + 0x34]
mov dword [esp + 0x68], edx
mov dword [esp + 0x84], ecx
fstp dword [esp + 0x6c]
fld dword [eax + 0x10]
fmul dword [ebx + 0x38]
fstp dword [esp + 0x70]
fld dword [eax + 0x18]
faddp st(2)
fxch st(1)
fstp dword [esp + 0x74]
fld dword [eax + 0x1c]
faddp st(2)
fxch st(1)
fstp dword [esp + 0x78]
fxch st(1)
fst dword [esp + 0x7c]
fxch st(1)
fstp dword [esp + 0x80]
jne 0x407678
mov dword [esp + 0x84], esi
fld dword [eax + 0x20]
mov dword [esp + 0x88], edx
fmul dword [ebx + 0x34]
fstp dword [esp + 0x8c]
fld dword [eax + 0x24]
fmul dword [ebx + 0x38]
fstp dword [esp + 0x90]
fld dword [ebx + 0x34]
fstp dword [esp + 0x18]
fld dword [ebx + 0x38]
fstp dword [esp + 0x14]
fst dword [esp + 0x10]
fst dword [esp + 0xc]
fld dword [esp + 0x4c]
fld dword [esp + 0x18]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x4076c4
fst dword [esp + 0x18]
fld dword [esp + 0x50]
fld dword [esp + 0x14]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x4076d9
fst dword [esp + 0x14]
fxch st(1)
fcom st(2)
fnstsw ax
test ah, 0x41
jne 0x4076ea
fstp dword [esp + 0x10]
jmp 0x4076ec
fstp st(0)
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
jne 0x4076fd
fstp dword [esp + 0xc]
jmp 0x4076ff
fstp st(0)
fld dword [esp + 0x6c]
fld dword [esp + 0x18]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x407714
fst dword [esp + 0x18]
fld dword [esp + 0x70]
fld dword [esp + 0x14]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x407729
fst dword [esp + 0x14]
fld dword [esp + 0x10]
fcomp st(2)
fnstsw ax
test ah, 5
jp 0x40773e
fxch st(1)
fstp dword [esp + 0x10]
jmp 0x407740
fstp st(1)
fld dword [esp + 0xc]
fcomp st(1)
fnstsw ax
test ah, 5
jp 0x407753
fstp dword [esp + 0xc]
jmp 0x407755
fstp st(0)
fld dword [esp + 0x8c]
fld dword [esp + 0x18]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x40776d
fst dword [esp + 0x18]
fld dword [esp + 0x90]
fld dword [esp + 0x14]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x407785
fst dword [esp + 0x14]
fld dword [esp + 0x10]
fcomp st(2)
fnstsw ax
test ah, 5
jp 0x40779a
fxch st(1)
fstp dword [esp + 0x10]
jmp 0x40779c
fstp st(1)
fld dword [esp + 0xc]
fcomp st(1)
fnstsw ax
test ah, 5
jp 0x4077af
fstp dword [esp + 0xc]
jmp 0x4077b1
fstp st(0)
lea eax, [esp + 0xd24]
mov dword [esp + 0x19a4], eax
mov eax, 0x64
mov dword [esp + 0x19ac], eax
xor edx, edx
mov dword [esp + 0x4c00], edx
mov ecx, 8
lea esi, [esp + 0x34]
lea edi, [esp + 0xd24]
rep movsd dword es:[edi], dword [esi]
mov ecx, 8
lea esi, [esp + 0x54]
lea edi, [esp + 0xd44]
rep movsd dword es:[edi], dword [esi]
mov ecx, 8
lea esi, [esp + 0x74]
lea edi, [esp + 0xd64]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x19b4]
mov dword [esp + 0x19a8], 3
mov dword [esp + 0x2634], ecx
mov dword [esp + 0x2638], edx
mov dword [esp + 0x263c], eax
sub esp, 8
fld dword [esp + 0x20]
mov byte [esp + 0x4c08], 1
fstp qword [esp]
call fcn.005879b0
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
call fcn.005690a0
fld dword [esp + 0x1c]
mov edi, eax
fstp qword [esp]
mov dword [esp + 0x34], edi
call fcn.005879b0
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
call fcn.005690a0
fld dword [esp + 0x18]
fstp qword [esp]
mov esi, eax
call fcn.0056cb50
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
call fcn.005690a0
fld dword [esp + 0x14]
fstp qword [esp]
mov dword [esp + 0x1c], eax
call fcn.0056cb50
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
add esp, 8
call fcn.005690a0
test edi, edi
mov dword [esp + 0x18], eax
jge 0x4078bf
mov dword [esp + 0x2c], 0
test esi, esi
jge 0x4078c5
xor esi, esi
mov eax, dword [ebx + 0x1c]
cmp dword [esp + 0x14], eax
jle 0x4078d2
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x20]
mov edi, dword [esp + 0x18]
cmp edi, eax
jle 0x4078e3
mov edi, eax
mov dword [esp + 0x18], edi
mov eax, dword [ebx + 4]
test eax, eax
je 0x407901
mov ecx, dword [ebx + 8]
sub ecx, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
jne 0x407906
call fcn.0056999e
cmp esi, edi
mov ecx, dword [ebx + 4]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], esi
jge 0x407c0d
lea esp, [esp]
mov eax, dword [esp + 0x2c]
cmp eax, dword [esp + 0x14]
mov dword [esp + 0xc], eax
jge 0x407bf8
fild dword [esp + 0x10]
fstp dword [esp + 0x20]
lea ebx, [ebx]
mov esi, dword [ebx + 0x1c]
imul esi, dword [esp + 0x10]
mov eax, dword [ebx + 4]
add esi, dword [esp + 0xc]
test eax, eax
je 0x40796c
mov ecx, dword [ebx + 8]
sub ecx, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jb 0x407971
call fcn.0056999e
mov eax, dword [ebx + 4]
mov edi, dword [esp + 0x19a8]
cmp edi, 0x64
lea edx, [esi + esi*2]
lea esi, [eax + edx*4]
lea ecx, [esp + 0x94]
mov eax, edi
mov dword [esp + 0xd14], ecx
mov dword [esp + 0xd18], eax
mov dword [esp + 0xd1c], 0x64
jle 0x407a11
xor ecx, ecx
mov edx, 0x20
mul edx
seto cl
mov dword [esp + 0xd1c], edi
neg ecx
or ecx, eax
push ecx
call fcn.00568c31
mov ecx, dword [esp + 0xd18]
mov edi, eax
mov eax, dword [esp + 0xd1c]
add esp, 4
shl eax, 5
push eax
push ecx
push edi
call fcn.0056b730
mov eax, dword [esp + 0xd20]
lea edx, [esp + 0xa0]
add esp, 0xc
cmp eax, edx
je 0x407a01
push eax
call fcn.00569095
add esp, 4
mov eax, dword [esp + 0xd18]
mov ecx, edi
mov dword [esp + 0xd14], ecx
shl eax, 5
push eax
mov eax, dword [esp + 0x19a8]
push eax
push ecx
call fcn.0056b730
add esp, 0xc
fild dword [esp + 0xc]
mov byte [esp + 0x4c00], 2
mov eax, dword [esp + 0xd14]
fstp dword [esp + 0x30]
mov edx, dword [esp + 0x10]
fld dword [eax + 0x18]
fld dword [esp + 0x30]
fld st(0)
fsubp st(2)
fxch st(1)
fstp dword [eax + 0x18]
mov eax, dword [esp + 0xd14]
fld dword [eax + 0x1c]
fld dword [esp + 0x20]
fld st(0)
fsubp st(2)
fxch st(1)
fstp dword [eax + 0x1c]
mov ecx, dword [ebx + 0x20]
sub ecx, 1
cmp edx, ecx
mov ecx, dword [esp + 0x1c]
jne 0x407a89
fild dword [ecx + 8]
mov eax, dword [esp + 0xd14]
fidiv dword [esi + 8]
fmul dword [eax + 0x1c]
fstp dword [eax + 0x1c]
mov eax, dword [ebx + 0x1c]
mov edi, dword [esp + 0xc]
sub eax, 1
cmp edi, eax
jne 0x407aaa
fild dword [ecx + 4]
mov eax, dword [esp + 0xd14]
fidiv dword [esi + 4]
fmul dword [eax + 0x18]
fstp dword [eax + 0x18]
mov eax, dword [esp + 0xd14]
fld dword [eax + 0x38]
fsub st(2)
fstp dword [eax + 0x38]
mov eax, dword [esp + 0xd14]
fld dword [eax + 0x3c]
fsub st(1)
fstp dword [eax + 0x3c]
mov eax, dword [ebx + 0x20]
sub eax, 1
cmp edx, eax
jne 0x407ae5
fild dword [ecx + 8]
mov eax, dword [esp + 0xd14]
fidiv dword [esi + 8]
fmul dword [eax + 0x3c]
fstp dword [eax + 0x3c]
mov eax, dword [ebx + 0x1c]
sub eax, 1
cmp edi, eax
jne 0x407b02
fild dword [ecx + 4]
mov eax, dword [esp + 0xd14]
fidiv dword [esi + 4]
fmul dword [eax + 0x38]
fstp dword [eax + 0x38]
mov eax, dword [esp + 0xd14]
fld dword [eax + 0x58]
fsubrp st(2)
fxch st(1)
fstp dword [eax + 0x58]
mov eax, dword [esp + 0xd14]
fsubr dword [eax + 0x5c]
fstp dword [eax + 0x5c]
mov eax, dword [ebx + 0x20]
sub eax, 1
cmp edx, eax
jne 0x407b3d
fild dword [ecx + 8]
mov eax, dword [esp + 0xd14]
fidiv dword [esi + 8]
fmul dword [eax + 0x5c]
fstp dword [eax + 0x5c]
mov edx, dword [ebx + 0x1c]
sub edx, 1
cmp edi, edx
jne 0x407b5a
fild dword [ecx + 4]
mov eax, dword [esp + 0xd14]
fidiv dword [esi + 4]
fmul dword [eax + 0x58]
fstp dword [eax + 0x58]
lea edi, [esp + 0x94]
call fcn.00406e00
cmp dword [esp + 0xd18], 3
jl 0x407bc0
mov ecx, dword [esi]
mov edi, dword [ebp + 8]
mov eax, dword [edi]
mov edx, dword [eax + 0x8c]
push ecx
push 0
push edi
call edx
push eax
mov ecx, str.SetTexture_gTexture
call fcn.00404b10
mov ecx, dword [esp + 0xd1c]
mov edx, dword [esp + 0xd18]
mov eax, dword [edi]
mov eax, dword [eax + 0x64]
add esp, 4
push 0
push ecx
push edx
push 0x1c4
push 6
push edi
call eax
push eax
mov ecx, str.DrawPrimitive__Tri__4
call fcn.00404b10
add esp, 4
mov byte [esp + 0x4c00], 1
mov eax, dword [esp + 0xd14]
lea ecx, [esp + 0x94]
cmp eax, ecx
je 0x407be3
push eax
call fcn.00569095
add esp, 4
mov eax, dword [esp + 0xc]
add eax, 1
cmp eax, dword [esp + 0x14]
mov dword [esp + 0xc], eax
jl 0x407940
mov eax, dword [esp + 0x10]
add eax, 1
cmp eax, dword [esp + 0x18]
mov dword [esp + 0x10], eax
jl 0x407920
mov eax, dword [esp + 0x2634]
lea edx, [esp + 0x19b4]
cmp eax, edx
je 0x407c28
push eax
call fcn.00569095
add esp, 4
mov dword [esp + 0x4c00], 0xffffffff
mov eax, dword [esp + 0x19a4]
lea ecx, [esp + 0xd24]
cmp eax, ecx
je 0x407c4e
push eax
call fcn.00569095
add esp, 4
add dword [esp + 0x24], 0x3c
sub dword [esp + 0x28], 1
jne 0x4075a0
mov ecx, dword [esp + 0x4bf8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x14