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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1f4
push ebx
push esi
mov esi, ecx
mov eax, dword [esi + 0x2ca0c]
mov ebx, dword [eax + 0x56c]
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 8], eax
mov dword [esp + 0x18], eax
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0x4200]
mov edx, dword [eax + 0x41fc]
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x4c]
push eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x24], ecx
mov dword [esp + 0x30], edx
call fcn.10957600
mov ecx, dword [edi + 0x4c]
push ecx
mov dword [esp + 0x30], eax
call fcn.1097ee20
mov edx, dword [edi + 0x4c]
add esp, 8
test eax, eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], 0
je 0x10d67c24
test byte [eax + 0x88], 3
je 0x10d67c24
mov dword [esp + 0x10], eax
jmp 0x10d67c43
mov eax, dword [esp + 0x28]
test eax, eax
je 0x10d67c43
mov ecx, dword [eax + 0x44]
mov edx, dword [eax + 0x48]
mov eax, dword [eax + 0x68]
and eax, 1
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], edx
mov dword [ebx + 0x1c], eax
test byte [edi + 0xd4], 0x20
je 0x10d68617
lea ecx, [esp + 0x70]
call fcn.10d63cc0
mov edx, dword [edi + 0x48]
push 0
lea ecx, [esp + 0x74]
push ecx
push edx
push esi
call fcn.10d5b120
add esp, 0x10
test eax, eax
mov dword [esp + 0x28], eax
je 0x10d67fbc
mov cl, byte [edi + 0x50]
test cl, cl
je 0x10d67d19
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x10d67d19
mov eax, dword [ebp + 0x94]
push eax
mov ecx, 0x21
lea esi, [ebp + 0xc]
lea edi, [esp + 0xfc]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 0x90]
push ecx
push 0
sub esp, 0x84
mov edi, esp
lea edx, [esp + 0xac]
push edx
mov edx, dword [esp + 0xa8]
mov ecx, 0x21
lea esi, [esp + 0x18c]
lea eax, [esp + 0xa0]
mov byte [esp + 0x1dc], 1
mov dword [esp + 0x18c], 1
rep movsd dword es:[edi], dword [esi]
push eax
lea ecx, [esp + 0xbc]
push ecx
mov ecx, dword [esp + 0xb4]
push edx
call fcn.10d6ad50
test eax, eax
je 0x10d67fb1
mov esi, dword [esp + 0x18]
mov edi, dword [ebp + 8]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
add edx, ecx
mov ecx, dword [esp + 0xc]
cmp ecx, edx
jge 0x10d67f91
imul ecx, ecx, 0x84
push eax
lea eax, [ecx + ebx + 0x40]
push eax
mov ecx, esi
call fcn.10d63a10
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov eax, 1
lea ecx, [esp + 0x70]
mov dword [esp + 0x70], eax
mov byte [esp + 0xc1], al
mov dword [esp + 0xc4], eax
push ecx
lea eax, [edx + ebx + 0x40]
push eax
mov ecx, esi
mov byte [esp + 0xc8], 0
call fcn.10d696e0
movzx eax, byte [edi + 0x50]
dec eax
je 0x10d67f30
dec eax
je 0x10d67ecf
movzx eax, byte [edi + 0x51]
mov ecx, 2
sub eax, ecx
je 0x10d67e6f
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
dec eax
je 0x10d67e19
mov dword [edx + ebx + 0x54], 0xc
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x60], ecx
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x64], 3
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x58], ecx
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x6c], ecx
mov byte [esp + 0x14], 0x7f
mov byte [esp + 0x15], 0x7f
mov byte [esp + 0x16], 0x7f
mov byte [esp + 0x17], 0
mov eax, dword [esp + 0x14]
mov dword [ebx + 0x24], eax
mov eax, dword [esp + 0xc]
inc eax
mov dword [esp + 0xc], eax
jmp 0x10d681fe
mov dword [edx + ebx + 0x54], 4
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x60], 0x20
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x64], ecx
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x58], 3
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x70], ecx
mov eax, dword [esp + 0xc]
inc eax
mov dword [esp + 0xc], eax
jmp 0x10d681fe
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x54], 3
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x64], ecx
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x58], 4
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x6c], 0
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x70], ecx
mov eax, dword [esp + 0xc]
inc eax
mov dword [esp + 0xc], eax
jmp 0x10d681fe
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x54], 0xd
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov eax, 2
mov dword [edx + ebx + 0x60], eax
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x64], 1
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x58], eax
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x6c], eax
mov eax, dword [esp + 0xc]
inc eax
mov dword [esp + 0xc], eax
jmp 0x10d681fe
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x54], 5
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov eax, 2
mov dword [ecx + ebx + 0x60], eax
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x64], 1
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x58], eax
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x6c], eax
mov eax, dword [esp + 0xc]
inc eax
mov dword [esp + 0xc], eax
jmp 0x10d681fe
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d67fa5
push str.No_stages_left_for_projected_texture
call fcn.10905740
mov eax, dword [ebp + 0x94]
test eax, eax
je 0x10d67fb1
mov dword [eax], edi
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x90
mov ecx, dword [ebp + 0x90]
mov eax, 1
mov dword [esp + 0x70], eax
mov byte [esp + 0xc1], al
mov dword [esp + 0xc4], eax
mov eax, dword [ebp + 0x94]
push eax
push ecx
push 0
sub esp, 0x84
mov edi, esp
lea edx, [esp + 0xac]
push edx
mov edx, dword [ebp + 8]
mov byte [esp + 0x154], 0
mov ecx, 0x21
lea esi, [esp + 0x104]
rep movsd dword es:[edi], dword [esi]
lea eax, [esp + 0xa0]
push eax
mov eax, dword [edx + 0x48]
lea ecx, [esp + 0xbc]
push ecx
mov ecx, dword [esp + 0xb4]
push eax
call fcn.10d6ad50
test eax, eax
je 0x10d67fb1
mov ecx, dword [ebp + 8]
mov al, byte [ecx + 0x50]
test al, al
je 0x10d681fa
mov eax, dword [esp + 0x14]
test eax, eax
je 0x10d681fa
push 0
lea edx, [esp + 0xfc]
push edx
mov ecx, 0x21
lea esi, [ebp + 0xc]
lea edi, [esp + 0x100]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x20]
push eax
push ecx
call fcn.10d5b120
add esp, 0x10
test eax, eax
jne 0x10d680a5
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d6808b
push str.Either_projected_texture_or_base_material_must_be_simple.
call fcn.10905740
mov eax, dword [ebp + 0x94]
test eax, eax
je 0x10d6809a
mov edx, dword [ebp + 8]
mov dword [eax], edx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x90
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
add edx, ecx
mov ecx, dword [esp + 0xc]
cmp ecx, edx
jge 0x10d681cb
mov esi, dword [esp + 0x18]
imul ecx, ecx, 0x84
push eax
lea eax, [ecx + ebx + 0x40]
push eax
mov ecx, esi
call fcn.10d63a10
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
lea ecx, [esp + 0xf8]
push ecx
lea eax, [edx + ebx + 0x40]
push eax
mov ecx, esi
call fcn.10d696e0
mov edx, dword [esp + 0xc]
mov eax, dword [ebp + 8]
imul edx, edx, 0x84
mov ecx, 1
mov dword [edx + ebx + 0x78], ecx
movzx eax, byte [eax + 0x50]
dec eax
je 0x10d68162
dec eax
je 0x10d6815b
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov eax, 2
mov dword [ecx + ebx + 0x54], eax
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x60], eax
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x58], eax
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x6c], eax
mov eax, dword [esp + 0xc]
inc eax
mov dword [esp + 0xc], eax
jmp 0x10d681fe
mov edx, 0xd
jmp 0x10d68167
mov edx, 5
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x54], edx
mov esi, dword [esp + 0xc]
imul esi, esi, 0x84
mov eax, 2
mov dword [esi + ebx + 0x60], eax
mov esi, dword [esp + 0xc]
imul esi, esi, 0x84
mov dword [esi + ebx + 0x64], ecx
mov esi, dword [esp + 0xc]
imul esi, esi, 0x84
mov dword [esi + ebx + 0x58], edx
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x6c], eax
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x70], ecx
mov eax, dword [esp + 0xc]
inc eax
mov dword [esp + 0xc], eax
jmp 0x10d681fe
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d681df
push str.No_stages_left_for_base_material
call fcn.10905740
mov eax, dword [ebp + 0x94]
test eax, eax
je 0x10d681ef
mov ecx, dword [esp + 0x14]
mov dword [eax], ecx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x90
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x10d683b9
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
add ecx, edx
cmp eax, ecx
jge 0x10d684bd
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
push 0
push 0
push edx
mov ecx, 0x21
lea esi, [ebp + 0xc]
lea edi, [esp + 0x104]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.10d5b120
add esp, 0x10
test eax, eax
je 0x10d6848e
mov ecx, dword [esp + 0xc]
mov esi, dword [esp + 0x18]
imul ecx, ecx, 0x84
lea edx, [ecx + ebx + 0x40]
push eax
push edx
mov ecx, esi
call fcn.10d63a10
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
lea eax, [esp + 0xf8]
lea edx, [ecx + ebx + 0x40]
push eax
push edx
mov ecx, esi
call fcn.10d696e0
mov eax, dword [esp + 0xc]
mov edx, dword [ebp + 8]
imul eax, eax, 0x84
mov ecx, 1
mov dword [eax + ebx + 0x78], ecx
movzx eax, byte [edx + 0x51]
mov edx, 2
sub eax, edx
je 0x10d68362
dec eax
je 0x10d6831c
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x54], 0xd
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x60], ecx
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x64], 3
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x58], edx
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov byte [esp + 0x10], 0x7f
mov byte [esp + 0x11], 0x7f
mov byte [esp + 0x12], 0x7f
mov byte [esp + 0x13], 0
mov eax, dword [esp + 0x10]
mov dword [edx + ebx + 0x6c], ecx
mov dword [ebx + 0x24], eax
jmp 0x10d683b0
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x54], 4
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x60], 0x22
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x64], ecx
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x58], 3
jmp 0x10d683a2
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x54], 3
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x64], ecx
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x58], 4
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x6c], edx
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x70], ecx
mov eax, dword [esp + 0xc]
inc eax
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx + 4]
mov ecx, dword [edx + 0x4124]
test ecx, ecx
jne 0x10d68578
mov esi, dword [ebp + 8]
mov cl, byte [esi + 0x50]
test cl, cl
jne 0x10d683e4
mov ecx, dword [esp + 0x28]
test ecx, ecx
jne 0x10d68578
mov ecx, dword [esi + 0xd4]
test cl, 4
jne 0x10d683fb
test cl, 0x10
jne 0x10d68578
mov esi, dword [ebp + 8]
mov edx, dword [esp + 0x2c]
cmp eax, edx
jge 0x10d685e8
movzx ecx, byte [esi + 0x51]
imul eax, eax, 0x84
sub ecx, 2
je 0x10d68516
dec ecx
je 0x10d684d5
mov dword [eax + ebx + 0x54], 0xc
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov eax, 1
mov dword [ecx + ebx + 0x60], eax
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x64], 3
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x58], 2
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x6c], eax
mov byte [esp + 0x10], 0x7f
mov byte [esp + 0x11], 0x7f
mov byte [esp + 0x12], 0x7f
mov byte [esp + 0x13], 0
mov eax, dword [esp + 0x10]
mov dword [ebx + 0x24], eax
jmp 0x10d68563
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d684a2
push str.Base_opacity_isnt_bitmap
call fcn.10905740
mov eax, dword [ebp + 0x94]
test eax, eax
je 0x10d684b2
mov ecx, dword [esp + 0x10]
mov dword [eax], ecx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x90
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d6808b
push str.No_stages_left_for_base_opacity
jmp 0x10d68086
mov dword [eax + ebx + 0x54], 4
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x60], 0x20
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov eax, 1
mov dword [ecx + ebx + 0x64], eax
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x58], 3
jmp 0x10d68555
mov dword [eax + ebx + 0x54], 3
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov eax, 1
mov dword [ecx + ebx + 0x64], eax
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x58], 4
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x6c], 0
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x70], eax
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x20]
inc ecx
cmp edx, eax
mov dword [esp + 0xc], ecx
jle 0x10d68578
inc dword [esp + 0x1c]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xd4]
shr ecx, 6
mov edx, 1
and ecx, edx
mov dword [ebx + 0x1c], ecx
mov dword [ebx + 8], edx
mov dword [ebx + 0x18], 0
movzx eax, byte [eax + 0x51]
mov ecx, 2
sub eax, ecx
je 0x10d69371
dec eax
je 0x10d6934b
dec eax
je 0x10d69343
mov byte [esp + 0x10], 0x7f
mov byte [esp + 0x11], 0x7f
mov byte [esp + 0x12], 0x7f
mov byte [esp + 0x13], 0
mov eax, dword [esp + 0x10]
mov dword [ebx + 0x28], 9
mov dword [ebx + 0x2c], 3
mov dword [ebx + 0x30], edx
mov dword [ebx + 0x34], eax
jmp 0x10d6937f
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d685fc
push str.No_stages_left_for_attenuation
call fcn.10905740
mov eax, dword [ebp + 0x94]
test eax, eax
je 0x10d6809a
mov dword [eax], esi
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x90
mov edx, dword [esi + 0x2ca0c]
add edx, 0x78
push edx
push 0
lea eax, [esp + 0x188]
push eax
call fcn.10deed3e
lea eax, [edi + 0x54]
push eax
lea ecx, [esp + 0x184]
push ecx
lea edx, [esp + 0x1c8]
push edx
mov dword [esp + 0x34], eax
call fcn.10deed32
lea ecx, [esp + 0x70]
call fcn.10d63cc0
mov ecx, dword [edi + 0x48]
push 0
lea eax, [esp + 0x74]
push eax
push ecx
push esi
call fcn.10d5b120
add esp, 0x10
test eax, eax
mov dword [esp + 0x2c], eax
je 0x10d68985
mov cl, byte [edi + 0x50]
test cl, cl
je 0x10d686e6
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x10d686e6
mov edx, dword [ebp + 0x94]
mov eax, dword [ebp + 0x90]
push edx
push eax
push 0
sub esp, 0x84
mov edi, esp
mov ecx, 0x21
lea esi, [ebp + 0xc]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0xac]
push ecx
mov ecx, dword [esp + 0xa8]
lea edx, [esp + 0xa0]
push edx
lea eax, [esp + 0xbc]
push eax
push ecx
mov ecx, dword [esp + 0xb8]
call fcn.10d6ad50
test eax, eax
je 0x10d67fb1
mov esi, dword [esp + 0x18]
mov edi, dword [ebp + 8]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
add edx, ecx
mov ecx, dword [esp + 0xc]
cmp ecx, edx
jge 0x10d67f91
imul ecx, ecx, 0x84
push eax
lea eax, [ecx + ebx + 0x40]
push eax
mov ecx, esi
call fcn.10d63a10
mov eax, dword [esp + 0xc]
inc eax
imul eax, eax, 0x84
lea ecx, [esp + 0x80]
push ecx
lea edx, [esp + 0x1c4]
push edx
add eax, ebx
push eax
call fcn.10deed32
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x7c], 3
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x78], 0x20000
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x80], 1
test byte [edi + 0xd4], 1
je 0x10d68788
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
lea eax, [ecx + ebx + 0x7c]
or dword [eax], 0x100
movzx eax, byte [edi + 0x50]
dec eax
je 0x10d6892b
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
dec eax
mov eax, 2
jne 0x10d68ae0
mov dword [edx + ebx + 0x54], 0xd
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x60], eax
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x64], 1
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x58], eax
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x6c], eax
inc dword [esp + 0xc]
mov eax, dword [ebp + 8]
test byte [eax + 0xd4], 4
je 0x10d68c90
mov esi, eax
lea ecx, [esi + 0x94]
push ecx
lea edx, [esp + 0x184]
push edx
lea eax, [esp + 0x38]
push eax
call fcn.10deed32
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0xc]
add edx, ecx
cmp eax, edx
jge 0x10d68db8
imul eax, eax, 0x84
mov ecx, esi
mov edx, dword [ecx + 0x44]
mov ecx, dword [esp + 0x18]
push edx
lea eax, [eax + ebx + 0x40]
push eax
call fcn.10d63a10
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x80], 1
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x78], 0x20000
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x7c], 3
mov edi, dword [esp + 0xc]
inc edi
imul edi, edi, 0x84
add edi, ebx
mov ecx, 0x10
lea esi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 8]
movzx eax, byte [ecx + 0x51]
sub eax, 2
je 0x10d68c35
dec eax
mov eax, 1
je 0x10d68be1
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x54], 0xd
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x60], eax
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x64], 3
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x58], 2
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x6c], eax
mov byte [esp + 0x14], 0x7f
mov byte [esp + 0x15], 0x7f
mov byte [esp + 0x16], 0x7f
mov byte [esp + 0x17], 0
mov eax, dword [esp + 0x14]
mov dword [ebx + 0x24], eax
jmp 0x10d68c8c
mov eax, dword [esp + 0xc]
mov ecx, dword [0x10f77b60]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x54], ecx
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov eax, 2
mov dword [edx + ebx + 0x60], eax
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x64], 1
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x58], eax
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x6c], eax
jmp 0x10d687ed
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0xd4]
mov esi, dword [esp + 0x28]
and edx, 1
mov dword [esp + 0xc4], edx
mov edx, dword [ebp + 0x90]
mov dword [esp + 0x70], 1
mov byte [esp + 0xc0], 8
mov byte [esp + 0xc1], 1
mov ecx, 0x10
lea edi, [esp + 0x80]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 0x94]
push ecx
push edx
push 0
sub esp, 0x84
mov edi, esp
mov ecx, 0x21
lea esi, [esp + 0x100]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0xac]
push ecx
lea edx, [esp + 0xa0]
push edx
mov edx, dword [eax + 0x48]
lea ecx, [esp + 0xbc]
push ecx
mov ecx, dword [esp + 0xb4]
push edx
call fcn.10d6ad50
test eax, eax
je 0x10d67fb1
mov eax, dword [ebp + 8]
mov cl, byte [eax + 0x50]
test cl, cl
je 0x10d687f1
mov eax, dword [esp + 0x14]
test eax, eax
je 0x10d687f1
mov ecx, 0x21
lea esi, [ebp + 0xc]
lea edi, [esp + 0xf8]
rep movsd dword es:[edi], dword [esi]
push 0
lea ecx, [esp + 0xfc]
push ecx
mov edx, eax
mov eax, dword [esp + 0x20]
push edx
push eax
call fcn.10d5b120
add esp, 0x10
test eax, eax
jne 0x10d68a79
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d69016
push str.Either_projected_texture_or_base_material_must_be_simple.
jmp 0x10d69011
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
add edx, ecx
mov ecx, dword [esp + 0xc]
cmp ecx, edx
jge 0x10d68bae
mov esi, dword [esp + 0x18]
imul ecx, ecx, 0x84
push eax
lea eax, [ecx + ebx + 0x40]
push eax
mov ecx, esi
call fcn.10d63a10
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
lea ecx, [esp + 0xf8]
push ecx
lea eax, [edx + ebx + 0x40]
push eax
mov ecx, esi
call fcn.10d696e0
mov ecx, dword [ebp + 8]
movzx eax, byte [ecx + 0x50]
dec eax
je 0x10d68b40
dec eax
je 0x10d68af7
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov eax, 2
mov dword [edx + ebx + 0x54], eax
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x60], eax
jmp 0x10d68964
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov edx, 0xd
mov dword [eax + ebx + 0x54], edx
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov ecx, 2
mov dword [eax + ebx + 0x60], ecx
mov esi, dword [esp + 0xc]
imul esi, esi, 0x84
mov eax, 1
mov dword [esi + ebx + 0x64], eax
mov esi, dword [esp + 0xc]
imul esi, esi, 0x84
mov dword [esi + ebx + 0x58], edx
jmp 0x10d68b8d
mov edx, dword [esp + 0xc]
mov eax, dword [0x10f77b60]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x54], eax
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov ecx, 2
mov dword [edx + ebx + 0x60], ecx
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov eax, 1
mov dword [edx + ebx + 0x64], eax
mov edx, dword [esp + 0xc]
mov esi, dword [0x10f77b60]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x58], esi
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x6c], ecx
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x70], eax
jmp 0x10d687ed
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d68bc2
push str.No_stages_left_for_base_material
call fcn.10905740
mov eax, dword [ebp + 0x94]
test eax, eax
je 0x10d67fb1
mov edx, dword [esp + 0x14]
mov dword [eax], edx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x90
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x54], 4
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x60], 0x22
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x64], eax
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x58], 3
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x70], eax
jmp 0x10d68c8c
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x54], 3
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov eax, 1
mov dword [ecx + ebx + 0x64], eax
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x58], 4
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x6c], 2
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x70], eax
inc dword [esp + 0xc]
mov eax, dword [ebp + 8]
test byte [eax + 0xd4], 8
je 0x10d68e80
mov eax, dword [esp + 0x10]
test eax, eax
je 0x10d68e80
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0xc]
add edx, ecx
cmp eax, edx
jge 0x10d69002
mov eax, dword [esp + 0x10]
push 0
mov ecx, 0x21
lea esi, [ebp + 0xc]
lea edi, [esp + 0xfc]
push 0
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x20]
push eax
push ecx
call fcn.10d5b120
add esp, 0x10
test eax, eax
je 0x10d68fcf
mov edx, dword [esp + 0xc]
mov esi, dword [esp + 0x18]
imul edx, edx, 0x84
push eax
lea eax, [edx + ebx + 0x40]
push eax
mov ecx, esi
call fcn.10d63a10
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
lea ecx, [esp + 0xf8]
push ecx
lea eax, [edx + ebx + 0x40]
push eax
mov ecx, esi
call fcn.10d696e0
mov ecx, dword [ebp + 8]
movzx eax, byte [ecx + 0x51]
mov ecx, 2
sub eax, ecx
je 0x10d68e29
dec eax
je 0x10d68dd0
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x54], 0xd
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov eax, 1
mov dword [edx + ebx + 0x60], eax
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x64], 3
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x58], ecx
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov byte [esp + 0x10], 0x7f
mov byte [esp + 0x11], 0x7f
mov byte [esp + 0x12], 0x7f
mov byte [esp + 0x13], 0
mov edx, dword [esp + 0x10]
mov dword [ecx + ebx + 0x6c], eax
mov dword [ebx + 0x24], edx
jmp 0x10d68e7c
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d69328
push str.No_stages_left_for_gradient_texture
jmp 0x10d69323
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x54], 4
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x60], 0x22
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov eax, 1
mov dword [edx + ebx + 0x64], eax
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x58], 3
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x70], eax
jmp 0x10d68e7c
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x54], 3
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov eax, 1
mov dword [edx + ebx + 0x64], eax
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x58], 4
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x6c], ecx
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x70], eax
inc dword [esp + 0xc]
mov esi, dword [ebp + 8]
test byte [esi + 0xd4], 0x10
jne 0x10d68578
test byte [0x112bfd64], 1
mov edi, 1
jne 0x10d68ec3
mov eax, dword [0x112bfd64]
or eax, edi
push 0x20
mov ecx, 0x112bfc48
mov dword [0x112bfd64], eax
call fcn.10d69e10
push 0x10e425d0
call fcn.10dde7e6
add esp, 4
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0xc]
add eax, edx
cmp ecx, eax
jge 0x10d69314
mov esi, dword [esp + 0x18]
push 0x112bfc48
mov ecx, esi
call fcn.10d55430
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x40], eax
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x80], edi
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x78], 0x10000
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x7c], 3
mov eax, dword [esp + 0xc]
mov edx, dword [esi + 4]
imul eax, eax, 0x84
mov ecx, dword [edx + 0x4700]
mov dword [eax + ebx + 0x44], ecx
mov eax, dword [esp + 0xc]
mov edx, dword [esi + 4]
imul eax, eax, 0x84
mov ecx, dword [edx + 0x4700]
mov dword [eax + ebx + 0x48], ecx
mov eax, dword [esp + 0xc]
mov edx, dword [esi + 4]
imul eax, eax, 0x84
mov ecx, dword [edx + 0x4700]
lea edx, [esp + 0x30]
mov dword [eax + ebx + 0x4c], ecx
push edx
lea ecx, [esp + 0x1c4]
call fcn.10b5ff30
fld dword [esp + 0x3c]
fld dword [esp + 0x44]
fmul dword [esp + 0x44]
fld dword [esp + 0x40]
fmul dword [esp + 0x40]
faddp st(1)
fld st(1)
fmul st(2)
faddp st(1)
fcom qword [0x10e49258]
fnstsw ax
test ah, 1
jne 0x10d69034
fsqrt
fdivr dword [0x10e45008]
fld st(0)
fmulp st(2)
fld dword [esp + 0x40]
fmul st(1)
fstp dword [esp + 0x40]
fmul dword [esp + 0x44]
fstp dword [esp + 0x44]
jmp 0x10d69036
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d68fe3
push str.Base_opacity_isnt_bitmap
call fcn.10905740
mov eax, dword [ebp + 0x94]
test eax, eax
je 0x10d67fb1
mov edx, dword [esp + 0x10]
mov dword [eax], edx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x90
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d69016
push str.No_stages_left_for_base_opacity
call fcn.10905740
mov eax, dword [ebp + 0x94]
test eax, eax
je 0x10d67fb1
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x90
fstp st(0)
fld dword [esp + 0x48]
fld dword [esp + 0x4c]
fld dword [esp + 0x50]
fmul dword [esp + 0x50]
fld st(1)
fmul st(2)
faddp st(1)
fld st(2)
fmul st(3)
faddp st(1)
fcom qword [0x10e49258]
fnstsw ax
test ah, 1
jne 0x10d69079
fsqrt
fdivr dword [0x10e45008]
fld st(0)
fmulp st(3)
fld st(0)
fmulp st(2)
fmul dword [esp + 0x50]
fstp dword [esp + 0x50]
jmp 0x10d6907b
fstp st(0)
fld dword [esp + 0x5c]
fmul dword [esp + 0x5c]
fld dword [esp + 0x58]
fmul dword [esp + 0x58]
faddp st(1)
fld dword [esp + 0x54]
fmul dword [esp + 0x54]
faddp st(1)
fcom qword [0x10e49258]
fnstsw ax
test ah, 1
jne 0x10d690ca
fsqrt
fdivr dword [0x10e45008]
fld dword [esp + 0x54]
fmul st(1)
fstp dword [esp + 0x54]
fld dword [esp + 0x58]
fmul st(1)
fstp dword [esp + 0x58]
fmul dword [esp + 0x5c]
fstp dword [esp + 0x5c]
jmp 0x10d690cc
fstp st(0)
mov eax, dword [esp + 0xc]
fxch st(2)
inc eax
imul eax, eax, 0x84
fstp dword [eax + ebx]
mov ecx, dword [esp + 0xc]
fld dword [esp + 0x40]
imul ecx, ecx, 0x84
xor eax, eax
fstp dword [ecx + ebx + 0x94]
mov edx, dword [esp + 0xc]
fld dword [esp + 0x44]
imul edx, edx, 0x84
fstp dword [edx + ebx + 0xa4]
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0xb4], eax
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
fstp dword [edx + ebx + 0x88]
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
fstp dword [ecx + ebx + 0x98]
mov edx, dword [esp + 0xc]
fld dword [esp + 0x50]
imul edx, edx, 0x84
fstp dword [edx + ebx + 0xa8]
mov ecx, dword [esp + 0xc]
fld dword [esp + 0x54]
imul ecx, ecx, 0x84
fchs
mov dword [ecx + ebx + 0xb8], eax
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
fstp dword [edx + ebx + 0x8c]
mov ecx, dword [esp + 0xc]
fld dword [esp + 0x58]
imul ecx, ecx, 0x84
fchs
fstp dword [ecx + ebx + 0x9c]
mov edx, dword [esp + 0xc]
fld dword [esp + 0x5c]
imul edx, edx, 0x84
fchs
fstp dword [edx + ebx + 0xac]
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0xbc], eax
mov edx, dword [esp + 0xc]
mov ecx, dword [ebp + 8]
imul edx, edx, 0x84
mov dword [edx + ebx + 0xb0], eax
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0xc0], 0x3f800000
movzx eax, byte [ecx + 0x51]
mov ecx, 2
sub eax, ecx
je 0x10d692bd
dec eax
je 0x10d69266
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x54], 0xd
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x60], edi
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x64], 3
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x58], ecx
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x6c], edi
mov byte [esp + 0x10], 0x7f
mov byte [esp + 0x11], 0x7f
mov byte [esp + 0x12], 0x7f
mov byte [esp + 0x13], 0
mov edx, dword [esp + 0x10]
mov dword [ebx + 0x24], edx
inc dword [esp + 0xc]
jmp 0x10d68578
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x54], 4
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x60], ecx
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x64], edi
mov ecx, dword [esp + 0xc]
imul ecx, ecx, 0x84
mov dword [ecx + ebx + 0x58], 3
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x70], edi
inc dword [esp + 0xc]
jmp 0x10d68578
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x54], 3
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x64], edi
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x58], 4
mov edx, dword [esp + 0xc]
imul edx, edx, 0x84
mov dword [edx + ebx + 0x6c], ecx
mov eax, dword [esp + 0xc]
imul eax, eax, 0x84
mov dword [eax + ebx + 0x70], edi
inc dword [esp + 0xc]
jmp 0x10d68578
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d69328
push str.No_stages_left_for_directional_attenuation
call fcn.10905740
mov eax, dword [ebp + 0x94]
test eax, eax
je 0x10d67fb1
mov dword [eax], esi
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x90
mov dword [ebx + 0x28], ecx
mov dword [ebx + 0x2c], ecx
jmp 0x10d6937f
mov dword [ebx + 0x28], ecx
mov dword [ebx + 0x2c], ecx
mov byte [esp + 0x10], 0
mov byte [esp + 0x11], 0
mov byte [esp + 0x12], 0
mov byte [esp + 0x13], 0
mov ecx, dword [esp + 0x10]
mov dword [ebx + 0x30], edx
mov dword [ebx + 0x34], ecx
jmp 0x10d6937f
mov dword [ebx + 0x28], 5
mov dword [ebx + 0x2c], 6
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + 0x2ca0c]
mov eax, dword [eax + esi*4 + 0x56c]
mov esi, dword [esp + 0xc]
mov dword [eax + 0x3c], esi
mov eax, dword [esp + 0x24]
mov ecx, dword [ecx + 0x2ca0c]
inc eax
mov dword [esp + 0x24], eax
mov dword [ecx + 0x58c], eax
mov ecx, dword [esp + 0x24]
pop edi
xor eax, eax
cmp ecx, edx
pop esi
sete al
pop ebx
mov esp, ebp
pop ebp
ret 0x90