Function at 0x476d00
Capabilities:
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x110
mov cl, byte [eax]
push ebx
push ebp
push esi
test cl, 0x20
push edi
jne 0x478127
mov ax, word [eax + 6]
test ax, ax
je 0x478127
mov ecx, dword [esp + 0x128]
test ecx, ecx
je 0x478127
mov ecx, dword [ecx + 0xc]
test cl, 0x10
mov dword [esp + 0x10], ecx
jne 0x478127
test ch, 1
jne 0x478127
mov ecx, dword [esp + 0x124]
mov ebx, dword [0x660fb0]
xor esi, esi
and eax, 0xffff
mov si, word [ecx + 2]
mov ecx, dword [esp + 0x128]
mov edi, dword [0x660fb4]
mov dword [esp + 0x5c], eax
mov eax, dword [ecx + 0x18]
mov edx, dword [ecx + 0x10]
add ebx, eax
mov ebp, dword [0x660fd8]
mov dword [esp + 0x58], edx
mov dword [0x660fb0], ebx
mov edx, dword [ecx + 0x10]
push ecx
add edi, edx
mov edx, dword [0x660fd0]
mov dword [0x660fb4], edi
mov eax, dword [ecx + 0x14]
add edx, eax
inc ebp
fld dword [0x56e734]
mov dword [0x660fd0], edx
mov dword [0x660fd8], ebp
mov eax, dword [ecx + 4]
mov edx, dword [ecx]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x130]
mov dword [esp + 0x34], esi
mov dword [esp + 0x4c], edx
fmul dword [eax + 0x3c]
fld dword [0x56e724]
fmul dword [eax + 0x38]
lea edi, [esp + 0xe4]
faddp st(1)
fld dword [0x56e704]
fmul dword [eax + 0x30]
faddp st(1)
fld dword [0x56e714]
fmul dword [eax + 0x34]
faddp st(1)
fstp dword [esp]
fld dword [0x56e730]
fmul dword [eax + 0x3c]
fld dword [0x56e720]
fmul dword [eax + 0x38]
push ecx
faddp st(1)
fld dword [0x56e700]
fmul dword [eax + 0x30]
faddp st(1)
fld dword [0x56e710]
fmul dword [eax + 0x34]
faddp st(1)
fstp dword [esp]
fld dword [0x56e72c]
fmul dword [eax + 0x3c]
fld dword [0x56e71c]
fmul dword [eax + 0x38]
push ecx
faddp st(1)
fld dword [0x56e6fc]
fmul dword [eax + 0x30]
faddp st(1)
fld dword [0x56e70c]
fmul dword [eax + 0x34]
faddp st(1)
fstp dword [esp]
fld dword [0x56e728]
fmul dword [eax + 0x3c]
fld dword [0x56e718]
fmul dword [eax + 0x38]
push ecx
faddp st(1)
fld dword [0x56e6f8]
fmul dword [eax + 0x30]
faddp st(1)
fld dword [0x56e708]
fmul dword [eax + 0x34]
faddp st(1)
fstp dword [esp]
fld dword [0x56e734]
fmul dword [eax + 0x2c]
fld dword [0x56e724]
fmul dword [eax + 0x28]
push ecx
faddp st(1)
fld dword [0x56e704]
fmul dword [eax + 0x20]
faddp st(1)
fld dword [0x56e714]
fmul dword [eax + 0x24]
faddp st(1)
fstp dword [esp]
fld dword [0x56e730]
fmul dword [eax + 0x2c]
fld dword [0x56e720]
fmul dword [eax + 0x28]
push ecx
faddp st(1)
fld dword [0x56e700]
fmul dword [eax + 0x20]
faddp st(1)
fld dword [0x56e710]
fmul dword [eax + 0x24]
faddp st(1)
fstp dword [esp]
fld dword [0x56e72c]
fmul dword [eax + 0x2c]
fld dword [0x56e71c]
fmul dword [eax + 0x28]
push ecx
faddp st(1)
fld dword [0x56e6fc]
fmul dword [eax + 0x20]
faddp st(1)
fld dword [0x56e70c]
fmul dword [eax + 0x24]
faddp st(1)
fstp dword [esp]
fld dword [0x56e728]
fmul dword [eax + 0x2c]
fld dword [0x56e718]
fmul dword [eax + 0x28]
push ecx
faddp st(1)
fld dword [0x56e6f8]
fmul dword [eax + 0x20]
faddp st(1)
fld dword [0x56e708]
fmul dword [eax + 0x24]
faddp st(1)
fstp dword [esp]
fld dword [0x56e734]
fmul dword [eax + 0x1c]
fld dword [0x56e724]
fmul dword [eax + 0x18]
push ecx
faddp st(1)
fld dword [0x56e704]
fmul dword [eax + 0x10]
faddp st(1)
fld dword [0x56e714]
fmul dword [eax + 0x14]
faddp st(1)
fstp dword [esp]
fld dword [0x56e730]
fmul dword [eax + 0x1c]
fld dword [0x56e720]
fmul dword [eax + 0x18]
push ecx
faddp st(1)
fld dword [0x56e700]
fmul dword [eax + 0x10]
faddp st(1)
fld dword [0x56e710]
fmul dword [eax + 0x14]
faddp st(1)
fstp dword [esp]
fld dword [0x56e72c]
fmul dword [eax + 0x1c]
fld dword [0x56e71c]
fmul dword [eax + 0x18]
push ecx
faddp st(1)
fld dword [0x56e6fc]
fmul dword [eax + 0x10]
faddp st(1)
fld dword [0x56e70c]
fmul dword [eax + 0x14]
faddp st(1)
fstp dword [esp]
fld dword [0x56e728]
fmul dword [eax + 0x1c]
fld dword [0x56e718]
fmul dword [eax + 0x18]
push ecx
faddp st(1)
fld dword [0x56e6f8]
fmul dword [eax + 0x10]
faddp st(1)
fld dword [0x56e708]
fmul dword [eax + 0x14]
faddp st(1)
fstp dword [esp]
fld dword [0x56e734]
fmul dword [eax + 0xc]
fld dword [0x56e724]
fmul dword [eax + 8]
push ecx
faddp st(1)
fld dword [0x56e704]
fmul dword [eax]
faddp st(1)
fld dword [0x56e714]
fmul dword [eax + 4]
faddp st(1)
fstp dword [esp]
fld dword [0x56e730]
fmul dword [eax + 0xc]
fld dword [0x56e720]
fmul dword [eax + 8]
push ecx
faddp st(1)
fld dword [0x56e700]
fmul dword [eax]
faddp st(1)
fld dword [0x56e710]
fmul dword [eax + 4]
faddp st(1)
fstp dword [esp]
fld dword [0x56e72c]
fmul dword [eax + 0xc]
fld dword [0x56e71c]
fmul dword [eax + 8]
push ecx
faddp st(1)
fld dword [0x56e6fc]
fmul dword [eax]
faddp st(1)
fld dword [0x56e70c]
fmul dword [eax + 4]
faddp st(1)
fstp dword [esp]
fld dword [0x56e728]
fmul dword [eax + 0xc]
fld dword [0x56e718]
fmul dword [eax + 8]
push ecx
lea ecx, [esp + 0xd4]
faddp st(1)
fld dword [0x56e6f8]
fmul dword [eax]
faddp st(1)
fld dword [0x56e708]
fmul dword [eax + 4]
faddp st(1)
fstp dword [esp]
call fcn.00476710
mov ebp, eax
mov ebx, 4
push ebp
mov ecx, edi
call fcn.00402600
add edi, 0x10
add ebp, 0x10
dec ebx
jne 0x4770c0
lea eax, [esp + 0x94]
lea ecx, [esp + 0xe8]
mov edx, 4
mov edi, dword [ecx - 8]
add ecx, 0x10
mov dword [eax], edi
mov edi, dword [ecx - 0x14]
mov dword [eax + 4], edi
mov edi, dword [ecx - 0x10]
mov dword [eax + 8], edi
mov edi, dword [ecx - 0xc]
mov dword [eax + 0xc], edi
add eax, 0x10
dec edx
jne 0x4770e4
mov eax, 4
lea edx, [esp + 0x94]
mov edi, 0x56e668
sub edx, eax
mov ecx, 0x56e674
sub edi, eax
mov ebx, dword [edx + eax]
add ecx, 0x10
mov dword [edi + eax], ebx
mov ebx, dword [esp + eax + 0x94]
mov dword [eax + 0x56e668], ebx
mov ebx, dword [esp + eax + 0x98]
mov dword [ecx - 0x14], ebx
mov ebx, dword [esp + eax + 0x9c]
mov dword [ecx - 0x10], ebx
add eax, 0x10
cmp eax, 0x44
jl 0x47711e
mov ecx, dword [0x6b78f8]
mov eax, 0x3f800000
test ecx, ecx
mov byte [esp + 0x3f], 0
mov dword [esp + 0x24], eax
jne 0x4771bb
mov cl, byte [0x660fe2]
mov dword [esp + 0x24], 0x40800000
test cl, cl
jne 0x47717e
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x10]
test ah, 8
je 0x477195
fld dword [esp + 0x24]
fmul dword [0x53bd8c]
fstp dword [esp + 0x24]
mov eax, dword [0x660f74]
test eax, eax
je 0x4771a8
mov ecx, dword [0x54ffe0]
mov dword [esp + 0x24], ecx
mov eax, dword [0x60cf90]
test eax, eax
je 0x4771bb
mov edx, dword [0x550074]
mov dword [esp + 0x24], edx
mov eax, dword [esp + 0x58]
lea edx, [esi - 1]
shl eax, 5
add eax, 0x62e510
mov dword [esp + 0x28], edx
test edx, edx
mov dword [0x55002c], eax
jl 0x4774cd
mov ecx, dword [esp + 0x48]
lea edi, [eax + 8]
lea ebx, [edx + 1]
mov ebp, 0x3f800000
lea esi, [ecx + 0xc]
mov eax, dword [esi]
test al, 2
mov dword [esp + 0x10], eax
je 0x477231
mov ecx, dword [0x62861c]
xor edx, edx
mov dl, byte [esp + 0x12]
mov eax, 0x3e7
sub eax, edx
shl eax, 4
mov edx, dword [eax + ecx]
mov dword [edi - 4], edx
mov ecx, dword [0x62861c]
mov edx, dword [eax + ecx + 4]
mov dword [edi], edx
mov ecx, dword [0x62861c]
mov edx, dword [eax + ecx + 8]
mov dword [edi + 4], edx
jmp 0x4774bc
mov cl, byte [esp + 0x3f]
test cl, cl
je 0x47724e
shr eax, 4
and al, 1
push str.AF_Verts_followed_by_non_AF_verts
push eax
call fcn.004015b0
add esp, 8
jmp 0x47725b
test al, 0x10
je 0x4773be
mov byte [esp + 0x3f], 1
mov eax, dword [esi - 0xc]
mov ecx, dword [0x55002c]
mov edx, dword [0x55002c]
shl eax, 5
add eax, ecx
mov ecx, dword [esi - 8]
shl ecx, 5
add ecx, edx
mov edx, dword [esi - 4]
mov dword [esp + 0x2c], edx
mov edx, dword [eax + 4]
fld dword [ecx + 4]
mov dword [esp + 0x44], edx
mov edx, dword [eax + 8]
fsub dword [esp + 0x44]
mov dword [esp + 0x40], edx
mov eax, dword [eax + 0xc]
mov dword [esp + 0x34], eax
fstp dword [esp + 0x14]
fld dword [esp + 0x40]
fsub dword [ecx + 8]
fstp dword [esp + 0x20]
fld dword [esp + 0x20]
fmul dword [esp + 0x20]
fld dword [esp + 0x14]
fmul dword [esp + 0x14]
faddp st(1)
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
fcomp dword [0x53b280]
fnstsw ax
test ah, 0x40
jne 0x47730c
fld dword [esp + 0x18]
sub esp, 8
fstp qword [esp]
call fcn.00529a44
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
fdivr dword [0x53b27c]
add esp, 8
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
fmul dword [esp + 0x14]
fstp dword [esp + 0x14]
fld dword [esp + 0x18]
fmul dword [esp + 0x20]
fstp dword [esp + 0x20]
fld dword [esp + 0x20]
fmul dword [esp + 0x2c]
fstp dword [esp + 0x20]
fld dword [esp + 0x14]
fmul dword [esp + 0x2c]
fstp dword [esp + 0x14]
fld dword [esp + 0x34]
fmul dword [0x53bd88]
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
fmul dword [esp + 0x20]
fmul dword [0x53bd84]
fstp dword [esp + 0x20]
fld dword [esp + 0x18]
fmul dword [esp + 0x14]
fstp dword [esp + 0x14]
fld dword [esp + 0x20]
fadd dword [esp + 0x44]
fstp dword [esp + 0x20]
fld dword [esp + 0x14]
fadd dword [esp + 0x40]
mov ecx, dword [esp + 0x20]
mov dword [edi - 4], ecx
fstp dword [esp + 0x14]
fld dword [esp + 0x34]
fmul dword [esp + 0x24]
mov edx, dword [esp + 0x14]
mov dword [edi], edx
fstp dword [edi + 4]
fld dword [esp + 0x34]
fcomp dword [0x53b280]
fnstsw ax
test ah, 0x40
jne 0x4773a9
mov eax, 1
push str.invw_is_zero
push eax
call fcn.004015b0
add esp, 8
jmp 0x4774bc
xor eax, eax
push str.invw_is_zero
push eax
call fcn.004015b0
add esp, 8
jmp 0x4774bc
mov eax, dword [esi - 0xc]
mov ecx, dword [esi - 8]
mov edx, dword [esi - 4]
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], ecx
lea eax, [esp + 0x70]
lea ecx, [esp + 0x84]
push eax
push ecx
mov dword [esp + 0x80], edx
mov dword [esp + 0x84], ebp
call fcn.00402700
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov dword [esp + 0x68], edx
mov edx, dword [eax + 0xc]
mov dword [esp + 0x74], edx
mov dword [esp + 0x6c], ecx
fld dword [esp + 0x74]
fstp qword [esp]
call fcn.005294c4
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
fcomp dword [0x53b368]
add esp, 8
fnstsw ax
test ah, 0x41
je 0x477431
mov dword [esp + 0x1c], 0xd368d4a5
jmp 0x47743f
fld dword [0x53b27c]
fdiv dword [esp + 0x6c]
fstp dword [esp + 0x1c]
fld dword [esp + 0x64]
mov eax, dword [esp + 0x1c]
fmul dword [esp + 0x1c]
push eax
push ecx
fstp dword [esp]
fld dword [esp + 0x68]
fmul dword [esp + 0x24]
push ecx
lea ecx, [esp + 0xe0]
fstp dword [esp]
call fcn.00402560
push eax
lea ecx, [esp + 0x50]
call fcn.00402540
fld dword [esp + 0x54]
fmul dword [esp + 0x24]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x50]
mov dword [edi - 4], ecx
mov dword [edi], edx
fstp dword [edi + 4]
test byte [esi], 1
je 0x4774bc
mov eax, ecx
mov ecx, dword [0x64f5cc]
mov dword [ecx], eax
mov eax, dword [0x64f5cc]
mov edx, dword [edi]
mov dword [eax + 4], edx
mov edx, dword [0x64f5cc]
mov ecx, dword [edi + 4]
mov dword [edx + 8], ecx
mov eax, dword [0x64f5cc]
sub eax, 0x10
mov dword [0x64f5cc], eax
add edi, 0x20
add esi, 0x10
dec ebx
jne 0x4771ed
mov edx, dword [esp + 0x28]
mov al, byte [0x660fe1]
xor ebp, ebp
test al, al
mov dword [esp + 0x20], ebp
jne 0x47751e
cmp dword [0x54d384], ebp
je 0x477526
cmp dword [0x6b78f8], ebp
jne 0x477526
cmp edx, ebp
jl 0x477526
mov eax, dword [0x55002c]
lea ecx, [eax + 0xc]
fld dword [ecx]
fcomp dword [0x55007c]
fnstsw ax
test ah, 1
je 0x477516
fld dword [ecx]
fcomp dword [0x53b280]
fnstsw ax
test ah, 0x41
je 0x47751e
add ecx, 0x20
dec edx
jns 0x4774f8
jmp 0x477526
mov dword [esp + 0x20], 1
cmp dword [0x660f9c], ebp
je 0x4777b2
mov eax, dword [esp + 0x124]
xor ecx, ecx
xor edx, edx
mov cx, word [eax + 6]
mov dx, word [eax + 2]
add ecx, edx
xor edx, edx
mov dx, word [eax + 4]
cmp ecx, edx
jle 0x47755c
mov dword [0x660f9c], ebp
jmp 0x4777b2
mov eax, dword [esp + 0x128]
mov ebx, dword [0x64e510]
mov esi, dword [eax + 8]
mov eax, dword [0x660f94]
cmp eax, ebp
je 0x477671
mov ecx, dword [0x660f48]
mov dword [esp + 0x50], ebp
mov dword [esp + 0x4c], ecx
mov edx, dword [0x660f5c]
fild qword [esp + 0x4c]
mov dword [esp + 0x4c], edx
mov dword [esp + 0x50], ebp
mov eax, dword [0x6191d4]
cmp ebx, ebp
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fdiv dword [0x53b704]
fstp dword [esp + 0x40]
fild qword [esp + 0x4c]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], ebp
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fdiv dword [0x53b704]
fstp dword [esp + 0x44]
fild qword [esp + 0x4c]
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fdiv dword [0x53b704]
fstp dword [esp + 0x18]
fld dword [esp + 0x40]
fmul dword [0x660f58]
fstp dword [esp + 0x34]
fld dword [esp + 0x44]
fmul dword [0x660f54]
mov eax, dword [esp + 0x34]
mov dword [0x660f58], eax
fstp dword [esp + 0x2c]
fld dword [esp + 0x18]
fmul dword [0x660f50]
mov edx, dword [esp + 0x2c]
mov dword [0x660f54], edx
fstp dword [esp + 0x10]
mov ecx, dword [esp + 0x10]
mov dword [0x660f50], ecx
jle 0x477671
mov eax, 0x64f5b0
mov ecx, ebx
fld dword [esp + 0x40]
fmul dword [eax]
add eax, 0xc
dec ecx
fstp dword [esp + 0x34]
fld dword [esp + 0x44]
fmul dword [eax - 0x10]
fstp dword [esp + 0x2c]
fld dword [esp + 0x18]
fmul dword [eax - 0x14]
fstp dword [esp + 0x10]
mov edx, dword [esp + 0x10]
mov dword [eax - 0x14], edx
mov edx, dword [esp + 0x2c]
mov dword [eax - 0x10], edx
mov edx, dword [esp + 0x34]
mov dword [eax - 0xc], edx
jne 0x477636
cmp dword [esp + 0x28], ebp
jl 0x4777b0
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x48]
inc edx
mov ecx, 0x65dfb8
lea ebp, [eax + 0xc]
mov dword [esp + 0x48], edx
mov eax, dword [ebp]
test al, 2
je 0x4776be
shr eax, 0x10
lea eax, [eax + eax*2]
mov edx, dword [eax*4 + 0x64f5d8]
lea eax, [eax*4 + 0x64f5d8]
mov dword [ecx - 8], edx
mov edx, dword [eax + 4]
mov dword [ecx - 4], edx
mov eax, dword [eax + 8]
mov dword [ecx], eax
jmp 0x477798
mov eax, dword [0x660f54]
mov edx, dword [0x660f50]
mov dword [ecx - 4], eax
mov dword [ecx - 8], edx
mov edx, dword [0x660f58]
lea eax, [ebx - 1]
test eax, eax
mov dword [ecx], edx
jl 0x47776a
lea edx, [eax + eax*2]
lea edi, [eax + 1]
shl edx, 2
fld dword [edx + 0x628668]
fmul dword [esi]
fld dword [edx + 0x628670]
fmul dword [esi + 8]
faddp st(1)
fld dword [edx + 0x62866c]
fmul dword [esi + 4]
faddp st(1)
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fcomp dword [0x53b280]
fnstsw ax
test ah, 1
jne 0x477764
fld dword [esp + 0x1c]
fmul dword [edx + 0x64f5b0]
fstp dword [esp + 0x44]
fld dword [esp + 0x1c]
fmul dword [edx + 0x64f5ac]
fstp dword [esp + 0x40]
fld dword [esp + 0x1c]
fmul dword [edx + 0x64f5a8]
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fadd dword [ecx - 8]
fstp dword [ecx - 8]
fld dword [esp + 0x40]
fadd dword [ecx - 4]
fstp dword [ecx - 4]
fld dword [esp + 0x44]
fadd dword [ecx]
fstp dword [ecx]
sub edx, 0xc
dec edi
jne 0x4776eb
test byte [ebp], 1
je 0x477798
mov eax, dword [0x65dfa8]
mov edx, dword [ecx - 8]
mov dword [eax], edx
mov edx, dword [ecx - 4]
mov dword [eax + 4], edx
mov edx, dword [ecx]
mov dword [eax + 8], edx
mov eax, dword [0x65dfa8]
mov ebx, dword [0x64e510]
add eax, 0xc
mov dword [0x65dfa8], eax
mov eax, dword [esp + 0x48]
add ebp, 0x10
add esi, 0xc
add ecx, 0xc
dec eax
mov dword [esp + 0x48], eax
jne 0x477690
xor ebp, ebp
mov eax, dword [esp + 0x128]
mov ecx, dword [0x6b78f8]
mov dword [esp + 0x40], 0x6191dc
mov dword [esp + 0x44], 0x65f72c
mov dx, word [eax + ecx*4 + 0x1c]
mov eax, dword [esp + 0x5c]
cmp eax, ebp
mov dword [esp + 0x24], 0x652f54
mov word [esp + 0x80], dx
mov dword [esp + 0x34], ebp
mov edi, 0xff000000
jle 0x477c8d
mov ecx, dword [esp + 0x38]
mov esi, 0x62c512
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], eax
lea ebp, [ecx + 0xc]
mov ecx, dword [0x660f90]
mov dword [esp + 0x1c], ebp
mov ebx, ecx
xor edx, edx
mov dx, word [ebp - 0xc]
mov eax, ecx
shr ebx, 0x10
and ebx, edx
and eax, 0xffff
or ebx, eax
mov dword [esp + 0x14], edi
test bl, 0xc0
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x2c], 0
je 0x477c77
test byte [ebp + 0x28], 2
jne 0x477c77
test bl, 0x40
je 0x477878
mov eax, ebx
mov edx, 0
and eax, 0x80
setne dl
inc edx
neg eax
sbb eax, eax
mov dword [esp + 0x2c], edx
and eax, 0x81000000
add eax, edi
mov dword [esp + 0x14], eax
test cl, 0x40
je 0x477889
mov dword [esp + 0x2c], 2
mov dword [esp + 0x14], edi
mov edx, esi
lea eax, [esp + 0x4c]
sub edx, eax
xor ecx, ecx
add edx, 0xfffffffe
lea edi, [esp + 0x4c]
mov dword [esp + 0x28], ebp
mov dword [esp + 0x38], edx
mov eax, dword [esp + 0x28]
mov ax, word [eax]
test ax, ax
mov word [edi], ax
jge 0x4778bc
and eax, 0x7fff
mov word [edx + edi], ax
jmp 0x47791f
mov word [edx + edi], ax
movsx eax, word [edi]
cmp eax, dword [esp + 0x30]
jl 0x47791f
xor edx, edx
mov dl, byte [ecx + ebp - 8]
mov esi, edx
mov edx, dword [0x55002c]
shl esi, 5
shl eax, 5
mov esi, dword [esi + edx + 4]
mov dword [eax + edx + 4], esi
xor edx, edx
mov dl, byte [ecx + ebp - 8]
mov esi, edx
mov edx, dword [0x55002c]
shl esi, 5
mov esi, dword [esi + edx + 8]
mov dword [eax + edx + 8], esi
xor edx, edx
mov dl, byte [ecx + ebp - 8]
mov esi, edx
mov edx, dword [0x55002c]
shl esi, 5
mov esi, dword [esi + edx + 0xc]
mov dword [eax + edx + 0xc], esi
mov edx, dword [esp + 0x38]
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
inc ecx
add eax, 2
add edi, 2
cmp ecx, 4
mov dword [esp + 0x28], eax
jl 0x4778a2
mov ax, word [esi + 4]
mov cx, word [esi]
mov dx, word [esi + 2]
mov word [esi + 8], ax
mov word [esi + 6], cx
mov word [esi + 4], dx
add esi, 0xc
test bl, 1
mov dword [esp + 0x18], esi
jne 0x477968
mov ecx, dword [esp + 0x24]
mov eax, 1
jmp 0x4779fd
mov eax, dword [0x660fe4]
test eax, eax
je 0x477977
mov dword [esp + 0x28], eax
jmp 0x477991
test byte [ebp + 0x28], 1
je 0x477988
mov ax, word [ebp + 0x2a]
mov word [esp + 0x28], ax
jmp 0x477991
mov cx, word [ebp - 0xa]
mov word [esp + 0x28], cx
shr ebx, 1
and bl, 1
push str.Non_ARB_Texture
push ebx
call fcn.004015b0
add esp, 8
lea eax, [esp + 0x4c]
lea ecx, [ebp + 0x18]
mov dword [esp + 0x48], 4
and word [eax], 0x7fff
mov dx, word [eax]
mov ebx, dword [0x55002c]
mov edi, dword [ecx - 0x10]
movsx esi, dx
shl esi, 5
movsx edx, dx
mov dword [esi + ebx + 0x10], edi
mov edi, dword [0x55002c]
mov esi, dword [ecx]
add ecx, 4
shl edx, 5
add eax, 2
mov dword [edx + edi + 0x14], esi
mov edx, dword [esp + 0x48]
dec edx
mov dword [esp + 0x48], edx
jne 0x4779b3
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov ebx, dword [esp + 0x5c]
mov edx, dword [esp + 0x40]
mov esi, dword [esp + 0x44]
mov word [edx], ax
mov al, byte [esp + 0x2c]
add edx, 2
mov byte [esi], al
mov eax, dword [0x6b78f8]
inc esi
mov dword [esp + 0x44], esi
xor esi, esi
cmp eax, esi
mov dword [esp + 0x40], edx
je 0x477a64
mov eax, ebx
and eax, 0x6000
cmp eax, 0x2000
je 0x477a58
cmp eax, 0x4000
je 0x477a4d
cmp eax, 0x6000
jne 0x477a64
mov dx, word [0x615018]
mov word [ecx], dx
jmp 0x477a67
mov ax, word [0x614f98]
mov word [ecx], ax
jmp 0x477a67
mov dx, word [0x614f88]
mov word [ecx], dx
jmp 0x477a67
mov word [ecx], si
mov eax, dword [0x660f9c]
add ecx, 2
cmp eax, esi
mov dword [esp + 0x24], ecx
je 0x477b82
lea eax, [esp + 0x4c]
mov dword [esp + 0x2c], esi
mov dword [esp + 0x28], eax
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
xor eax, eax
mov di, word [ecx]
mov ecx, dword [esp + 0x1c]
and edi, 0x7fff
mov al, byte [ecx + edx - 8]
lea edx, [eax + eax*2]
fld dword [edx*4 + 0x65dfb0]
fmul dword [0x53b704]
lea ebp, [edx*4 + 0x65dfb0]
call fcn.00529c7c
fld dword [ebp + 4]
fmul dword [0x53b704]
mov esi, eax
call fcn.00529c7c
fld dword [ebp + 8]
fmul dword [0x53b704]
mov ebx, eax
call fcn.00529c7c
mov ecx, eax
or ecx, esi
or ecx, ebx
test ecx, 0xffffff00
je 0x477b36
test ecx, ecx
jge 0x477b02
test esi, esi
jge 0x477af6
xor esi, esi
test ebx, ebx
jge 0x477afc
xor ebx, ebx
test eax, eax
jge 0x477b02
xor eax, eax
mov ecx, eax
or ecx, esi
or ecx, ebx
test ecx, 0x7fffff00
je 0x477b36
cmp esi, 0xff
jle 0x477b1d
mov esi, 0xff
cmp ebx, 0xff
jle 0x477b2a
mov ebx, 0xff
cmp eax, 0xff
jle 0x477b36
mov eax, 0xff
mov edx, dword [0x55002c]
shl esi, 8
or esi, ebx
mov ebx, dword [esp + 0x14]
shl esi, 8
or esi, eax
shl edi, 5
or esi, ebx
mov dword [edi + edx + 0x18], esi
mov eax, dword [0x55002c]
mov edx, dword [esp + 0x28]
mov dword [edi + eax + 0x1c], 0
mov eax, dword [esp + 0x2c]
inc eax
add edx, 2
cmp eax, 4
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], edx
jl 0x477a87
jmp 0x477c5b
test bh, 8
je 0x477bf7
mov ebp, dword [esp + 0x1c]
lea ecx, [esp + 0x4c]
mov eax, dword [0x64f5d0]
xor edx, edx
mov dl, byte [esi + ebp - 4]
and word [ecx], 0x7fff
mov di, word [ecx]
add ecx, 2
mov eax, dword [eax + edx*4]
mov edx, dword [esp + 0x14]
or eax, edx
xor edx, edx
mov ebx, eax
mov dword [esp + 0x38], eax
mov dl, byte [esp + 0x3a]
and ebx, 0xff
shl ebx, 0x10
or edx, ebx
mov ebx, dword [0x55002c]
and eax, 0xff00ff00
or edx, eax
movsx eax, di
shl eax, 5
mov dword [eax + ebx + 0x18], edx
mov eax, dword [0x55002c]
movsx edx, di
shl edx, 5
inc esi
cmp esi, 4
mov dword [edx + eax + 0x1c], 0
jl 0x477b8f
jmp 0x477c5b
mov eax, dword [ebp - 4]
mov ecx, dword [esp + 0x14]
or eax, ecx
xor ecx, ecx
mov edx, eax
mov dword [esp + 0x38], eax
mov cl, byte [esp + 0x3a]
and edx, 0xff
shl edx, 0x10
or ecx, edx
and eax, 0xff00ff00
or ecx, eax
lea eax, [esp + 0x4c]
mov esi, ecx
mov edx, 4
and word [eax], 0x7fff
mov cx, word [eax]
mov ebx, dword [0x55002c]
add eax, 2
movsx edi, cx
shl edi, 5
movsx ecx, cx
mov dword [edi + ebx + 0x18], esi
mov edi, dword [0x55002c]
shl ecx, 5
dec edx
mov dword [ecx + edi + 0x1c], 0
jne 0x477c29
mov eax, dword [esp + 0x34]
mov ecx, dword [0x660f90]
mov ebp, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
inc eax
mov edi, 0xff000000
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x10]
add ebp, 0x38
dec eax
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x10], eax
jne 0x477817
mov eax, dword [0x65ceb0]
test eax, eax
je 0x477eab
xor ebx, ebx
push ebx
push 1
call fcn.00506440
lea edx, [esp + 0x78]
lea eax, [esp + 0x8c]
push edx
push eax
mov dword [esp + 0x80], ebx
mov dword [esp + 0x84], ebx
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], 0x3f800000
call fcn.00402700
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov eax, dword [eax + 0xc]
add esp, 8
mov dword [esp + 0x74], eax
mov dword [esp + 0x68], ecx
fld dword [esp + 0x74]
mov dword [esp + 0x6c], edx
fstp qword [esp]
call fcn.005294c4
fstp dword [esp + 0x38]
fld dword [esp + 0x38]
fcomp dword [0x53b368]
add esp, 8
fnstsw ax
test ah, 0x41
je 0x477d1b
mov dword [esp + 0x14], 0xd368d4a5
jmp 0x477d29
fld dword [0x53b27c]
fdiv dword [esp + 0x6c]
fstp dword [esp + 0x14]
fld dword [esp + 0x64]
fmul dword [esp + 0x14]
cmp dword [0x64e510], ebx
fstp dword [esp + 0x30]
fld dword [esp + 0x60]
fmul dword [esp + 0x14]
fstp dword [esp + 0x10]
jle 0x477eab
mov ebp, dword [esp + 0x30]
xor edi, edi
mov ecx, dword [0x550068]
mov dword [esp + 0x7c], 0x3f800000
mov dword [esp + 0x18], ecx
fld dword [esp + 0x18]
fmul dword [edi + 0x628670]
fstp dword [esp + 0x5c]
fld dword [esp + 0x18]
fmul dword [edi + 0x62866c]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x78], ecx
fstp dword [esp + 0x38]
fld dword [esp + 0x18]
fmul dword [edi + 0x628668]
mov eax, dword [esp + 0x38]
mov dword [esp + 0x74], eax
lea eax, [esp + 0x84]
fstp dword [esp + 0x30]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x70], edx
lea edx, [esp + 0x70]
push edx
push eax
call fcn.00402700
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x68], ecx
mov dword [esp + 0x74], eax
mov dword [esp + 0x6c], edx
fld dword [esp + 0x74]
fstp qword [esp]
call fcn.005294c4
fstp dword [esp + 0x38]
fld dword [esp + 0x38]
fcomp dword [0x53b368]
add esp, 8
fnstsw ax
test ah, 0x41
je 0x477dfb
mov dword [esp + 0x1c], 0xd368d4a5
jmp 0x477e09
fld dword [0x53b27c]
fdiv dword [esp + 0x6c]
fstp dword [esp + 0x1c]
fld dword [esp + 0x64]
fmul dword [esp + 0x1c]
push 0x40000000
fstp dword [esp + 0x34]
fld dword [esp + 0x64]
fmul dword [esp + 0x20]
fstp dword [esp + 0x3c]
fld dword [edi + 0x64f5a8]
fmul dword [0x53b704]
call fcn.00529c7c
fld dword [edi + 0x64f5ac]
fmul dword [0x53b704]
mov esi, eax
or esi, 0xffffff00
shl esi, 8
call fcn.00529c7c
fld dword [edi + 0x64f5b0]
fmul dword [0x53b704]
and eax, 0xff
or esi, eax
shl esi, 8
call fcn.00529c7c
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x34]
and eax, 0xff
or esi, eax
mov eax, dword [esp + 0x3c]
push esi
push ecx
mov ecx, dword [esp + 0x20]
push edx
mov edx, dword [esp + 0x20]
push eax
push 0xffffffffffffffff
push ecx
push ebp
push edx
call fcn.00509000
mov eax, dword [0x64e510]
add esp, 0x24
inc ebx
add edi, 0xc
cmp ebx, eax
jl 0x477d53
mov eax, dword [0x660f94]
test eax, eax
je 0x477f3d
mov eax, dword [0x660f9c]
test eax, eax
jne 0x477f3d
mov eax, dword [esp + 0x58]
test eax, eax
jle 0x477f3d
xor ecx, ecx
mov edi, eax
mov esi, dword [0x55002c]
add ecx, 0x20
mov eax, dword [ecx + esi - 8]
mov edx, eax
mov ebx, eax
and edx, 0xff00
and ebx, 0xff
imul edx, dword [0x660f5c]
imul ebx, dword [0x660f48]
and edx, 0xff0000
and ebx, 0xff00
or edx, ebx
mov dword [esp + 0x30], eax
xor ebx, ebx
and eax, 0xff000000
mov bh, byte [esp + 0x32]
imul ebx, dword [0x6191d4]
shr edx, 8
and ebx, 0xff0000
or edx, ebx
or edx, eax
dec edi
mov dword [ecx + esi - 8], edx
mov eax, dword [0x55002c]
mov dword [ecx + eax - 4], 0
jne 0x477ecd
mov eax, dword [0x65dfac]
test eax, eax
jne 0x478127
mov al, byte [0x660fe1]
test al, al
je 0x477f96
mov ecx, dword [esp + 0x58]
lea eax, [ecx - 1]
test eax, eax
jl 0x478018
mov edx, dword [0x55002c]
lea esi, [eax + 1]
lea ecx, [edx + 0x18]
mov edx, dword [ecx]
add ecx, 0x20
mov eax, edx
shr eax, 8
imul eax, dword [0x550060]
mov edi, eax
xor edi, edx
and edi, 0xffffff
xor edi, eax
dec esi
mov dword [ecx - 0x20], edi
jne 0x477f6e
jmp 0x478018
mov eax, dword [esp + 0x20]
test eax, eax
je 0x478018
mov eax, dword [esp + 0x58]
dec eax
test eax, eax
jl 0x478018
mov ecx, dword [0x55002c]
lea edi, [eax + 1]
lea esi, [ecx + 0x18]
fld dword [esi - 0xc]
fcomp dword [0x55007c]
fnstsw ax
test ah, 1
je 0x478012
fld dword [esi - 0xc]
fcomp dword [0x53b280]
fnstsw ax
test ah, 0x41
jne 0x478012
fld dword [esi - 0xc]
fcomp dword [0x550078]
fnstsw ax
test ah, 0x41
je 0x477fe7
xor eax, eax
jmp 0x477ffb
fld dword [esi - 0xc]
fsub dword [0x550078]
fmul dword [0x550080]
call fcn.00529c7c
mov edx, dword [esi]
mov ecx, edx
shr ecx, 8
imul ecx, eax
mov eax, ecx
xor eax, edx
and eax, 0xffffff
xor eax, ecx
mov dword [esi], eax
add esi, 0x20
dec edi
jne 0x477fb3
mov eax, dword [esp + 0x34]
xor edi, edi
test eax, eax
jle 0x47811b
mov ecx, dword [esp + 0x20]
mov ax, word [edi*2 + 0x6191dc]
test ecx, ecx
je 0x47803d
mov ecx, 1
jmp 0x478045
xor ecx, ecx
mov cl, byte [edi + 0x65f72c]
mov ebp, dword [0x568170]
and eax, 0xffff
cmp ebp, eax
jne 0x47805c
cmp dword [0xac08dc], ecx
je 0x478095
mov edx, dword [0x660ffc]
test edx, edx
je 0x47806c
push 0
push 1
jmp 0x47807c
mov edx, dword [0x660ff8]
test edx, edx
je 0x47807a
push 0
jmp 0x47807b
push ecx
push eax
call fcn.00506440
mov eax, dword [0x660fd4]
mov ebp, dword [0x568170]
add esp, 8
inc eax
mov dword [0x660fd4], eax
mov ax, word [edi*2 + 0x652f54]
mov ebx, dword [esp + 0x34]
movsx ecx, word [esp + 0x80]
movsx edx, ax
add edx, ecx
mov esi, edi
mov dword [0xac08e0], edx
inc esi
cmp esi, ebx
jge 0x4780e5
xor ecx, ecx
mov cx, word [esi*2 + 0x6191dc]
cmp ebp, ecx
jne 0x4780e5
mov ecx, dword [0xac08dc]
xor edx, edx
mov dl, byte [esi + 0x65f72c]
cmp ecx, edx
jne 0x4780e5
cmp ax, word [esi*2 + 0x652f54]
je 0x4780b6
mov eax, esi
lea ecx, [edi + edi*2]
sub eax, edi
lea edx, [ecx*4 + 0x62c510]
mov ecx, dword [0x55002c]
lea eax, [eax + eax*2]
shl eax, 1
push eax
lea eax, [ebx*4]
push edx
push eax
push ecx
call fcn.00506980
add esp, 0x10
cmp esi, ebx
mov edi, esi
jl 0x478026
xor eax, eax
mov dword [0xac08e0], eax
mov dword [0xac08e4], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret