Function at 0x4c23a0
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.00461f30
mov dword [esp + 0x1c], eax
mov edi, eax
mov eax, dword [ebp]
push eax
call fcn.00461f30
mov esi, eax
add esp, 8
test esi, esi
jl 0x4c23d3
cmp esi, dword [0xa26f74]
jl 0x4c23e4
push esi
push str.ShaderForShaderNum:_bad_num__i
push 1
call dword [0x12ff6a4]
add esp, 0xc
mov edx, dword [0xa26f78]
lea eax, [esi*8]
sub eax, esi
lea ecx, [eax + eax*4]
lea eax, [edx + ecx*4]
mov ecx, dword [0x13d37a4]
mov edx, dword [ecx + 0x20]
test edx, edx
je 0x4c240b
mov edi, 0xfffffffd
mov edx, dword [0x13d37b4]
mov ecx, dword [edx + 0x20]
test ecx, ecx
jne 0x4c2422
mov ecx, dword [0x12ff810]
test ecx, ecx
jne 0x4c2427
mov edi, 0xfffffffe
push 1
push 1
push 1
push 1
push edi
push eax
call fcn.0049d500
mov ecx, dword [eax + 0x50]
add esp, 0x18
test ecx, ecx
je 0x4c2445
mov eax, dword [0x12ff7fc]
mov esi, dword [esp + 0x28]
mov dword [esi + 8], eax
mov ecx, dword [0x13d0c74]
mov edx, dword [ecx + 0x20]
test edx, edx
je 0x4c2469
mov ecx, dword [eax + 0x64]
test ecx, ecx
jne 0x4c2469
mov edx, dword [0x12ff7fc]
mov dword [esi + 8], edx
mov eax, dword [esi + 8]
mov cl, byte [eax + 0x58]
test cl, cl
jns 0x4c2481
mov dword [esi + 0xc], 0xa27394
pop edi
pop esi
pop ebp
add esp, 0x10
ret
mov ecx, dword [ebp + 0x10]
push ebx
push ecx
call fcn.00461f30
mov ebx, eax
add esp, 4
cmp ebx, 0x40
jle 0x4c24b4
push ebx
push str.WARNING:_MAX_FACE_POINTS_exceeded:__i_n
push 3
call dword [0x12ff6a0]
mov edx, dword [0x12ff7fc]
add esp, 0xc
mov ebx, 0x40
mov dword [esi + 8], edx
mov eax, dword [ebp + 0x18]
push eax
call fcn.00461f30
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 [0x12ff6b4]
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.00461f30
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 0x4c2644
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.00461fb0
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 0x4c2536
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.00461fb0
mov edx, dword [esp + 0x2c]
fstp dword [edx - 8]
mov eax, dword [ebx]
push eax
call fcn.00461fb0
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 0x4c256e
mov ecx, dword [0x1300018]
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 0x4c2619
cmp ebx, eax
mov ecx, ebx
jg 0x4c25dd
mov ecx, eax
cmp ecx, edx
jg 0x4c25e3
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 0x4c2524
mov ebp, dword [esp + 0x18]
mov edi, dword [esp + 0x24]
mov eax, dword [edi + 0x14]
push eax
call fcn.00461f30
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 0x4c2682
mov eax, dword [esp + 0x30]
mov ecx, dword [eax + ebx*4]
push ecx
call fcn.00461f30
mov ecx, dword [esi + 0x88]
add esp, 4
lea edx, [esi + ebx*4]
inc ebx
cmp ebx, ebp
mov dword [edx + ecx], eax
jl 0x4c2661
lea ebp, [esi + 4]
lea ebx, [edi + 0x54]
mov dword [esp + 0x24], 3
mov edx, dword [ebx]
push edx
call fcn.00461fb0
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 0x4c2690
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.0045fb50
fld dword [ebx]
fcomp qword [0x531478]
add esp, 4
fnstsw ax
test ah, 0x44
jp 0x4c26ef
xor eax, eax
jmp 0x4c2720
fld dword [esi + 8]
fcomp qword [0x531478]
fnstsw ax
test ah, 0x44
jp 0x4c2706
mov eax, 1
jmp 0x4c2720
fld dword [esi + 0xc]
fcomp qword [0x531478]
fnstsw ax
test ah, 0x44
mov eax, 2
jnp 0x4c2720
mov eax, 3
mov byte [esi + 0x14], al
mov eax, dword [0x12ff810]
test eax, eax
je 0x4c2874
mov ebx, dword [esp + 0x1c]
cmp ebx, 0xffffffff
je 0x4c2874
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax + 8]
mov eax, dword [ecx + 0x40]
test eax, eax
jl 0x4c2874
mov edx, dword [edi + 0x20]
push edx
call fcn.00461f30
mov dword [esi + 0x38], eax
mov eax, dword [edi + 0x24]
push eax
call fcn.00461f30
mov dword [esi + 0x3c], eax
mov ecx, dword [edi + 0x28]
push ecx
call fcn.00461f30
mov dword [esi + 0x30], eax
mov edx, dword [edi + 0x2c]
push edx
call fcn.00461f30
mov dword [esi + 0x34], eax
mov eax, dword [0xa2731c]
add esp, 0x10
test eax, eax
je 0x4c27a2
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 0x4c27a4
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.00461fb0
fstp dword [ebx - 0xc]
mov edx, dword [edi]
push edx
call fcn.00461fb0
fstp dword [ebx]
mov eax, dword [edi + 0xc]
push eax
call fcn.00461fb0
fstp dword [ebx + 0xc]
add esp, 0xc
add edi, 4
add ebx, 4
dec ebp
jne 0x4c27b2
lea edi, [esi + 0x68]
lea eax, [esi + 0x50]
push edi
push eax
call fcn.004589a0
call fcn.00516e2c
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
fdivr qword [0x531478]
call fcn.00516e2c
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.004589a0
add esp, 0x10
call fcn.00516e2c
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
fdivr qword [0x531478]
call fcn.00516e2c
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