Function at 0x10d64960
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10e2f0bc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1d8
push ebx
mov ebx, ecx
push esi
xor esi, esi
mov dword [esp + 0x2c], esi
mov eax, dword [ebx + 4]
mov ecx, dword [eax + 0x4200]
mov eax, dword [eax + 0x41fc]
sub eax, ecx
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x30], eax
mov eax, dword [edi + 0x44]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x2ca0c]
mov dword [esp + 0x28], ecx
xor ecx, ecx
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x24], esi
cmp dword [eax + 0x1e0], esi
mov edx, dword [eax + 0x1d4]
setne cl
cmp edx, esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x1c], ecx
mov ecx, 1
jne 0x10d649ef
cmp dword [eax + 0x1d0], esi
mov dword [esp + 0x2c], esi
je 0x10d649f3
mov dword [esp + 0x2c], ecx
mov eax, dword [edi + 0x54]
cmp eax, esi
je 0x10d64a0f
cmp dword [edi + 0x58], esi
jne 0x10d64a0f
mov dword [esp + 0x18], eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x1c], esi
mov eax, dword [edi + 0x48]
mov dword [esp + 0x20], ecx
cmp dword [ebp + 0x18], esi
mov dword [esp + 0x34], eax
je 0x10d64a3a
mov ecx, dword [ebp + 0x8c]
mov eax, dword [ebp + 0x88]
xor edx, edx
cmp ecx, esi
sete dl
mov dword [esp + 0x34], eax
mov dword [esp + 0x20], edx
mov ecx, dword [ebx + 4]
cmp dword [ecx + 0x74], esi
je 0x10d64a48
mov dword [edi + 0x4c], esi
mov dword [edi + 0x50], esi
mov edx, dword [ebp + 0x94]
cmp eax, esi
mov eax, dword [ebp + 0x90]
push edx
push eax
mov ecx, 0x21
lea edx, [esp + 0x1c]
lea esi, [ebp + 0xc]
lea eax, [esp + 0x18]
push 0
jne 0x10d657c4
sub esp, 0x84
mov edi, esp
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0xb4]
push ecx
mov ecx, dword [esp + 0xac]
push edx
push eax
push ecx
mov ecx, ebx
call fcn.10d6ad50
test eax, eax
je 0x10d66307
mov eax, dword [esp + 0x14]
cmp eax, 1
jne 0x10d64b0d
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x10d64ace
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [esp + 0x10]
mov ecx, dword [edx + eax*4 + 0x56c]
add ecx, 0x40
push 0
push ecx
mov ecx, ebx
call fcn.10d63860
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x10d64d46
mov ecx, dword [ebx + 0x2ca0c]
imul eax, eax, 0x84
mov edx, dword [ecx + 0x1e0]
push edx
mov edx, dword [esp + 0x14]
mov ecx, dword [ecx + edx*4 + 0x56c]
lea edx, [ecx + eax + 0x40]
push edx
mov ecx, ebx
call fcn.10d63800
inc dword [esp + 0x14]
jmp 0x10d64d46
cmp eax, dword [esp + 0x28]
mov edi, dword [esp + 0x1c]
jge 0x10d64b72
test edi, edi
je 0x10d64b25
mov esi, dword [esp + 0x2c]
test esi, esi
jne 0x10d64b82
jmp 0x10d64ada
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x10d64d46
test eax, eax
je 0x10d64d46
mov ecx, dword [ebp + 8]
imul eax, eax, 0x84
mov edx, dword [ecx + 0x68]
mov ecx, dword [ebx + 0x2ca0c]
shr edx, 2
and edx, 1
push edx
mov edx, dword [esp + 0x14]
mov ecx, dword [ecx + edx*4 + 0x56c]
lea edx, [ecx + eax + 0x40]
push edx
mov ecx, ebx
call fcn.10d63900
inc dword [esp + 0x14]
jmp 0x10d64d46
mov esi, dword [esp + 0x2c]
test esi, esi
jne 0x10d64b82
test edi, edi
je 0x10d64d46
mov edx, dword [esp + 0x10]
mov ecx, dword [ebx + 0x2ca0c]
mov ecx, dword [ecx + edx*4 + 0x56c]
mov dword [ecx + 0x3c], eax
mov ecx, dword [esp + 0x10]
inc ecx
lea edx, [ebx + 0x2ca10]
mov dword [esp + 0x10], ecx
push edx
lea ecx, [ebx + 0x2ce78]
mov dword [esp + 0x18], 0
call fcn.10d5c200
mov ecx, dword [ebx + 0x2ca0c]
mov edx, dword [esp + 0x10]
mov dword [ecx + edx*4 + 0x56c], eax
mov eax, dword [ebx + 0x2ca0c]
mov ecx, dword [esp + 0x10]
mov edx, dword [eax + ecx*4 + 0x56c]
mov dword [edx + 0x18], 0
mov edx, dword [esp + 0x14]
mov eax, dword [ebx + 0x2ca0c]
imul edx, edx, 0x84
mov ecx, dword [eax + 0x1e0]
push esi
push ecx
mov ecx, dword [esp + 0x18]
mov eax, dword [eax + ecx*4 + 0x56c]
lea ecx, [eax + edx + 0x40]
push ecx
mov ecx, ebx
call fcn.10d63990
mov ecx, dword [esp + 0x14]
inc ecx
test esi, esi
mov dword [esp + 0x14], ecx
je 0x10d64c9d
test edi, edi
jne 0x10d64c9d
mov edx, dword [ebp + 8]
test byte [edx + 0x68], 4
jne 0x10d64c9d
mov eax, dword [ebx + 0x2ca0c]
mov ecx, dword [esp + 0x10]
mov edx, dword [eax + ecx*4 + 0x56c]
mov dword [edx + 0x28], 9
mov eax, dword [ebx + 0x2ca0c]
mov ecx, dword [esp + 0x10]
mov edx, dword [eax + ecx*4 + 0x56c]
mov al, 0xff
mov byte [esp + 0x1c], al
mov byte [esp + 0x1d], al
mov byte [esp + 0x1e], al
mov ecx, 1
mov dword [edx + 0x2c], ecx
mov edx, dword [esp + 0x10]
mov eax, dword [ebx + 0x2ca0c]
mov eax, dword [eax + edx*4 + 0x56c]
mov byte [esp + 0x1f], 0
mov edx, dword [esp + 0x1c]
mov dword [eax + 0x34], edx
mov eax, dword [ebx + 0x2ca0c]
mov edx, dword [esp + 0x10]
mov eax, dword [eax + edx*4 + 0x56c]
mov dword [eax + 0x30], ecx
jmp 0x10d64d16
mov ecx, dword [ebx + 0x2ca0c]
mov edx, dword [esp + 0x10]
mov eax, dword [ecx + edx*4 + 0x56c]
mov dword [eax + 0x28], 9
mov ecx, dword [ebx + 0x2ca0c]
mov edx, dword [esp + 0x10]
mov eax, dword [ecx + edx*4 + 0x56c]
mov dword [eax + 0x2c], 3
mov ecx, dword [ebx + 0x2ca0c]
mov edx, dword [esp + 0x10]
mov eax, dword [ecx + edx*4 + 0x56c]
mov byte [esp + 0x1c], 0x7f
mov byte [esp + 0x1d], 0x7f
mov byte [esp + 0x1e], 0x7f
mov byte [esp + 0x1f], 0
mov ecx, dword [esp + 0x1c]
mov dword [eax + 0x34], ecx
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [esp + 0x10]
mov ecx, dword [edx + eax*4 + 0x56c]
mov dword [ecx + 0x30], 1
mov ecx, 1
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x68]
mov edx, dword [ebx + 0x2ca0c]
mov esi, dword [esp + 0x10]
mov edx, dword [edx + esi*4 + 0x56c]
and eax, ecx
mov dword [edx + 0x1c], eax
mov eax, dword [ebx + 0x2ca0c]
mov edx, dword [esp + 0x10]
mov eax, dword [eax + edx*4 + 0x56c]
mov dword [eax + 8], ecx
mov eax, dword [esp + 0x38]
test eax, eax
mov dword [esp + 0x2c], 0
jne 0x10d64eb6
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x54]
test eax, eax
je 0x10d64eb6
push 0
lea edx, [esp + 0xd4]
push edx
mov ecx, 0x21
lea esi, [ebp + 0xc]
lea edi, [esp + 0xd8]
rep movsd dword es:[edi], dword [esi]
push eax
mov ecx, 0x21
lea esi, [ebp + 0xc]
lea edi, [esp + 0x54]
push ebx
rep movsd dword es:[edi], dword [esi]
call fcn.10d5b120
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x58]
mov edi, eax
push 0
lea eax, [esp + 0x5c]
push eax
push edx
push ebx
call fcn.10d5b120
mov ecx, dword [esp + 0x30]
add esp, 0x20
test ecx, ecx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x14]
jne 0x10d64ef4
mov edx, dword [esp + 0x28]
dec edx
cmp eax, edx
jge 0x10d64ef4
test edi, edi
je 0x10d64ef4
mov edx, dword [esp + 0x20]
test edx, edx
je 0x10d64ef4
mov ecx, dword [ebx + 0x2ca0c]
imul eax, eax, 0x84
mov ecx, dword [ecx + 0x56c]
lea esi, [ecx + eax + 0x40]
push edx
push esi
mov ecx, ebx
call fcn.10d63a10
mov ecx, 2
mov dword [esi + 0x2c], ecx
mov dword [esi + 0x18], ecx
mov eax, 1
mov dword [esi + 0x30], eax
mov dword [esi + 0x24], eax
mov dword [esi + 0x14], 3
mov ecx, dword [esp + 0x14]
mov eax, dword [ebx + 0x2ca0c]
imul ecx, ecx, 0x84
lea edx, [esp + 0x48]
push edx
mov edx, dword [esp + 0x14]
mov eax, dword [eax + edx*4 + 0x56c]
lea ecx, [eax + ecx + 0x40]
push ecx
mov ecx, ebx
call fcn.10d696e0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov edx, dword [ebx + 0x2ca0c]
inc eax
mov dword [esp + 0x14], eax
imul eax, eax, 0x84
mov edx, dword [edx + ecx*4 + 0x56c]
push edi
lea eax, [edx + eax + 0x40]
push eax
mov ecx, ebx
call fcn.10d63b50
mov eax, dword [esp + 0x14]
mov edx, dword [ebx + 0x2ca0c]
imul eax, eax, 0x84
lea ecx, [esp + 0xd0]
push ecx
mov ecx, dword [esp + 0x14]
mov edx, dword [edx + ecx*4 + 0x56c]
lea eax, [edx + eax + 0x40]
push eax
mov ecx, ebx
call fcn.10d696e0
inc dword [esp + 0x14]
mov dword [esp + 0x2c], 1
mov ecx, dword [ebx + 4]
mov eax, dword [ecx + 0x44]
test eax, eax
je 0x10d65226
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x1cc]
test eax, eax
je 0x10d65226
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x5c]
test eax, eax
je 0x10d65191
mov ecx, eax
mov eax, dword [edx + 0x60]
mov dword [esp + 0x20], eax
jmp 0x10d651b1
mov edx, dword [ebx + 0x2ca0c]
mov ecx, dword [edx + ecx*4 + 0x56c]
mov dword [ecx + 0x3c], eax
mov eax, dword [esp + 0x10]
lea edx, [ebx + 0x2ca10]
inc eax
xor esi, esi
push edx
lea ecx, [ebx + 0x2ce78]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], esi
call fcn.10d5c200
mov ecx, dword [ebx + 0x2ca0c]
mov edx, dword [esp + 0x10]
mov dword [ecx + edx*4 + 0x56c], eax
mov eax, dword [ebx + 0x2ca0c]
mov ecx, dword [esp + 0x10]
mov edx, dword [eax + ecx*4 + 0x56c]
mov eax, dword [ebp + 8]
mov dword [edx + 0x18], esi
mov ecx, dword [eax + 0x68]
mov eax, dword [esp + 0x10]
mov edx, dword [ebx + 0x2ca0c]
mov edx, dword [edx + eax*4 + 0x56c]
mov eax, dword [ebp + 0x94]
and ecx, 1
mov dword [edx + 0x1c], ecx
mov ecx, dword [ebp + 0x90]
push eax
push ecx
push esi
sub esp, 0x84
mov edi, esp
lea edx, [esp + 0xb4]
push edx
mov edx, dword [ebp + 8]
mov ecx, 0x21
lea esi, [ebp + 0xc]
rep movsd dword es:[edi], dword [esi]
lea eax, [esp + 0xa8]
push eax
mov eax, dword [edx + 0x54]
lea ecx, [esp + 0xa8]
push ecx
push eax
mov ecx, ebx
call fcn.10d6ad50
test eax, eax
je 0x10d66307
mov edi, dword [ebp + 8]
mov ecx, dword [edi + 0x58]
cmp ecx, dword [edi + 0x54]
jne 0x10d6500e
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [esp + 0x10]
mov ecx, dword [edx + eax*4 + 0x56c]
mov dword [ecx + 0x28], 5
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [esp + 0x10]
mov ecx, dword [edx + eax*4 + 0x56c]
mov dword [ecx + 0x2c], 6
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [esp + 0x10]
mov ecx, dword [edx + eax*4 + 0x56c]
mov dword [ecx + 8], 1
jmp 0x10d64eb6
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x10d65154
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x28]
jge 0x10d650e7
mov esi, dword [esp + 0x10]
imul eax, eax, 0x84
mov edx, dword [ebx + 0x2ca0c]
mov edx, dword [edx + esi*4 + 0x56c]
push ecx
lea esi, [edx + eax + 0x40]
push esi
mov ecx, ebx
call fcn.10d63a10
mov eax, 2
mov dword [esi + 0x2c], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x14], 3
mov edi, 1
mov dword [esi + 0x30], edi
mov dword [esi + 0x24], edi
mov edx, dword [esp + 0x14]
mov ecx, dword [ebx + 0x2ca0c]
imul edx, edx, 0x84
lea eax, [esp + 0x48]
push eax
mov eax, dword [esp + 0x14]
mov ecx, dword [ecx + eax*4 + 0x56c]
lea edx, [ecx + edx + 0x40]
push edx
mov ecx, ebx
call fcn.10d696e0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
inc eax
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x2ca0c]
mov edx, dword [eax + ecx*4 + 0x56c]
mov dword [edx + 0x28], 5
mov eax, dword [ebx + 0x2ca0c]
mov ecx, dword [esp + 0x10]
mov edx, dword [eax + ecx*4 + 0x56c]
mov dword [edx + 0x2c], 6
mov eax, dword [ebx + 0x2ca0c]
mov ecx, dword [esp + 0x10]
mov edx, dword [eax + ecx*4 + 0x56c]
mov dword [edx + 8], edi
jmp 0x10d64eb6
mov esi, dword [ebp + 0x90]
test esi, esi
je 0x10d6512b
push eax
lea eax, [esp + 0x40]
push str.No_room_for_SelfIllimunationMask_in_multipass_SelfIllumination__StagesUsed_was__d_
push eax
call fcn.109bc8a0
add esp, 0xc
mov dword [esp + 0x1ec], 0
push eax
mov ecx, esi
call fcn.109057e0
lea ecx, [esp + 0x3c]
mov dword [esp + 0x1ec], 0xffffffff
call fcn.10902a90
mov eax, dword [ebp + 0x94]
test eax, eax
je 0x10d660fa
mov dword [eax], edi
xor eax, eax
mov ecx, dword [esp + 0x1e4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x90
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d65168
push str.SelfIllimunationMask_must_be_a_simple_bitmap
call fcn.10905740
mov eax, dword [ebp + 0x94]
test eax, eax
je 0x10d660fa
mov dword [eax], edi
xor eax, eax
mov ecx, dword [esp + 0x1e4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x90
mov ecx, dword [esp + 0x18]
push 0
push 0
push ecx
push ebx
call fcn.10d6a7c0
add esp, 0x10
test eax, eax
je 0x10d65226
mov edx, dword [eax + 0x64]
mov ecx, dword [eax + 0x60]
mov dword [esp + 0x20], edx
test ecx, ecx
mov dword [esp + 0x38], ecx
je 0x10d65226
mov eax, dword [esp + 0x20]
mov ecx, 0x21
lea esi, [ebp + 0xc]
lea edi, [esp + 0x48]
rep movsd dword es:[edi], dword [esi]
push eax
lea ecx, [esp + 0x4c]
call fcn.10d63d20
mov edx, dword [esp + 0x38]
push 0
lea ecx, [esp + 0x4c]
push ecx
push edx
push ebx
call fcn.10d5b120
add esp, 0x10
test eax, eax
je 0x10d65226
push 0
sub esp, 0x84
mov edi, esp
mov ecx, 0x21
lea esi, [esp + 0xd0]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0xac]
push ecx
lea edx, [esp + 0xa0]
push edx
lea ecx, [esp + 0xa0]
push ecx
push eax
mov ecx, ebx
call fcn.10d6ab20
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x4c]
test eax, eax
je 0x10d654c0
mov ecx, 0x21
lea esi, [ebp + 0xc]
lea edi, [esp + 0xd0]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x21
lea esi, [ebp + 0xc]
lea edi, [esp + 0x48]
rep movsd dword es:[edi], dword [esi]
push 0
lea ecx, [esp + 0xd4]
push ecx
push eax
push ebx
call fcn.10d5b120
mov esi, dword [ebp + 8]
push 0
lea edx, [esp + 0x5c]
mov dword [esp + 0x30], eax
mov eax, dword [esi + 0x50]
push edx
push eax
push ebx
call fcn.10d5b120
mov edx, dword [esi + 0x50]
push 0
lea ecx, [esp + 0x6c]
push ecx
push edx
push ebx
mov dword [esp + 0x50], eax
call fcn.10d5adc0
mov ecx, dword [esp + 0x40]
add esp, 0x30
test ecx, ecx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x14]
jne 0x10d654e2
mov edx, dword [esp + 0x28]
cmp eax, edx
mov edi, esi
jge 0x10d652e2
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x10d652e2
mov esi, dword [edi + 0x50]
test esi, esi
je 0x10d653e4
cmp esi, dword [edi + 0x44]
jne 0x10d652d6
mov esi, dword [esp + 0x2c]
test esi, esi
je 0x10d653e4
mov esi, dword [esp + 0x18]
test esi, esi
jne 0x10d653ec
dec edx
cmp eax, edx
jge 0x10d654e2
mov edx, dword [esp + 0x1c]
test edx, edx
je 0x10d654e2
mov edx, dword [esp + 0x20]
test edx, edx
je 0x10d654e2
mov ecx, dword [ebx + 0x2ca0c]
imul eax, eax, 0x84
mov ecx, dword [ecx + 0x56c]
lea esi, [ecx + eax + 0x40]
push edx
push esi
mov ecx, ebx
call fcn.10d63a10
mov eax, 2
mov dword [esi + 0x2c], eax
mov ecx, 1
mov dword [esi + 0x30], ecx
mov dword [esi + 0x24], ecx
mov dword [esi + 0x18], eax
mov dword [esi + 0x14], 3
mov ecx, dword [esp + 0x14]
mov eax, dword [ebx + 0x2ca0c]
imul ecx, ecx, 0x84
lea edx, [esp + 0x48]
push edx
mov edx, dword [esp + 0x14]
mov eax, dword [eax + edx*4 + 0x56c]
lea ecx, [eax + ecx + 0x40]
push ecx
mov ecx, ebx
call fcn.10d696e0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov edx, dword [ebx + 0x2ca0c]
mov edi, dword [edi + 0x68]
inc eax
mov dword [esp + 0x14], eax
imul eax, eax, 0x84
mov edx, dword [edx + ecx*4 + 0x56c]
lea esi, [edx + eax + 0x40]
mov eax, dword [esp + 0x1c]
push eax
shr edi, 4
push esi
mov ecx, ebx
and edi, 1
call fcn.10d63a10
mov eax, 1
mov ecx, 2
mov dword [esi + 0x2c], eax
mov dword [esi + 0x18], ecx
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], ecx
mov ecx, dword [ebx + 4]
test dword [ecx + 0x41f8], 0x20000
je 0x10d65484
test edi, edi
mov eax, dword [0x10f77b60]
jne 0x10d653dc
mov eax, 0x12
mov dword [esi + 0x14], eax
jmp 0x10d6548d
mov esi, dword [esp + 0x18]
test esi, esi
je 0x10d65441
mov ecx, dword [ebx + 8]
mov edx, dword [ecx + 0x34]
mov ecx, dword [edx + 0x94]
mov edx, dword [ecx + 0x454]
mov eax, dword [esi]
push edx
lea ecx, [esp + 0x34]
push ecx
mov ecx, esi
call dword [eax + 0xa4]
mov al, byte [eax + 3]
mov edx, dword [ebx + 0x2ca0c]
mov byte [esp + 0x18], al
mov byte [esp + 0x19], al
mov byte [esp + 0x1a], al
mov byte [esp + 0x1b], al
mov eax, dword [esp + 0x10]
mov ecx, dword [edx + eax*4 + 0x56c]
mov edx, dword [esp + 0x18]
mov dword [ecx + 0x24], edx
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov edx, dword [edi + 0x68]
shr edx, 4
and edx, 1
push edx
xor edx, edx
test esi, esi
mov esi, dword [edi + 0x50]
setne dl
push edx
xor edx, edx
test esi, esi
setne dl
imul eax, eax, 0x84
push edx
mov edx, dword [esp + 0x28]
push edx
mov edx, dword [ebx + 0x2ca0c]
mov ecx, dword [edx + ecx*4 + 0x56c]
lea edx, [ecx + eax + 0x40]
push edx
mov ecx, ebx
call fcn.10d63b90
jmp 0x10d6548d
mov edx, dword [0x10f77b60]
mov dword [esi + 0x14], edx
mov edx, dword [esp + 0x14]
mov ecx, dword [ebx + 0x2ca0c]
imul edx, edx, 0x84
lea eax, [esp + 0xd0]
push eax
mov eax, dword [esp + 0x14]
mov ecx, dword [ecx + eax*4 + 0x56c]
lea edx, [ecx + edx + 0x40]
push edx
mov ecx, ebx
call fcn.10d696e0
inc dword [esp + 0x14]
mov esi, 1
mov eax, dword [ebp + 0x10]
xor edi, edi
cmp eax, edi
je 0x10d66320
lea eax, [ebp + 0xc]
push eax
mov ecx, ebx
call fcn.10d69450
jmp 0x10d66626
mov edx, dword [ebx + 0x2ca0c]
mov ecx, dword [edx + ecx*4 + 0x56c]
mov dword [ecx + 0x3c], eax
mov eax, dword [esp + 0x10]
lea edx, [ebx + 0x2ca10]
inc eax
xor esi, esi
push edx
lea ecx, [ebx + 0x2ce78]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], esi
call fcn.10d5c200
mov ecx, dword [ebx + 0x2ca0c]
mov edx, dword [esp + 0x10]
mov dword [ecx + edx*4 + 0x56c], eax
mov eax, dword [ebx + 0x2ca0c]
mov ecx, dword [esp + 0x10]
mov edx, dword [eax + ecx*4 + 0x56c]
mov eax, dword [ebp + 8]
mov dword [edx + 0x18], esi
mov ecx, dword [eax + 0x68]
mov eax, dword [esp + 0x10]
mov edx, dword [ebx + 0x2ca0c]
mov edx, dword [edx + eax*4 + 0x56c]
mov eax, dword [ebp + 0x94]
and ecx, 1
mov dword [edx + 0x1c], ecx
mov ecx, dword [ebp + 0x90]
push eax
push ecx
push esi
sub esp, 0x84
mov edi, esp
lea edx, [esp + 0xb4]
push edx
mov edx, dword [ebp + 8]
mov ecx, 0x21
lea esi, [ebp + 0xc]
rep movsd dword es:[edi], dword [esi]
lea eax, [esp + 0xa8]
push eax
mov eax, dword [edx + 0x4c]
lea ecx, [esp + 0xa8]
push ecx
push eax
mov ecx, ebx
call fcn.10d6ad50
test eax, eax
je 0x10d66307
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x50]
test eax, eax
jne 0x10d6563d
mov edx, dword [esp + 0x10]
mov ecx, dword [ebx + 0x2ca0c]
mov ecx, dword [ecx + edx*4 + 0x56c]
mov eax, 2
mov dword [ecx + 0x28], eax
mov ecx, dword [esp + 0x10]
mov edx, dword [ebx + 0x2ca0c]
mov edx, dword [edx + ecx*4 + 0x56c]
mov dword [edx + 0x2c], eax
mov eax, dword [ebx + 0x2ca0c]
mov ecx, dword [esp + 0x10]
mov edx, dword [eax + ecx*4 + 0x56c]
mov eax, 1
mov dword [edx + 8], eax
mov edx, dword [esp + 0x10]
mov ecx, dword [ebx + 0x2ca0c]
mov ecx, dword [ecx + edx*4 + 0x56c]
mov dword [ecx + 0x30], eax
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [esp + 0x10]
mov ecx, dword [edx + eax*4 + 0x56c]
mov byte [esp + 0x18], 0
mov byte [esp + 0x19], 0
mov byte [esp + 0x1a], 0
mov byte [esp + 0x1b], 0
mov edx, dword [esp + 0x18]
mov dword [ecx + 0x34], edx
jmp 0x10d654c0
mov eax, dword [esp + 0x18]
test eax, eax
je 0x10d6565d
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d65168
push str.TODO:_constant_SpecularityMask_with_multipass_specular
jmp 0x10d65163
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x10d657a7
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x28]
jge 0x10d65776
mov esi, dword [esp + 0x10]
imul eax, eax, 0x84
mov edx, dword [ebx + 0x2ca0c]
mov edx, dword [edx + esi*4 + 0x56c]
push ecx
lea esi, [edx + eax + 0x40]
push esi
mov ecx, ebx
call fcn.10d63a10
mov eax, 2
mov dword [esi + 0x2c], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x14], 3
mov edi, 1
mov dword [esi + 0x30], edi
mov dword [esi + 0x24], edi
mov edx, dword [esp + 0x14]
mov ecx, dword [ebx + 0x2ca0c]
imul edx, edx, 0x84
lea eax, [esp + 0x48]
push eax
mov eax, dword [esp + 0x14]
mov ecx, dword [ecx + eax*4 + 0x56c]
lea edx, [ecx + edx + 0x40]
push edx
mov ecx, ebx
call fcn.10d696e0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
inc eax
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x2ca0c]
mov edx, dword [eax + ecx*4 + 0x56c]
mov dword [edx + 0x28], 5
mov eax, dword [ebx + 0x2ca0c]
mov ecx, dword [esp + 0x10]
mov edx, dword [eax + ecx*4 + 0x56c]
mov dword [edx + 0x2c], 2
mov eax, dword [ebx + 0x2ca0c]
mov ecx, dword [esp + 0x10]
mov edx, dword [eax + ecx*4 + 0x56c]
mov dword [edx + 8], edi
mov eax, dword [ebx + 0x2ca0c]
mov ecx, dword [esp + 0x10]
mov edx, dword [eax + ecx*4 + 0x56c]
mov dword [edx + 0x30], edi
mov eax, dword [ebx + 0x2ca0c]
mov ecx, dword [esp + 0x10]
mov edx, dword [eax + ecx*4 + 0x56c]
mov byte [esp + 0x18], 0
mov byte [esp + 0x19], 0
mov byte [esp + 0x1a], 0
mov byte [esp + 0x1b], 0
mov eax, dword [esp + 0x18]
mov dword [edx + 0x34], eax
jmp 0x10d654c0
mov esi, dword [ebp + 0x90]
test esi, esi
je 0x10d6512b
push eax
lea ecx, [esp + 0x40]
push str.No_room_for_SpecularityMask_in_multipass_specular__StagesUsed_was__d_
push ecx
call fcn.109bc8a0
add esp, 0xc
mov dword [esp + 0x1ec], 1
jmp 0x10d6510f
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d6512b
push str.SpecularityMask_must_be_a_simple_bitmap
call fcn.10905740
jmp 0x10d6512b
sub esp, 0x84
mov edi, esp
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0xb4]
push ecx
mov ecx, dword [esp + 0xac]
push edx
push eax
push ecx
mov ecx, ebx
call fcn.10d6ad50
test eax, eax
je 0x10d66307
mov eax, dword [esp + 0x2c]
test eax, eax
mov esi, 1
je 0x10d65826
mov eax, dword [esp + 0x14]
cmp eax, esi
jne 0x10d65894
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [esp + 0x10]
mov ecx, dword [edx + eax*4 + 0x56c]
add ecx, 0x40
push 0
push ecx
mov ecx, ebx
call fcn.10d63860
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x10d65872
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
add eax, edx
cmp ecx, eax
jge 0x10d6592c
mov eax, dword [ebx + 0x2ca0c]
imul ecx, ecx, 0x84
mov edx, dword [eax + 0x1e0]
push edx
mov edx, dword [esp + 0x14]
mov eax, dword [eax + edx*4 + 0x56c]
lea ecx, [eax + ecx + 0x40]
push ecx
mov ecx, ebx
call fcn.10d63800
inc dword [esp + 0x14]
mov eax, dword [esp + 0x34]
cmp eax, dword [esp + 0x18]
je 0x10d65a06
mov eax, dword [esp + 0x20]
test eax, eax
je 0x10d65944
lea eax, [ebp + 0xc]
jmp 0x10d65950
mov edi, dword [esp + 0x30]
mov edx, dword [esp + 0x28]
lea ecx, [edi + edx]
cmp eax, ecx
jge 0x10d658ec
mov edx, dword [ebp + 8]
imul eax, eax, 0x84
mov ecx, dword [edx + 0x68]
mov edx, dword [ebx + 0x2ca0c]
shr ecx, 2
and ecx, esi
push ecx
mov ecx, dword [esp + 0x14]
mov edx, dword [edx + ecx*4 + 0x56c]
lea eax, [edx + eax + 0x40]
push eax
mov ecx, ebx
call fcn.10d63900
mov ecx, dword [esp + 0x14]
inc ecx
test edi, edi
mov dword [esp + 0x14], ecx
je 0x10d65826
inc dword [esp + 0x24]
jmp 0x10d65826
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d65900
push str.No_stages_left_for_vertex_lighting_stage
call fcn.10905740
mov eax, dword [ebp + 0x94]
test eax, eax
je 0x10d660fa
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
xor eax, eax
mov ecx, dword [esp + 0x1e4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x90
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d660eb
push str.No_stages_left_for_lightmap
jmp 0x10d660e6
lea ecx, [esp + 0xd0]
call fcn.10d63cc0
mov edx, dword [esp + 0x34]
mov esi, eax
mov ecx, 0x21
lea edi, [esp + 0x48]
rep movsd dword es:[edi], dword [esi]
push 0
lea ecx, [esp + 0x4c]
push ecx
push edx
push ebx
call fcn.10d5b120
add esp, 0x10
test eax, eax
je 0x10d65ac9
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
add edx, ecx
mov ecx, dword [esp + 0x14]
cmp ecx, edx
jge 0x10d65ab1
mov esi, dword [esp + 0x10]
imul ecx, ecx, 0x84
mov edx, dword [ebx + 0x2ca0c]
mov edx, dword [edx + esi*4 + 0x56c]
lea esi, [edx + ecx + 0x40]
push eax
push esi
mov ecx, ebx
call fcn.10d63a10
mov ecx, 2
mov dword [esi + 0x2c], ecx
mov dword [esi + 0x18], ecx
mov eax, 1
mov dword [esi + 0x30], eax
mov dword [esi + 0x24], eax
mov dword [esi + 0x14], 3
mov edx, dword [esp + 0x14]
mov ecx, dword [ebx + 0x2ca0c]
imul edx, edx, 0x84
lea eax, [esp + 0x48]
push eax
mov eax, dword [esp + 0x14]
mov ecx, dword [ecx + eax*4 + 0x56c]
lea edx, [ecx + edx + 0x40]
push edx
mov ecx, ebx
call fcn.10d696e0
inc dword [esp + 0x14]
mov esi, 1
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x10d65ef7
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x54]
test eax, eax
je 0x10d65ef7
mov ecx, dword [esp + 0x10]
mov eax, dword [ebx + 0x2ca0c]
mov edx, dword [eax + ecx*4 + 0x56c]
mov eax, dword [esp + 0x14]
mov dword [edx + 0x3c], eax
mov eax, dword [esp + 0x10]
lea ecx, [ebx + 0x2ca10]
inc eax
push ecx
lea ecx, [ebx + 0x2ce78]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], 0
call fcn.10d5c200
mov edx, dword [ebx + 0x2ca0c]
mov ecx, dword [esp + 0x10]
mov dword [edx + ecx*4 + 0x56c], eax
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [esp + 0x10]
mov ecx, dword [edx + eax*4 + 0x56c]
mov dword [ecx + 0x18], 0
mov edx, dword [edi + 0x68]
mov eax, dword [ebx + 0x2ca0c]
mov ecx, dword [esp + 0x10]
mov eax, dword [eax + ecx*4 + 0x56c]
and edx, esi
mov dword [eax + 0x1c], edx
mov eax, dword [esp + 0x20]
test eax, eax
je 0x10d65caf
lea eax, [ebp + 0xc]
jmp 0x10d65cbb
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d65900
push str.No_stages_left_for_opacity_bitmap
jmp 0x10d658fb
mov esi, dword [esp + 0x34]
push 0
lea edx, [esp + 0x4c]
push edx
push esi
push ebx
call fcn.10d5adc0
add esp, 0x10
test eax, eax
je 0x10d65c0a
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
add ecx, edx
cmp dword [esp + 0x14], ecx
jge 0x10d65bf2
mov ecx, dword [ebx + 8]
mov ecx, dword [ecx + 0x34]
mov ecx, dword [ecx + 0x94]
mov ecx, dword [ecx + 0x454]
mov edx, dword [eax]
push ecx
lea ecx, [esp + 0x34]
push ecx
mov ecx, eax
call dword [edx + 0xa4]
mov edx, dword [ebx + 0x2ca0c]
mov ecx, dword [esp + 0x10]
mov eax, dword [edx + ecx*4 + 0x56c]
mov eax, dword [eax + 0x24]
test eax, eax
mov edx, dword [esp + 0x30]
je 0x10d65b54
cmp eax, edx
je 0x10d65b54
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d65900
push str.Only_one_ConstantMaterial_may_be_used_per_material.
jmp 0x10d658fb
mov eax, dword [ebx + 0x2ca0c]
mov ecx, dword [eax + ecx*4 + 0x56c]
mov dword [ecx + 0x24], edx
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
imul eax, eax, 0x84
mov edx, dword [ebx + 0x2ca0c]
mov edx, dword [edx + ecx*4 + 0x56c]
mov dword [edx + eax + 0x6c], 3
mov ecx, dword [esp + 0x14]
mov eax, dword [ebx + 0x2ca0c]
imul ecx, ecx, 0x84
mov edx, dword [esp + 0x10]
mov edx, dword [eax + edx*4 + 0x56c]
mov eax, 2
mov dword [edx + ecx + 0x58], eax
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
imul edx, edx, 0x84
mov ecx, dword [ebx + 0x2ca0c]
mov ecx, dword [ecx + esi*4 + 0x56c]
mov dword [ecx + edx + 0x60], 1
mov ecx, dword [esp + 0x14]
mov edx, dword [ebx + 0x2ca0c]
imul ecx, ecx, 0x84
mov esi, dword [esp + 0x10]
mov edx, dword [edx + esi*4 + 0x56c]
mov dword [edx + ecx + 0x54], eax
jmp 0x10d659fd
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d65900
push str.No_stages_left_for_constant_opacity
jmp 0x10d658fb
push 0
lea edx, [esp + 0x4c]
push edx
push esi
push ebx
call fcn.10d6a460
add esp, 0x10
test eax, eax
je 0x10d65c72
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
add edx, ecx
mov ecx, dword [esp + 0x14]
cmp ecx, edx
jge 0x10d65c5a
mov edx, dword [esp + 0x10]
imul ecx, ecx, 0x84
push eax
mov eax, dword [ebx + 0x2ca0c]
mov eax, dword [eax + edx*4 + 0x56c]
lea ecx, [eax + ecx + 0x40]
push ecx
mov ecx, ebx
call fcn.10d63b20
jmp 0x10d659fd
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d660eb
push str.No_stages_left_for_vertex_opacity
jmp 0x10d660e6
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d65c86
push str.Cannot_handle_complex_opacity_which_is_not_the_same_as_diffuse_material
call fcn.10905740
mov eax, dword [ebp + 0x94]
test eax, eax
je 0x10d66307
mov dword [eax], esi
xor eax, eax
mov ecx, dword [esp + 0x1e4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x90
lea ecx, [esp + 0x15c]
call fcn.10d63cc0
mov edx, dword [esp + 0x34]
mov esi, eax
mov ecx, 0x21
lea edi, [esp + 0x48]
rep movsd dword es:[edi], dword [esi]
push 0
lea ecx, [esp + 0x4c]
push ecx
push edx
push ebx
call fcn.10d5b120
add esp, 0x10
test eax, eax
mov dword [esp + 0x20], eax
jne 0x10d65d22
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d65cf9
push str.Opacity_must_be_a_simple_bitmap_when_using_SelfIllumination
call fcn.10905740
mov eax, dword [ebp + 0x94]
test eax, eax
je 0x10d65d09
mov ecx, dword [esp + 0x34]
mov dword [eax], ecx
xor eax, eax
mov ecx, dword [esp + 0x1e4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x90
mov eax, dword [ebp + 8]
push 0
mov ecx, 0x21
lea esi, [ebp + 0xc]
lea edi, [esp + 0xd4]
lea edx, [esp + 0xd4]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [eax + 0x58]
push edx
push ecx
push ebx
call fcn.10d5b120
mov edx, dword [ebp + 0x94]
add esp, 0x10
push edx
mov dword [esp + 0x34], eax
mov eax, dword [ebp + 0x90]
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 + 0xb4]
push ecx
mov ecx, dword [ebp + 8]
lea edx, [esp + 0xa8]
push edx
mov edx, dword [ecx + 0x54]
lea eax, [esp + 0xa8]
push eax
push edx
mov ecx, ebx
call fcn.10d6ad50
test eax, eax
je 0x10d66307
mov ecx, dword [esp + 0x30]
test ecx, ecx
je 0x10d660d7
mov eax, dword [esp + 0x28]
lea edx, [eax - 1]
mov eax, dword [esp + 0x14]
cmp eax, edx
jge 0x10d6606b
mov esi, dword [esp + 0x10]
imul eax, eax, 0x84
mov edx, dword [ebx + 0x2ca0c]
mov edx, dword [edx + esi*4 + 0x56c]
push ecx
lea esi, [edx + eax + 0x40]
push esi
mov ecx, ebx
call fcn.10d63a10
mov eax, 2
mov dword [esi + 0x2c], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x14], 3
mov edi, 1
mov dword [esi + 0x30], edi
mov dword [esi + 0x24], edi
mov edx, dword [esp + 0x14]
mov ecx, dword [ebx + 0x2ca0c]
imul edx, edx, 0x84
lea eax, [esp + 0xd0]
push eax
mov eax, dword [esp + 0x14]
mov ecx, dword [ecx + eax*4 + 0x56c]
lea edx, [ecx + edx + 0x40]
push edx
mov ecx, ebx
call fcn.10d696e0
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov ecx, dword [ebx + 0x2ca0c]
inc eax
mov dword [esp + 0x14], eax
imul eax, eax, 0x84
mov ecx, dword [ecx + edx*4 + 0x56c]
mov edx, dword [esp + 0x20]
lea esi, [ecx + eax + 0x40]
push edx
push esi
mov ecx, ebx
call fcn.10d63a10
mov dword [esi + 0x2c], 2
mov dword [esi + 0x30], edi
mov dword [esi + 0x18], 4
mov dword [esi + 0x24], edi
mov dword [esi + 0x14], 3
mov edx, dword [esp + 0x14]
mov ecx, dword [ebx + 0x2ca0c]
imul edx, edx, 0x84
lea eax, [esp + 0x48]
push eax
mov eax, dword [esp + 0x14]
mov ecx, dword [ecx + eax*4 + 0x56c]
lea edx, [ecx + edx + 0x40]
push edx
mov ecx, ebx
call fcn.10d696e0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
inc eax
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x2ca0c]
mov edx, dword [eax + ecx*4 + 0x56c]
mov dword [edx + 0x28], 5
mov eax, dword [ebx + 0x2ca0c]
mov ecx, dword [esp + 0x10]
mov edx, dword [eax + ecx*4 + 0x56c]
mov dword [edx + 0x2c], 6
mov eax, dword [ebx + 0x2ca0c]
mov ecx, dword [esp + 0x10]
mov edx, dword [eax + ecx*4 + 0x56c]
mov dword [edx + 8], edi
mov esi, edi
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x4c]
test ecx, ecx
je 0x10d654c5
mov ecx, 0x21
lea esi, [ebp + 0xc]
lea edi, [esp + 0xd0]
rep movsd dword es:[edi], dword [esi]
push 0
lea ecx, [esp + 0xd4]
mov edx, eax
mov eax, dword [edx + 0x50]
push ecx
push eax
push ebx
call fcn.10d5b120
mov esi, dword [ebp + 8]
mov edx, dword [esi + 0x50]
xor edi, edi
push edi
lea ecx, [esp + 0xe4]
push ecx
push edx
push ebx
mov dword [esp + 0x40], eax
call fcn.10d5adc0
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x50], eax
mov eax, dword [ebx + 0x2ca0c]
mov edx, dword [eax + ecx*4 + 0x56c]
mov eax, dword [esp + 0x34]
mov dword [edx + 0x3c], eax
mov ecx, dword [esp + 0x30]
add esp, 0x20
inc ecx
mov dword [esp + 0x10], ecx
lea ecx, [ebx + 0x2ca10]
push ecx
lea ecx, [ebx + 0x2ce78]
mov dword [esp + 0x18], edi
call fcn.10d5c200
mov edx, dword [ebx + 0x2ca0c]
mov ecx, dword [esp + 0x10]
mov dword [edx + ecx*4 + 0x56c], eax
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [esp + 0x10]
mov ecx, dword [edx + eax*4 + 0x56c]
mov dword [ecx + 0x18], edi
mov edx, dword [esi + 0x68]
mov ecx, dword [esp + 0x10]
mov eax, dword [ebx + 0x2ca0c]
mov eax, dword [eax + ecx*4 + 0x56c]
mov ecx, dword [ebp + 0x94]
push ecx
and edx, 1
mov dword [eax + 0x1c], edx
mov edx, dword [ebp + 0x90]
push edx
push edi
sub esp, 0x84
mov edi, esp
mov ecx, 0x21
lea esi, [ebp + 0xc]
rep movsd dword es:[edi], dword [esi]
lea eax, [esp + 0xb4]
push eax
mov eax, dword [ebp + 8]
lea ecx, [esp + 0xa8]
push ecx
mov ecx, dword [eax + 0x4c]
lea edx, [esp + 0xa8]
push edx
push ecx
mov ecx, ebx
call fcn.10d6ad50
test eax, eax
je 0x10d66307
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x50]
test eax, eax
je 0x10d661ae
mov eax, dword [esp + 0x30]
test eax, eax
je 0x10d66113
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d66042
push str.TODO:_constant_SpecularityMask_with_multipass_specular
call fcn.10905740
mov eax, dword [ebp + 0x94]
test eax, eax
je 0x10d66307
mov dword [eax], esi
xor eax, eax
mov ecx, dword [esp + 0x1e4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x90
mov esi, dword [ebp + 0x90]
test esi, esi
je 0x10d660af
push eax
lea eax, [esp + 0x40]
push str.No_room_for_SelfIllimunationMask_in_multipass_SelfIllumination__StagesUsed_was__d_
push eax
call fcn.109bc8a0
add esp, 0xc
push eax
mov ecx, esi
mov dword [esp + 0x1f0], 2
call fcn.109057e0
lea ecx, [esp + 0x3c]
mov dword [esp + 0x1ec], 0xffffffff
call fcn.10902a90
mov eax, dword [ebp + 0x94]
test eax, eax
je 0x10d660be
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
xor eax, eax
mov ecx, dword [esp + 0x1e4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x90
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d660eb
push str.SelfIllimunationMask_must_be_a_simple_bitmap
call fcn.10905740
mov eax, dword [ebp + 0x94]
test eax, eax
je 0x10d660fa
mov edx, dword [ebp + 8]
mov dword [eax], edx
xor eax, eax
mov ecx, dword [esp + 0x1e4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x90
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x10d662e7
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x28]
jge 0x10d6627e
mov esi, dword [esp + 0x10]
imul eax, eax, 0x84
mov edx, dword [ebx + 0x2ca0c]
mov edx, dword [edx + esi*4 + 0x56c]
push ecx
lea esi, [edx + eax + 0x40]
push esi
mov ecx, ebx
call fcn.10d63a10
mov dword [esi + 0x2c], 2
mov dword [esi + 0x18], 2
mov dword [esi + 0x14], 3
mov edi, 1
mov dword [esi + 0x30], edi
mov dword [esi + 0x24], edi
mov edx, dword [esp + 0x14]
mov ecx, dword [ebx + 0x2ca0c]
imul edx, edx, 0x84
lea eax, [esp + 0xd0]
push eax
mov eax, dword [esp + 0x14]
mov ecx, dword [ecx + eax*4 + 0x56c]
lea edx, [ecx + edx + 0x40]
push edx
mov ecx, ebx
call fcn.10d696e0
mov eax, dword [esp + 0x14]
mov esi, dword [ebp + 8]
inc eax
mov dword [esp + 0x14], eax
jmp 0x10d661b3
mov edi, 1
mov eax, dword [esi + 0x50]
mov ecx, dword [ebx + 0x2ca0c]
mov edx, dword [esp + 0x10]
mov ecx, dword [ecx + edx*4 + 0x56c]
neg eax
sbb eax, eax
and eax, 3
add eax, 2
mov dword [ecx + 0x28], eax
test byte [esi + 0x68], 0x10
mov ecx, dword [esp + 0x10]
je 0x10d661e5
mov eax, 9
jmp 0x10d661f5
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + ecx*4 + 0x56c]
mov eax, dword [eax + 0x28]
mov edx, dword [ebx + 0x2ca0c]
mov ecx, dword [edx + ecx*4 + 0x56c]
mov dword [ecx + 0x28], eax
mov edx, dword [esi + 0x68]
mov ecx, dword [esp + 0x10]
mov eax, dword [ebx + 0x2ca0c]
mov eax, dword [eax + ecx*4 + 0x56c]
and edx, 0x10
or edx, 0x20
shr edx, 4
mov dword [eax + 0x2c], edx
mov ecx, dword [ebx + 0x2ca0c]
mov edx, dword [esp + 0x10]
mov eax, dword [ecx + edx*4 + 0x56c]
mov dword [eax + 8], edi
mov ecx, dword [ebx + 0x2ca0c]
mov edx, dword [esp + 0x10]
mov eax, dword [ecx + edx*4 + 0x56c]
mov dword [eax + 0x30], edi
mov ecx, dword [ebx + 0x2ca0c]
mov edx, dword [esp + 0x10]
mov eax, dword [ecx + edx*4 + 0x56c]
mov byte [esp + 0x18], 0
mov byte [esp + 0x19], 0
mov byte [esp + 0x1a], 0
mov byte [esp + 0x1b], 0
mov ecx, dword [esp + 0x18]
mov dword [eax + 0x34], ecx
jmp 0x10d654c0
mov edi, dword [ebp + 0x90]
test edi, edi
je 0x10d662c2
push eax
lea edx, [esp + 0x40]
push str.No_room_for_SpecularityMask_in_multipass_specular__StagesUsed_was__d_
push edx
call fcn.109bc8a0
add esp, 0xc
push eax
mov ecx, edi
mov dword [esp + 0x1f0], 3
call fcn.109057e0
lea ecx, [esp + 0x3c]
mov dword [esp + 0x1ec], 0xffffffff
call fcn.10902a90
mov eax, dword [ebp + 0x94]
test eax, eax
je 0x10d66307
mov dword [eax], esi
xor eax, eax
mov ecx, dword [esp + 0x1e4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x90
mov ecx, dword [ebp + 0x90]
test ecx, ecx
je 0x10d662fb
push str.SpecularityMask_must_be_a_simple_bitmap
call fcn.10905740
mov eax, dword [ebp + 0x94]
test eax, eax
je 0x10d66307
mov dword [eax], esi
xor eax, eax
mov ecx, dword [esp + 0x1e4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x90
mov ecx, dword [ebp + 8]
movzx eax, byte [ecx + 0x64]
cmp eax, 6
ja case.default.0x10d66330
jmp dword [eax*4 + 0x10d66738]
mov eax, dword [esp + 0x34]
mov edx, dword [ebx + 0x2ca0c]
cmp eax, edi
mov eax, dword [edx + 0x56c]
je 0x10d66388
mov dword [eax + 0x28], 5
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 0x2c], 6
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 8], esi
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 0xc], esi
jmp 0x10d66603
mov dword [eax + 0x28], 2
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 0x2c], esi
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 8], edi
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 0xc], edi
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 0x18], esi
jmp case.default.0x10d66330
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 0x28], 2
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 0x2c], esi
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 8], edi
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 0xc], esi
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov byte [eax + 0x10], 0x7f
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 0x18], esi
jmp case.default.0x10d66330
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 0x28], 9
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 0x2c], 3
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 8], esi
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 0x18], edi
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 0x30], esi
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov byte [esp + 0x18], 0x7f
mov byte [esp + 0x19], 0x7f
mov byte [esp + 0x1a], 0x7f
mov byte [esp + 0x1b], 0
mov edx, dword [esp + 0x18]
mov dword [eax + 0x34], edx
jmp case.default.0x10d66330
mov eax, dword [ebx + 0x2ca0c]
mov edx, dword [eax + 0x56c]
mov eax, 2
mov dword [edx + 0x28], eax
mov edx, dword [ebx + 0x2ca0c]
mov edx, dword [edx + 0x56c]
mov dword [edx + 0x2c], eax
jmp 0x10d6657c
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 0x28], 2
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 0x2c], 4
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 8], esi
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 0x18], edi
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 0x30], esi
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov byte [esp + 0x18], 0
mov byte [esp + 0x19], 0
mov byte [esp + 0x1a], 0
mov byte [esp + 0x1b], 0
mov edx, dword [esp + 0x18]
mov dword [eax + 0x34], edx
jmp case.default.0x10d66330
mov eax, dword [ebx + 0x2ca0c]
mov edx, dword [eax + 0x56c]
mov dword [edx + 0x28], esi
mov eax, dword [ebx + 0x2ca0c]
mov edx, dword [eax + 0x56c]
mov dword [edx + 0x2c], 4
mov eax, dword [ebx + 0x2ca0c]
mov edx, dword [eax + 0x56c]
mov dword [edx + 8], esi
mov eax, dword [ebx + 0x2ca0c]
mov edx, dword [eax + 0x56c]
mov dword [edx + 0x18], edi
mov eax, dword [ebx + 0x2ca0c]
mov edx, dword [eax + 0x56c]
mov dword [edx + 0x30], esi
mov eax, dword [ebx + 0x2ca0c]
mov edx, dword [eax + 0x56c]
mov byte [esp + 0x18], 0
mov byte [esp + 0x19], 0
mov byte [esp + 0x1a], 0
mov byte [esp + 0x1b], 0
mov eax, dword [esp + 0x18]
mov dword [edx + 0x34], eax
jmp case.default.0x10d66330
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 0x28], esi
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 0x2c], 2
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 8], esi
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 0x18], edi
mov ecx, dword [ecx + 0x68]
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
and ecx, esi
mov dword [eax + 0x1c], ecx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x68]
mov eax, dword [ebx + 0x2ca0c]
mov ecx, dword [eax + 0x56c]
mov eax, dword [ebp + 0x14]
shr edx, 1
shl edx, 1
not edx
and edx, 2
cmp eax, edi
mov dword [ecx + 0x20], edx
je 0x10d666f4
cmp dword [ebp + 0x80], edi
je 0x10d66690
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
cmp dword [eax + 0x28], 2
jne 0x10d66690
cmp dword [eax + 0x2c], esi
jne 0x10d66690
mov eax, edx
mov ecx, dword [eax + 0x56c]
mov dword [ecx + 0x28], 5
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov dword [eax + 0x2c], 6
mov edx, dword [esp + 0x14]
mov ecx, dword [ebx + 0x2ca0c]
imul edx, edx, 0x84
mov eax, dword [ecx + 0x56c]
lea ecx, [eax + edx + 0x40]
push ecx
mov ecx, ebx
call fcn.10d63940
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov ecx, dword [ebp + 0x7c]
mov dword [eax + 0x24], ecx
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
mov edi, dword [eax + 8]
mov ecx, dword [ebp + 0x80]
or edi, ecx
mov ecx, dword [ebp + 0x74]
mov dword [eax + 8], edi
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [edx + 0x56c]
or dword [eax + 0x1c], ecx
inc dword [esp + 0x14]
mov edx, dword [ebx + 0x2ca0c]
mov eax, dword [esp + 0x10]
mov ecx, dword [edx + eax*4 + 0x56c]
mov edx, dword [esp + 0x14]
mov dword [ecx + 0x3c], edx
mov eax, dword [esp + 0x10]
mov ecx, dword [ebx + 0x2ca0c]
inc eax
mov dword [ecx + 0x58c], eax
mov ecx, dword [esp + 0x1e4]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x90