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

Disassembly:
sub esp, 0x10
push ebp
mov ebp, dword [esp + 0x18]
push esi
push edi
mov eax, dword [ebp + 0x1c]
push eax
call fcn.004644f0
mov dword [esp + 0x1c], eax
mov edi, eax
mov eax, dword [ebp]
push eax
call fcn.004644f0
mov esi, eax
add esp, 8
test esi, esi
jl 0x4c6f33
cmp esi, dword [0xa7b534]
jl 0x4c6f44
push esi
push str.ShaderForShaderNum:_bad_num__i
push 1
call dword [0x1325004]
add esp, 0xc
mov edx, dword [0xa7b538]
lea eax, [esi*8]
sub eax, esi
lea ecx, [eax + eax*4]
lea eax, [edx + ecx*4]
mov ecx, dword [0x13f8104]
mov edx, dword [ecx + 0x20]
test edx, edx
je 0x4c6f6b
mov edi, 0xfffffffd
mov edx, dword [0x13f8114]
mov ecx, dword [edx + 0x20]
test ecx, ecx
jne 0x4c6f82
mov ecx, dword [0x1325170]
test ecx, ecx
jne 0x4c6f87
mov edi, 0xfffffffe
push 1
push 1
push 1
push 1
push edi
push eax
call fcn.004a6ed0
mov ecx, dword [eax + 0x50]
add esp, 0x18
test ecx, ecx
je 0x4c6fa5
mov eax, dword [0x132515c]
mov esi, dword [esp + 0x28]
mov dword [esi + 8], eax
mov ecx, dword [0x13f55d4]
mov edx, dword [ecx + 0x20]
test edx, edx
je 0x4c6fc9
mov ecx, dword [eax + 0x64]
test ecx, ecx
jne 0x4c6fc9
mov edx, dword [0x132515c]
mov dword [esi + 8], edx
mov eax, dword [esi + 8]
mov cl, byte [eax + 0x58]
test cl, cl
jns 0x4c6fe1
mov dword [esi + 0xc], 0xa7b954
pop edi
pop esi
pop ebp
add esp, 0x10
ret
mov ecx, dword [ebp + 0x10]
push ebx
push ecx
call fcn.004644f0
mov ebx, eax
add esp, 4
cmp ebx, 0x40
jle 0x4c7014
push ebx
push str.WARNING:_MAX_FACE_POINTS_exceeded:__i_n
push 3
call dword [0x1325000]
mov edx, dword [0x132515c]
add esp, 0xc
mov ebx, 0x40
mov dword [esi + 8], edx
mov eax, dword [ebp + 0x18]
push eax
call fcn.004644f0
mov edi, ebx
mov ebp, eax
shl edi, 5
add edi, 0x8c
mov dword [esp + 0x1c], ebp
lea ecx, [edi + ebp*4]
push ecx
call dword [0x1325014]
mov esi, eax
mov dword [esi + 0x88], edi
mov edi, dword [esp + 0x2c]
mov dword [esi], 1
mov dword [esi + 0x80], ebx
mov dword [esi + 0x84], ebp
mov edx, dword [edi + 0xc]
push edx
call fcn.004644f0
lea ecx, [eax + eax*4]
add esp, 0xc
test ebx, ebx
lea edx, [eax + ecx*2]
mov eax, dword [esp + 0x28]
lea eax, [eax + edx*4]
jle 0x4c71a4
lea edi, [esi + 0xaa]
lea ebp, [eax + 0x2a]
mov dword [esp + 0x14], ebx
lea ecx, [edi - 0x1e]
lea ebx, [ebp - 0x2a]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x10], 3
mov edx, dword [ebx]
push edx
call fcn.00464570
mov eax, dword [esp + 0x2c]
add esp, 4
add ebx, 4
fstp dword [eax]
add eax, 4
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x10]
dec eax
mov dword [esp + 0x10], eax
jne 0x4c7096
lea eax, [edi - 0xa]
lea ebx, [ebp - 0x16]
mov dword [esp + 0x28], eax
mov dword [esp + 0x10], 2
mov ecx, dword [ebx - 8]
push ecx
call fcn.00464570
mov edx, dword [esp + 0x2c]
fstp dword [edx - 8]
mov eax, dword [ebx]
push eax
call fcn.00464570
mov eax, dword [esp + 0x30]
add esp, 8
add ebx, 4
fstp dword [eax]
add eax, 4
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x10]
dec eax
mov dword [esp + 0x10], eax
jne 0x4c70ce
mov ecx, dword [0x1325974]
xor edx, edx
mov dl, byte [ebp]
xor eax, eax
mov al, byte [ebp - 1]
xor ebx, ebx
mov bl, byte [ebp - 2]
shl edx, cl
shl eax, cl
shl ebx, cl
mov ecx, edx
mov dword [esp + 0x28], edx
or ecx, eax
mov dword [esp + 0x10], eax
or ecx, ebx
cmp ecx, 0xff
jle 0x4c7179
cmp ebx, eax
mov ecx, ebx
jg 0x4c713d
mov ecx, eax
cmp ecx, edx
jg 0x4c7143
mov ecx, edx
mov eax, ebx
shl eax, 8
sub eax, ebx
cdq
idiv ecx
mov edx, dword [esp + 0x10]
mov ebx, eax
mov eax, edx
shl eax, 8
sub eax, edx
cdq
idiv ecx
mov edx, dword [esp + 0x28]
mov dword [esp + 0x10], eax
mov eax, edx
shl eax, 8
sub eax, edx
cdq
idiv ecx
mov dword [esp + 0x28], eax
mov edx, eax
mov eax, dword [esp + 0x10]
mov byte [edi - 2], bl
mov byte [edi - 1], al
mov eax, dword [esp + 0x14]
mov byte [edi], dl
mov dl, byte [ebp + 1]
add ebp, 0x2c
mov byte [edi + 1], dl
add edi, 0x20
dec eax
mov dword [esp + 0x14], eax
jne 0x4c7084
mov ebp, dword [esp + 0x18]
mov edi, dword [esp + 0x24]
mov eax, dword [edi + 0x14]
push eax
call fcn.004644f0
mov ecx, dword [esp + 0x34]
add esp, 4
xor ebx, ebx
lea edx, [ecx + eax*4]
test ebp, ebp
mov dword [esp + 0x30], edx
jle 0x4c71e2
mov eax, dword [esp + 0x30]
mov ecx, dword [eax + ebx*4]
push ecx
call fcn.004644f0
mov ecx, dword [esi + 0x88]
add esp, 4
lea edx, [esi + ebx*4]
inc ebx
cmp ebx, ebp
mov dword [edx + ecx], eax
jl 0x4c71c1
lea ebp, [esi + 4]
lea ebx, [edi + 0x54]
mov dword [esp + 0x24], 3
mov edx, dword [ebx]
push edx
call fcn.00464570
fstp dword [ebp]
mov eax, dword [esp + 0x28]
add esp, 4
add ebx, 4
add ebp, 4
dec eax
mov dword [esp + 0x24], eax
jne 0x4c71f0
fld dword [esi + 0x94]
fmul dword [esi + 0xc]
fld dword [esi + 0x90]
fmul dword [esi + 8]
lea ebx, [esi + 4]
push ebx
faddp st(1)
fld dword [esi + 0x8c]
fmul dword [ebx]
faddp st(1)
fstp dword [esi + 0x10]
call fcn.00462110
fld dword [ebx]
fcomp qword [0x537478]
add esp, 4
fnstsw ax
test ah, 0x44
jp 0x4c724f
xor eax, eax
jmp 0x4c7280
fld dword [esi + 8]
fcomp qword [0x537478]
fnstsw ax
test ah, 0x44
jp 0x4c7266
mov eax, 1
jmp 0x4c7280
fld dword [esi + 0xc]
fcomp qword [0x537478]
fnstsw ax
test ah, 0x44
mov eax, 2
jnp 0x4c7280
mov eax, 3
mov byte [esi + 0x14], al
mov eax, dword [0x1325170]
test eax, eax
je 0x4c73d4
mov ebx, dword [esp + 0x1c]
cmp ebx, 0xffffffff
je 0x4c73d4
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax + 8]
mov eax, dword [ecx + 0x40]
test eax, eax
jl 0x4c73d4
mov edx, dword [edi + 0x20]
push edx
call fcn.004644f0
mov dword [esi + 0x38], eax
mov eax, dword [edi + 0x24]
push eax
call fcn.004644f0
mov dword [esi + 0x3c], eax
mov ecx, dword [edi + 0x28]
push ecx
call fcn.004644f0
mov dword [esi + 0x30], eax
mov edx, dword [edi + 0x2c]
push edx
call fcn.004644f0
mov dword [esi + 0x34], eax
mov eax, dword [0xa7b8dc]
add esp, 0x10
test eax, eax
je 0x4c7302
mov ecx, dword [esi + 0x3c]
mov edx, dword [esi + 0x38]
shl ebx, 7
add ebx, ecx
shl ebx, 7
add ebx, edx
lea eax, [eax + ebx*2]
add ebx, eax
jmp 0x4c7304
xor ebx, ebx
mov dword [esi + 0x40], ebx
lea ebx, [esi + 0x50]
add edi, 0x3c
mov ebp, 3
mov ecx, dword [edi - 0xc]
push ecx
call fcn.00464570
fstp dword [ebx - 0xc]
mov edx, dword [edi]
push edx
call fcn.00464570
fstp dword [ebx]
mov eax, dword [edi + 0xc]
push eax
call fcn.00464570
fstp dword [ebx + 0xc]
add esp, 0xc
add edi, 4
add ebx, 4
dec ebp
jne 0x4c7312
lea edi, [esi + 0x68]
lea eax, [esi + 0x50]
push edi
push eax
call fcn.0045aec0
call fcn.0051bfdc
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
fdivr qword [0x537478]
call fcn.0051bfdc
mov dword [esp + 0x2c], eax
lea ecx, [esi + 0x5c]
fild dword [esp + 0x2c]
fld st(0)
fmul dword [edi]
fstp dword [edi]
lea edi, [esi + 0x74]
fld st(0)
fmul dword [esi + 0x6c]
push edi
push ecx
fstp dword [esi + 0x6c]
fmul dword [esi + 0x70]
fstp dword [esi + 0x70]
call fcn.0045aec0
add esp, 0x10
call fcn.0051bfdc
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
fdivr qword [0x537478]
call fcn.0051bfdc
mov dword [esp + 0x24], eax
mov edx, dword [esp + 0x2c]
fild dword [esp + 0x24]
pop ebx
fld st(0)
fmul dword [edi]
fstp dword [edi]
pop edi
fld st(0)
fmul dword [esi + 0x78]
fstp dword [esi + 0x78]
fmul dword [esi + 0x7c]
fstp dword [esi + 0x7c]
mov dword [edx + 0xc], esi
pop esi
pop ebp
add esp, 0x10
ret
mov edx, dword [esp + 0x2c]
mov dword [esi + 0x40], 0
pop ebx
pop edi
mov dword [edx + 0xc], esi
pop esi
pop ebp
add esp, 0x10
ret