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

Disassembly:
sub esp, 0x74
push ebx
push ebp
push esi
mov esi, dword [esp + 0x84]
mov eax, dword [esi]
lea eax, [eax + eax*4]
shl eax, 2
mov edx, dword [eax + 0x7da89c]
mov ecx, dword [eax + 0x7da898]
mov dword [esp + 0x60], ecx
mov ecx, dword [eax + 0x7da8a0]
mov dword [esp + 0x64], edx
mov edx, dword [eax + 0x7da8a4]
push edi
mov eax, edx
mov dword [esp + 0x6c], ecx
push eax
lea ecx, [esp + 0x68]
push ecx
mov dword [esp + 0x78], edx
call fcn.004187b0
mov ecx, dword [esi + 4]
xor ebp, ebp
add esp, 8
xor ebx, ebx
cmp ecx, ebp
mov dword [esp + 0x14], eax
jle 0x4157cc
lea edi, [esi + 8]
cmp eax, ebp
je 0x415edd
mov ecx, dword [edi]
cmp ecx, dword [esi]
je 0x4157bd
lea eax, [ecx + ecx*4]
shl eax, 2
mov edx, dword [eax + 0x7da898]
mov ecx, dword [eax + 0x7da89c]
mov dword [esp + 0x64], edx
mov edx, dword [eax + 0x7da8a0]
mov eax, dword [eax + 0x7da8a4]
mov dword [esp + 0x70], eax
cmp dword [edi + 0x68], ebp
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], edx
jne 0x41579d
fld dword [0x8c6554]
fsub dword [esp + 0x64]
fstp dword [esp + 0x64]
fld dword [0x8c6558]
fsub dword [esp + 0x68]
fstp dword [esp + 0x68]
fld dword [0x8c655c]
fsub dword [esp + 0x6c]
fstp dword [esp + 0x6c]
fld dword [esp + 0x70]
fchs
fstp dword [esp + 0x70]
mov ecx, dword [esp + 0x70]
push 0x3dcccccd
push ecx
lea edx, [esp + 0x6c]
push edx
lea eax, [esp + 0x20]
push eax
call fcn.00418af0
mov eax, dword [esp + 0x24]
add esp, 0x10
mov ecx, dword [esi + 4]
inc ebx
add edi, 4
cmp ebx, ecx
jl 0x415724
cmp eax, ebp
je 0x415edd
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x5c]
push edx
push eax
call fcn.00418720
add esp, 0xc
mov dword [esp + 0x20], ebp
mov dword [esp + 0x1c], ebp
mov ebx, ebp
or ebp, 0xffffffff
mov dword [esp + 0x18], ebp
cmp ebp, 1
fild dword [esp + 0x18]
mov dword [esp + 0x6c], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x64], 0
fstp dword [esp + ebx + 0x64]
jne 0x415823
fld dword [esp + ebx + 0x4c]
jmp 0x415829
fld dword [esp + ebx + 0x58]
fchs
lea eax, [esp + 0x10]
fstp dword [esp + 0x70]
push eax
mov eax, dword [esi]
lea ecx, [esp + 0x68]
lea edx, [eax + eax*4]
push ecx
lea eax, [edx*4 + 0x7da898]
push eax
call fcn.004155c0
add esp, 0xc
test eax, eax
jne 0x41599e
mov eax, dword [esi + 4]
xor edi, edi
test eax, eax
jle 0x415892
lea ebx, [esi + 8]
mov eax, dword [ebx]
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x68]
lea eax, [eax + eax*4]
push edx
lea ecx, [eax*4 + 0x7da898]
push ecx
call fcn.004155c0
add esp, 0xc
test eax, eax
jne 0x41588e
mov eax, dword [esi + 4]
inc edi
add ebx, 4
cmp edi, eax
jl 0x415860
mov ebx, dword [esp + 0x1c]
mov eax, dword [esi + 4]
cmp edi, eax
jne 0x41599e
cmp eax, 0x1a
jle 0x4158af
push str.ERROR:_too_many_bevels_n
call fcn.0041cb80
add esp, 4
mov edi, dword [0x7da850]
xor ebx, ebx
test edi, edi
jle 0x4158e9
mov ebp, 0x7da898
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x68]
push eax
push ebp
call fcn.004155c0
add esp, 0xc
test eax, eax
jne 0x415a80
mov edi, dword [0x7da850]
inc ebx
add ebp, 0x14
cmp ebx, edi
jl 0x4158c0
cmp edi, 0x800
jne 0x415906
push str.MAX_PATCH_PLANES
push 1
call fcn.0041cd90
mov edi, dword [0x7da850]
add esp, 8
mov ecx, dword [esp + 0x64]
mov eax, dword [esp + 0x68]
lea edx, [edi + edi*4]
shl edx, 2
mov dword [edx + 0x7da898], ecx
mov ecx, dword [esp + 0x6c]
mov dword [edx + 0x7da89c], eax
mov eax, dword [esp + 0x70]
mov dword [edx + 0x7da8a0], ecx
xor ebp, ebp
mov dword [edx + 0x7da8a4], eax
xor ecx, ecx
lea ebx, [esp + 0x64]
fld dword [ebx]
fcomp dword [0x4bc2d8]
fnstsw ax
test ah, 1
je 0x415954
mov eax, 1
shl eax, cl
or ebp, eax
inc ecx
add ebx, 4
cmp ecx, 3
jl 0x41593c
inc edi
mov dword [0x7da850], edi
mov dword [edx + 0x7da8a8], ebp
mov dword [esp + 0x10], 0
dec edi
mov ecx, dword [esi + 4]
mov ebp, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
mov dword [esi + ecx*4 + 8], edi
mov edx, dword [esi + 4]
mov dword [esi + edx*4 + 0xd8], 0
mov eax, dword [esi + 4]
mov ecx, dword [esp + 0x10]
mov dword [esi + eax*4 + 0x70], ecx
inc dword [esi + 4]
mov ecx, dword [esp + 0x20]
add ebp, 2
inc ecx
cmp ebp, 1
mov dword [esp + 0x18], ebp
mov dword [esp + 0x20], ecx
jle 0x4157f8
add ebx, 4
cmp ebx, 0xc
mov dword [esp + 0x1c], ebx
jl 0x4157f1
mov ecx, dword [esp + 0x14]
mov ebx, dword [ecx]
xor edi, edi
test ebx, ebx
jle 0x415eab
lea ebp, [edi + 1]
mov eax, ebp
cdq
idiv ebx
lea eax, [edi + edi*2]
shl eax, 2
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ebp
fld dword [eax + ecx + 4]
lea edi, [edx + edx*2]
fsub dword [ecx + edi*4 + 4]
lea edi, [ecx + edi*4]
lea edx, [edx + edx*2 + 3]
fstp dword [esp + 0x34]
fld dword [eax + ecx + 8]
lea eax, [ebp + ebp*2]
fsub dword [edi + 8]
shl eax, 2
mov dword [esp + 0x28], eax
fstp dword [esp + 0x38]
fld dword [eax + ecx]
lea eax, [esp + 0x34]
fsub dword [ecx + edx*4]
push eax
fstp dword [esp + 0x40]
call fcn.0042c7d0
fcomp qword [0x4bc320]
add esp, 4
fnstsw ax
test ah, 1
jne 0x415ee5
xor ecx, ecx
lea edx, [esp + 0x34]
fld dword [edx]
fsub dword [0x4bc318]
fabs
fcomp qword [0x4bc380]
fnstsw ax
test ah, 1
jne 0x415a87
fld dword [edx]
fsub dword [0x4bc388]
fabs
fcomp qword [0x4bc380]
fnstsw ax
test ah, 1
jne 0x415aa9
inc ecx
add edx, 4
cmp ecx, 3
jl 0x415a47
jmp 0x415ac9
mov edi, ebx
jmp 0x415973
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x34], 0
mov dword [esp + ecx*4 + 0x34], 0x3f800000
jmp 0x415ac9
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x34], 0
mov dword [esp + ecx*4 + 0x34], 0xbf800000
xor ecx, ecx
lea eax, [esp + 0x34]
mov edx, dword [eax]
cmp edx, 0xbf800000
je 0x415aec
cmp edx, 0x3f800000
je 0x415aec
inc ecx
add eax, 4
cmp ecx, 3
jl 0x415acf
jmp 0x415af5
cmp ecx, 3
jl 0x415ee5
lea ecx, [esp + 0x40]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], 3
mov dword [esp + 0x18], 0xffffffff
fild dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x48], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x40], 0
fstp dword [edx]
fld dword [esp + 0x48]
lea eax, [esp + 0x64]
fmul dword [esp + 0x38]
push eax
fld dword [esp + 0x48]
fmul dword [esp + 0x40]
fsubp st(1)
fstp dword [esp + 0x68]
fld dword [esp + 0x44]
fmul dword [esp + 0x40]
fld dword [esp + 0x4c]
fmul dword [esp + 0x38]
fsubp st(1)
fstp dword [esp + 0x6c]
fld dword [esp + 0x48]
fmul dword [esp + 0x38]
fld dword [esp + 0x44]
fmul dword [esp + 0x3c]
fsubp st(1)
fstp dword [esp + 0x70]
call fcn.0042c7d0
fcomp qword [0x4bc320]
add esp, 4
fnstsw ax
test ah, 1
jne 0x415e69
mov ecx, dword [esp + 0x14]
fld dword [esp + 0x6c]
mov edx, dword [esp + 0x28]
fmul dword [edx + ecx]
mov eax, dword [esp + 0x2c]
fld dword [esp + 0x68]
xor edx, edx
fmul dword [eax + ecx + 8]
faddp st(1)
fld dword [esp + 0x64]
fmul dword [eax + ecx + 4]
faddp st(1)
fstp dword [esp + 0x70]
mov edi, dword [ecx]
test edi, edi
jle 0x415bf6
lea ebx, [ecx + 8]
fld dword [esp + 0x6c]
fmul dword [ebx + 4]
fld dword [esp + 0x64]
fmul dword [ebx - 4]
faddp st(1)
fld dword [esp + 0x68]
fmul dword [ebx]
faddp st(1)
fsub dword [esp + 0x70]
fcomp qword [0x4bc330]
fnstsw ax
test ah, 0x41
je 0x415bf6
inc edx
add ebx, 0xc
cmp edx, edi
jl 0x415bc5
cmp edx, edi
jl 0x415e6d
lea eax, [esp + 0x10]
push eax
mov eax, dword [esi]
lea ecx, [esp + 0x68]
lea edx, [eax + eax*4]
push ecx
lea eax, [edx*4 + 0x7da898]
push eax
call fcn.004155c0
add esp, 0xc
test eax, eax
jne 0x415e69
mov eax, dword [esi + 4]
xor edi, edi
test eax, eax
jle 0x415c5f
lea ebx, [esi + 8]
mov eax, dword [ebx]
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x68]
lea eax, [eax + eax*4]
push edx
lea ecx, [eax*4 + 0x7da898]
push ecx
call fcn.004155c0
add esp, 0xc
test eax, eax
jne 0x415c5f
mov eax, dword [esi + 4]
inc edi
add ebx, 4
cmp edi, eax
jl 0x415c31
mov eax, dword [esi + 4]
cmp edi, eax
jne 0x415e69
cmp eax, 0x1a
jle 0x415c7c
push str.ERROR:_too_many_bevels_n
call fcn.0041cb80
add esp, 4
mov edi, dword [0x7da850]
xor ebx, ebx
test edi, edi
jle 0x415cb6
mov ebp, 0x7da898
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x68]
push eax
push ebp
call fcn.004155c0
add esp, 0xc
test eax, eax
jne 0x415d42
mov edi, dword [0x7da850]
inc ebx
add ebp, 0x14
cmp ebx, edi
jl 0x415c8d
cmp edi, 0x800
jne 0x415cd3
push str.MAX_PATCH_PLANES
push 1
call fcn.0041cd90
mov edi, dword [0x7da850]
add esp, 8
mov ecx, dword [esp + 0x64]
mov eax, dword [esp + 0x68]
lea edx, [edi + edi*4]
shl edx, 2
mov dword [edx + 0x7da898], ecx
mov ecx, dword [esp + 0x6c]
mov dword [edx + 0x7da89c], eax
mov eax, dword [esp + 0x70]
mov dword [edx + 0x7da8a0], ecx
xor ebp, ebp
mov dword [edx + 0x7da8a4], eax
xor ecx, ecx
lea ebx, [esp + 0x64]
fld dword [ebx]
fcomp dword [0x4bc2d8]
fnstsw ax
test ah, 1
je 0x415d21
mov eax, 1
shl eax, cl
or ebp, eax
inc ecx
add ebx, 4
cmp ecx, 3
jl 0x415d09
inc edi
mov dword [edx + 0x7da8a8], ebp
mov dword [0x7da850], edi
mov dword [esp + 0x10], 0
lea ebx, [edi - 1]
mov ecx, dword [esi + 4]
mov dword [esi + ecx*4 + 8], ebx
mov eax, dword [esi + 4]
xor edi, edi
test eax, eax
jle 0x415d75
lea ebx, [esi + 8]
mov edx, dword [esi + eax*4 + 8]
cmp edx, dword [ebx]
jne 0x415d6a
push str.WARNING:_bevel_plane_already_used_n
call fcn.0041cb80
add esp, 4
mov eax, dword [esi + 4]
inc edi
add ebx, 4
cmp edi, eax
jl 0x415d55
mov eax, dword [esi + 4]
mov dword [esi + eax*4 + 0xd8], 0
mov ecx, dword [esi + 4]
mov edx, dword [esp + 0x10]
mov dword [esi + ecx*4 + 0x70], edx
mov eax, dword [esp + 0x14]
push eax
call fcn.00418a70
mov dword [esp + 0x28], eax
mov eax, dword [esi + 4]
mov ecx, dword [esi + eax*4 + 8]
lea ecx, [ecx + ecx*4]
fld dword [ecx*4 + 0x7da898]
add esp, 4
fstp dword [esp + 0x74]
mov ecx, dword [esi + eax*4 + 8]
lea edx, [ecx + ecx*4]
fld dword [edx*4 + 0x7da89c]
fstp dword [esp + 0x78]
mov ecx, dword [esi + eax*4 + 8]
lea ecx, [ecx + ecx*4]
fld dword [ecx*4 + 0x7da8a0]
fstp dword [esp + 0x7c]
mov ecx, dword [esi + eax*4 + 8]
lea edx, [ecx + ecx*4]
fld dword [edx*4 + 0x7da8a4]
fstp dword [esp + 0x80]
mov ecx, dword [esi + eax*4 + 0x70]
test ecx, ecx
jne 0x415e23
fld dword [esp + 0x74]
fchs
fstp dword [esp + 0x74]
fld dword [esp + 0x78]
fchs
fstp dword [esp + 0x78]
fld dword [esp + 0x7c]
fchs
fstp dword [esp + 0x7c]
fld dword [esp + 0x80]
fchs
fstp dword [esp + 0x80]
mov eax, dword [esp + 0x80]
push 0x3dcccccd
push eax
lea ecx, [esp + 0x7c]
push ecx
lea edx, [esp + 0x30]
push edx
call fcn.00418af0
mov eax, dword [esp + 0x34]
add esp, 0x10
test eax, eax
jne 0x415e59
push str.WARNING:_CM_AddFacetBevels..._invalid_bevel_n
call fcn.0041cd30
add esp, 4
jmp 0x415e69
push eax
call fcn.004186e0
mov eax, dword [esi + 4]
add esp, 4
inc eax
mov dword [esi + 4], eax
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
add eax, 2
cmp eax, 1
mov dword [esp + 0x18], eax
jle 0x415b0d
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
add edx, 4
dec eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
jne 0x415b05
mov ebp, dword [esp + 0x30]
mov ebx, dword [ecx]
mov edi, ebp
cmp edi, ebx
jl 0x4159d7
push ecx
call fcn.004186e0
mov eax, dword [esi + 4]
mov ecx, dword [esi]
mov dword [esi + eax*4 + 8], ecx
mov edx, dword [esi + 4]
mov dword [esi + edx*4 + 0xd8], 0
mov eax, dword [esi + 4]
mov dword [esi + eax*4 + 0x70], 1
mov eax, dword [esi + 4]
add esp, 4
inc eax
mov dword [esi + 4], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret
mov ecx, dword [esp + 0x14]
jmp 0x415e9f