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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x77ccf8
mov eax, dword fs:[0]
push eax
sub esp, 0xb8
push ebx
push esi
push edi
mov eax, dword [0x84dea4]
xor eax, esp
push eax
lea eax, [esp + 0xc8]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x44], ebx
mov edi, dword [ebp + 0x20]
xor esi, esi
cmp edi, esi
mov dword [esp + 0x6c], esi
je 0x57f04d
push esi
push 0xc5
push str..CTerrainHeight.cpp
push 0x14
call sub.Storm.dll_Ordinal_401
cmp eax, esi
je 0x57f03f
mov dword [eax], vtable.CVertexUndoableGroup.0
mov dword [eax + 4], esi
mov dword [eax + 8], esi
mov dword [eax + 0xc], esi
mov dword [eax + 0x10], esi
jmp 0x57f041
xor eax, eax
push eax
mov ecx, edi
mov dword [esp + 0x70], eax
call fcn.00555610
mov eax, dword [ebp + 0x18]
push eax
mov ecx, ebx
call fcn.00528e00
mov edi, dword [ebx + 0xb4]
xor edx, edx
lea esi, [edi + 1]
mov ecx, eax
div esi
cmp dword [ebp + 0x14], 0
mov dword [esp + 0x80], edx
mov dword [esp + 0x70], eax
je 0x57f0ab
lea eax, [ecx*8]
sub eax, ecx
mov ecx, dword [ebx + 0xe4]
mov eax, dword [ecx + eax*4]
and eax, 0x3fff
or eax, 0x22c000
shl eax, 9
mov dword [esp + 0x54], eax
fld dword [esp + 0x54]
fsub qword [0x7ad320]
fstp dword [ebx + 0x948]
mov ecx, dword [ebp + 0xc]
mov eax, edx
sub eax, ecx
lea esi, [eax + 1]
xor eax, eax
test esi, esi
setle al
sub eax, 1
and esi, eax
lea eax, [edx + ecx - 1]
cmp eax, edi
mov dword [esp + 0x5c], esi
mov dword [esp + 0x64], eax
jl 0x57f0d5
mov dword [esp + 0x64], edi
mov eax, dword [esp + 0x70]
mov edx, eax
sub edx, ecx
lea edi, [edx + 1]
xor edx, edx
test edi, edi
setle dl
lea ecx, [eax + ecx - 1]
mov eax, dword [ebx + 0xb8]
mov dword [esp + 0x60], ecx
sub edx, 1
and edi, edx
cmp ecx, eax
mov dword [esp + 0x58], edi
jl 0x57f106
mov dword [esp + 0x60], eax
mov ecx, dword [esp + 0x64]
mov eax, dword [esp + 0x60]
xor edx, edx
sub ecx, esi
sub eax, edi
add ecx, 1
add eax, 1
cmp dword [ebp + 0x10], edx
mov dword [esp + 0x54], ecx
sete dl
mov dword [esp + 0x68], edx
mov edx, dword [ebp + 8]
test edx, edx
je 0x57f134
cmp edx, 1
jne 0x57f13c
mov dword [esp + 0x68], 1
cmp edx, 4
jne 0x57f5cc
cmp dword [ebp + 0x1c], 0
je 0x57f15d
fld dword [ebx + 0x994]
fstp dword [esp + 0x78]
fld dword [ebx + 0x998]
jmp 0x57f16d
fld dword [ebx + 0x98c]
fstp dword [esp + 0x78]
fld dword [ebx + 0x990]
imul eax, ecx
fstp dword [esp + 0x7c]
lea edx, [ebx + 0x1bc]
push eax
mov ecx, edx
call fcn.004c00e0
mov eax, dword [ebx + 0x1c0]
mov ecx, dword [ebx + 0x1c4]
add eax, eax
add eax, eax
push eax
push 0
push ecx
call sub.MSVCR80.dll_memset
add esp, 0xc
cmp esi, dword [esp + 0x64]
mov ecx, esi
mov dword [esp + 0x30], esi
jg 0x57f5cc
mov edi, edi
cmp edi, dword [esp + 0x60]
jg 0x57f5bb
mov edx, ecx
sub edx, dword [esp + 0x80]
mov eax, ecx
mov dword [esp + 0x28], edx
fild dword [esp + 0x28]
sub eax, esi
add eax, eax
add eax, eax
fstp dword [esp + 0x28]
mov dword [esp + 0x40], eax
fld dword [esp + 0x28]
mov eax, 1
fmul st(0), st(0)
add edi, 0xffffffff
sub eax, dword [esp + 0x70]
fstp qword [esp + 0x84]
mov dword [esp + 0x90], eax
jmp 0x57f200
mov ebx, dword [ebx + 0xb4]
lea eax, [edi + 1]
mov dword [esp + 0x1c], eax
lea esi, [ebx + 1]
imul eax, esi
mov edx, dword [esp + 0x44]
mov edx, dword [edx + 0xe4]
add eax, ecx
lea ecx, [eax*8]
sub ecx, eax
mov eax, dword [esp + 0x90]
add eax, edi
mov dword [esp + 0x28], eax
lea edx, [edx + ecx*4]
mov dword [esp + 0x48], edx
fild dword [esp + 0x28]
fstp dword [esp + 0x28]
fld dword [esp + 0x28]
fmul st(0), st(0)
fadd qword [esp + 0x84]
fstp dword [esp + 0x28]
fld dword [esp + 0x28]
call sub.MSVCR80.dll__CIsqrt
fstp dword [esp + 0x28]
mov eax, dword [ebp + 0xc]
fld dword [esp + 0x28]
cmp eax, 1
fstp dword [esp + 0x14]
jle 0x57f285
fld dword [esp + 0x14]
add eax, 0xffffffff
mov dword [esp + 0x28], eax
fidiv dword [esp + 0x28]
fstp dword [esp + 0x14]
cmp dword [esp + 0x68], 0
je 0x57f29d
fld1
fcomp dword [esp + 0x14]
fnstsw ax
test ah, 5
jnp 0x57f58e
mov edx, dword [esp + 0x30]
xor ecx, ecx
lea eax, [edx - 1]
test eax, eax
setle cl
sub ecx, 1
and ecx, eax
lea eax, [edx + 1]
cmp eax, ebx
mov dword [esp + 0x74], ecx
mov dword [esp + 0x50], eax
jl 0x57f2c3
mov dword [esp + 0x50], ebx
xor edx, edx
test edi, edi
setle dl
sub edx, 1
and edx, edi
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x44]
mov eax, dword [edx + 0xb8]
add edi, 2
cmp edi, eax
mov dword [esp + 0x38], edi
jl 0x57f2ec
mov dword [esp + 0x38], eax
fldz
mov eax, dword [esp + 0x2c]
cmp eax, dword [esp + 0x38]
fst dword [esp + 0x18]
fstp dword [esp + 0x24]
mov dword [esp + 0x3c], eax
fld qword [0x7ad320]
jg 0x57f53e
imul esi, dword [esp + 0x2c]
mov eax, dword [esp + 0x50]
sub eax, ecx
add eax, 1
mov dword [esp + 0xa4], eax
lea eax, [ebx + 1]
lea edi, [eax*8]
sub edi, eax
lea eax, [esi + ecx + 2]
add edi, edi
lea esi, [eax*8]
mov ebx, ecx
add edi, edi
neg ebx
sub esi, eax
mov eax, dword [edx + 0xe4]
lea eax, [eax + esi*4]
mov dword [esp + 0x28], edi
mov dword [esp + 0x34], 0x83da30
mov dword [esp + 0x2c], eax
cmp dword [esp + 0xa4], 4
mov esi, ecx
jl 0x57f48e
mov esi, dword [esp + 0x74]
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x2c]
sub edx, esi
sub edx, 3
shr edx, 2
add edx, 1
lea esi, [esi + edx*4]
mov edi, dword [ecx - 0x38]
and edi, 0x3fff
or edi, 0x22c000
shl edi, 9
mov dword [esp + 0x14], edi
fld dword [esp + 0x14]
mov edi, dword [ecx - 0x1c]
fsub st(1)
and edi, 0x3fff
or edi, 0x22c000
shl edi, 9
fstp dword [esp + 0x14]
add ecx, 0x70
fld dword [esp + 0x14]
mov dword [esp + 0x14], edi
fmul dword [eax - 4]
mov edi, dword [ecx - 0x70]
and edi, 0x3fff
or edi, 0x22c000
fadd dword [esp + 0x18]
shl edi, 9
add eax, 0x10
fstp dword [esp + 0x18]
fld dword [esp + 0x14]
fsub st(1)
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
mov dword [esp + 0x14], edi
fmul dword [eax - 0x10]
mov edi, dword [ecx - 0x54]
and edi, 0x3fff
or edi, 0x22c000
fadd dword [esp + 0x18]
shl edi, 9
sub edx, 1
fstp dword [esp + 0x18]
fld dword [esp + 0x14]
fsub st(1)
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
mov dword [esp + 0x14], edi
fmul dword [eax - 0xc]
fadd dword [esp + 0x18]
fstp dword [esp + 0x18]
fld dword [esp + 0x14]
fsub st(1)
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fmul dword [eax - 8]
fadd dword [esp + 0x18]
fstp dword [esp + 0x18]
fld dword [eax - 0x14]
fadd dword [esp + 0x24]
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
fadd dword [eax - 0x10]
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
fadd dword [eax - 0xc]
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
fadd dword [eax - 8]
fstp dword [esp + 0x24]
jne 0x57f38b
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x44]
mov edi, dword [esp + 0x28]
cmp esi, dword [esp + 0x50]
jg 0x57f51d
mov eax, dword [edx + 0xb4]
mov edx, dword [edx + 0xe4]
add eax, 1
imul eax, dword [esp + 0x3c]
add eax, esi
lea edi, [eax*8]
sub edi, eax
mov eax, dword [esp + 0x50]
lea ecx, [ebx + esi]
sub eax, esi
lea ecx, [ecx*4 + 0x83da2c]
lea edx, [edx + edi*4]
add eax, 1
mov esi, dword [edx]
and esi, 0x3fff
or esi, 0x22c000
shl esi, 9
mov dword [esp + 0x14], esi
fld dword [esp + 0x14]
add edx, 0x1c
fsub st(1)
add ecx, 4
sub eax, 1
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fmul dword [ecx - 4]
fadd dword [esp + 0x18]
fstp dword [esp + 0x18]
fld dword [ecx - 4]
fadd dword [esp + 0x24]
fstp dword [esp + 0x24]
jne 0x57f4cd
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x44]
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x3c]
add dword [esp + 0x34], 0xc
add dword [esp + 0x2c], edi
add eax, 1
add ebx, 3
cmp eax, dword [esp + 0x38]
mov dword [esp + 0x3c], eax
jle 0x57f35d
mov eax, dword [esp + 0x48]
fld dword [esp + 0x18]
fmul dword [esp + 0x7c]
mov ecx, dword [eax]
mov edx, dword [edx + 0x1c4]
mov eax, dword [esp + 0x40]
fdiv dword [esp + 0x24]
and ecx, 0x3fff
or ecx, 0x22c000
shl ecx, 9
mov dword [esp + 0x48], ecx
fld dword [esp + 0x48]
fsubrp st(2)
fxch st(1)
fstp dword [esp + 0x48]
fld dword [esp + 0x48]
fmul dword [esp + 0x78]
faddp st(1)
fstp dword [esp + 0x48]
fld dword [esp + 0x48]
fstp dword [eax + edx]
mov eax, dword [esp + 0x54]
mov edi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x44]
add eax, eax
add eax, eax
add dword [esp + 0x40], eax
lea ecx, [edi + 1]
cmp ecx, dword [esp + 0x60]
mov ecx, dword [esp + 0x30]
jle 0x57f200
mov esi, dword [esp + 0x5c]
mov edi, dword [esp + 0x58]
add ecx, 1
cmp ecx, dword [esp + 0x64]
mov dword [esp + 0x30], ecx
jle 0x57f1b0
xor eax, eax
mov dword [esp + 0x94], eax
mov dword [esp + 0x98], eax
mov dword [esp + 0x9c], eax
mov dword [esp + 0xa0], eax
cmp esi, dword [esp + 0x64]
mov dword [esp + 0xd0], eax
mov dword [esp + 0x30], esi
jg 0x57f993
sub esi, dword [esp + 0x80]
mov dword [esp + 0x34], eax
mov dword [esp + 0x3c], esi
mov edi, edi
cmp edi, dword [esp + 0x60]
mov dword [esp + 0x40], edi
jg 0x57f974
fild dword [esp + 0x3c]
sub edi, dword [esp + 0x70]
mov edx, dword [esp + 0x34]
mov dword [esp + 0x2c], edi
fstp dword [esp + 0x48]
mov dword [esp + 0x38], edx
fld dword [esp + 0x48]
fmul st(0), st(0)
fstp qword [esp + 0x84]
mov eax, dword [ebx + 0xb4]
fild dword [esp + 0x2c]
mov edx, dword [ebx + 0xe4]
add eax, 1
imul eax, dword [esp + 0x40]
fstp dword [esp + 0x4c]
fld dword [esp + 0x4c]
fmul st(0), st(0)
fadd qword [esp + 0x84]
add eax, dword [esp + 0x30]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
lea edi, [esp + 0xa8]
lea ecx, [eax*8]
sub ecx, eax
lea esi, [edx + ecx*4]
mov ecx, 7
rep movsd dword es:[edi], dword [esi]
call sub.MSVCR80.dll__CIsqrt
mov eax, dword [ebp + 0xc]
cmp eax, 1
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fstp dword [esp + 0x14]
jle 0x57f6be
fld dword [esp + 0x14]
add eax, 0xffffffff
mov dword [esp + 0x1c], eax
fidiv dword [esp + 0x1c]
fstp dword [esp + 0x14]
cmp dword [esp + 0x68], 0
fld dword [esp + 0x14]
je 0x57f6d8
fld1
fcomp st(1)
fnstsw ax
test ah, 5
jnp 0x57f948
mov esi, dword [ebp + 8]
cmp esi, 4
ja case.default.0x57f6e4
jmp dword [esi*4 + 0x57f9fc]
fmul qword [0x79a618]
fmul qword [0x7988a0]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
call sub.MSVCR80.dll__CIcos
fstp dword [esp + 0x1c]
cmp esi, 1
fld dword [esp + 0x1c]
fimul dword [ebp + 0xc]
fmul dword [0x83da64]
fstp dword [esp + 0x24]
jne 0x57f72c
fld dword [esp + 0x24]
fmul qword [0x7a64b8]
fstp dword [esp + 0x24]
cmp dword [ebp + 0x1c], 0
je 0x57f740
fld dword [esp + 0x24]
fmul qword [0x7a64b8]
fstp dword [esp + 0x24]
mov ecx, dword [esp + 0xa8]
fnstcw word [esp + 0x18]
mov eax, ecx
and eax, 0x3fff
or eax, 0x22c000
shl eax, 9
mov dword [esp + 0x1c], eax
fld dword [esp + 0x1c]
movzx eax, word [esp + 0x18]
fsub qword [0x7ad320]
or eax, 0xc00
and ecx, 0xffffc000
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fadd dword [esp + 0x24]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fadd qword [0x7bad40]
fmul qword [0x7bad38]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
mov dword [esp + 0x1c], eax
fldcw word [esp + 0x1c]
fistp qword [esp + 0x1c]
mov edx, dword [esp + 0x1c]
or edx, ecx
mov dword [esp + 0xa8], edx
fldcw word [esp + 0x18]
jmp 0x57f904
mov ecx, dword [esp + 0xa8]
fstp st(0)
fld dword [ebx + 0x948]
and ecx, 0xffffc000
fadd qword [0x7bad40]
fnstcw word [esp + 0x18]
fmul qword [0x7bad38]
movzx eax, word [esp + 0x18]
or eax, 0xc00
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
mov dword [esp + 0x1c], eax
fldcw word [esp + 0x1c]
fistp qword [esp + 0x1c]
mov eax, dword [esp + 0x1c]
or eax, ecx
mov dword [esp + 0xa8], eax
fldcw word [esp + 0x18]
jmp 0x57f904
mov edx, dword [esp + 0xa8]
fstp st(0)
and edx, 0x3fff
or edx, 0x22c000
shl edx, 9
push 0x64
mov dword [esp + 0x20], edx
call fcn.0057d390
fld dword [esp + 0x1c]
fsub qword [0x7ad320]
mov ecx, dword [esp + 0xa8]
fnstcw word [esp + 0x18]
and ecx, 0xffffc000
movzx eax, word [esp + 0x18]
fstp dword [esp + 0x1c]
fadd dword [esp + 0x1c]
or eax, 0xc00
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fadd qword [0x7bad40]
fmul qword [0x7bad38]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
mov dword [esp + 0x1c], eax
fldcw word [esp + 0x1c]
fistp qword [esp + 0x1c]
mov edx, dword [esp + 0x1c]
or ecx, edx
mov dword [esp + 0xa8], ecx
fldcw word [esp + 0x18]
jmp 0x57f904
mov eax, dword [ebx + 0x1c4]
fstp st(0)
mov ecx, dword [esp + 0x38]
fnstcw word [esp + 0x18]
fld dword [eax + ecx]
fadd qword [0x7bad40]
movzx eax, word [esp + 0x18]
or eax, 0xc00
fmul qword [0x7bad38]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
mov dword [esp + 0x1c], eax
fldcw word [esp + 0x1c]
mov eax, dword [esp + 0xa8]
and eax, 0xffffc000
fistp qword [esp + 0x1c]
mov edx, dword [esp + 0x1c]
or edx, eax
mov dword [esp + 0xa8], edx
fldcw word [esp + 0x18]
jmp 0x57f904
fstp st(0)
mov ecx, dword [esp + 0x6c]
mov eax, dword [esp + 0xac]
push 3
push ecx
lea edx, [esp + 0xb0]
push edx
and eax, 0x3ffff
push eax
mov ecx, ebx
call fcn.005fe3c0
mov edx, dword [esp + 0xac]
push 0
lea ecx, [esp + 0x98]
push ecx
and edx, 0x3ffff
push edx
mov ecx, ebx
call fcn.00529d60
jmp 0x57f94a
fstp st(0)
mov ecx, dword [esp + 0x54]
mov eax, dword [esp + 0x40]
add dword [esp + 0x2c], 1
add ecx, ecx
add ecx, ecx
add dword [esp + 0x38], ecx
add eax, 1
cmp eax, dword [esp + 0x60]
mov dword [esp + 0x40], eax
jle 0x57f643
mov edi, dword [esp + 0x58]
mov eax, dword [esp + 0x30]
add dword [esp + 0x34], 4
add dword [esp + 0x3c], 1
add eax, 1
cmp eax, dword [esp + 0x64]
mov dword [esp + 0x30], eax
jle 0x57f610
mov eax, dword [esp + 0x6c]
push eax
lea ecx, [esp + 0x98]
push ecx
mov ecx, ebx
call fcn.0057ebf0
mov edx, dword [ebp + 0x20]
push edx
lea eax, [esp + 0x98]
push eax
mov ecx, ebx
call fcn.005ddcd0
mov ecx, ebx
call fcn.005d80c0
mov ecx, ebx
call fcn.005daf10
mov eax, dword [esp + 0x9c]
test eax, eax
je 0x57f9e2
push 0
push 0xfffffffffffffffe
push str..PAUTerrainModel__
push eax
call sub.Storm.dll_Ordinal_403
mov ecx, dword [esp + 0xc8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c