Function at 0x4c5e90
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.00464780
mov dword [esp + 0x1c], eax
mov edi, eax
mov eax, dword [ebp]
push eax
call fcn.00464780
mov esi, eax
add esp, 8
test esi, esi
jl 0x4c5ec3
cmp esi, dword [0xa6a184]
jl 0x4c5ed4
push esi
push str.ShaderForShaderNum:_bad_num__i
push 1
call dword [0x1313c44]
add esp, 0xc
mov edx, dword [0xa6a188]
lea eax, [esi*8]
sub eax, esi
lea ecx, [eax + eax*4]
lea eax, [edx + ecx*4]
mov ecx, dword [0x13e6d44]
mov edx, dword [ecx + 0x20]
test edx, edx
je 0x4c5efb
mov edi, 0xfffffffd
mov edx, dword [0x13e6d54]
mov ecx, dword [edx + 0x20]
test ecx, ecx
jne 0x4c5f12
mov ecx, dword [0x1313db0]
test ecx, ecx
jne 0x4c5f17
mov edi, 0xfffffffe
push 1
push 1
push 1
push 1
push edi
push eax
call fcn.004a6e80
mov ecx, dword [eax + 0x50]
add esp, 0x18
test ecx, ecx
je 0x4c5f35
mov eax, dword [0x1313d9c]
mov esi, dword [esp + 0x28]
mov dword [esi + 8], eax
mov ecx, dword [0x13e4214]
mov edx, dword [ecx + 0x20]
test edx, edx
je 0x4c5f59
mov ecx, dword [eax + 0x64]
test ecx, ecx
jne 0x4c5f59
mov edx, dword [0x1313d9c]
mov dword [esi + 8], edx
mov eax, dword [esi + 8]
mov cl, byte [eax + 0x58]
test cl, cl
jns 0x4c5f71
mov dword [esi + 0xc], 0xa6a5a4
pop edi
pop esi
pop ebp
add esp, 0x10
ret
mov ecx, dword [ebp + 0x10]
push ebx
push ecx
call fcn.00464780
mov ebx, eax
add esp, 4
cmp ebx, 0x40
jle 0x4c5fa4
push ebx
push str.WARNING:_MAX_FACE_POINTS_exceeded:__i_n
push 3
call dword [0x1313c40]
mov edx, dword [0x1313d9c]
add esp, 0xc
mov ebx, 0x40
mov dword [esi + 8], edx
mov eax, dword [ebp + 0x18]
push eax
call fcn.00464780
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 [0x1313c54]
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.00464780
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 0x4c6134
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.00464800
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 0x4c6026
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.00464800
mov edx, dword [esp + 0x2c]
fstp dword [edx - 8]
mov eax, dword [ebx]
push eax
call fcn.00464800
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 0x4c605e
mov ecx, dword [0x13145b4]
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 0x4c6109
cmp ebx, eax
mov ecx, ebx
jg 0x4c60cd
mov ecx, eax
cmp ecx, edx
jg 0x4c60d3
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 0x4c6014
mov ebp, dword [esp + 0x18]
mov edi, dword [esp + 0x24]
mov eax, dword [edi + 0x14]
push eax
call fcn.00464780
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 0x4c6172
mov eax, dword [esp + 0x30]
mov ecx, dword [eax + ebx*4]
push ecx
call fcn.00464780
mov ecx, dword [esi + 0x88]
add esp, 4
lea edx, [esi + ebx*4]
inc ebx
cmp ebx, ebp
mov dword [edx + ecx], eax
jl 0x4c6151
lea ebp, [esi + 4]
lea ebx, [edi + 0x54]
mov dword [esp + 0x24], 3
mov edx, dword [ebx]
push edx
call fcn.00464800
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 0x4c6180
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.004623a0
fld dword [ebx]
fcomp qword [0x535478]
add esp, 4
fnstsw ax
test ah, 0x44
jp 0x4c61df
xor eax, eax
jmp 0x4c6210
fld dword [esi + 8]
fcomp qword [0x535478]
fnstsw ax
test ah, 0x44
jp 0x4c61f6
mov eax, 1
jmp 0x4c6210
fld dword [esi + 0xc]
fcomp qword [0x535478]
fnstsw ax
test ah, 0x44
mov eax, 2
jnp 0x4c6210
mov eax, 3
mov byte [esi + 0x14], al
mov eax, dword [0x1313db0]
test eax, eax
je 0x4c6364
mov ebx, dword [esp + 0x1c]
cmp ebx, 0xffffffff
je 0x4c6364
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax + 8]
mov eax, dword [ecx + 0x40]
test eax, eax
jl 0x4c6364
mov edx, dword [edi + 0x20]
push edx
call fcn.00464780
mov dword [esi + 0x38], eax
mov eax, dword [edi + 0x24]
push eax
call fcn.00464780
mov dword [esi + 0x3c], eax
mov ecx, dword [edi + 0x28]
push ecx
call fcn.00464780
mov dword [esi + 0x30], eax
mov edx, dword [edi + 0x2c]
push edx
call fcn.00464780
mov dword [esi + 0x34], eax
mov eax, dword [0xa6a52c]
add esp, 0x10
test eax, eax
je 0x4c6292
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 0x4c6294
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.00464800
fstp dword [ebx - 0xc]
mov edx, dword [edi]
push edx
call fcn.00464800
fstp dword [ebx]
mov eax, dword [edi + 0xc]
push eax
call fcn.00464800
fstp dword [ebx + 0xc]
add esp, 0xc
add edi, 4
add ebx, 4
dec ebp
jne 0x4c62a2
lea edi, [esi + 0x68]
lea eax, [esi + 0x50]
push edi
push eax
call fcn.0045b150
call fcn.0051a9fc
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
fdivr qword [0x535478]
call fcn.0051a9fc
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.0045b150
add esp, 0x10
call fcn.0051a9fc
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
fdivr qword [0x535478]
call fcn.0051a9fc
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