Function at 0x5052b0
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x655b3b
mov eax, dword fs:[0]
push eax
sub esp, 0xdcc
push ebp
push esi
push edi
mov eax, dword [0x6af168]
xor eax, esp
push eax
lea eax, [esp + 0xddc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esp + 0xdf4]
cmp byte [esp + 0xe04], 0
fldz
mov edi, dword [eax]
fst dword [esp + 0x64]
mov edx, dword [eax + 8]
fst dword [esp + 0x1c]
mov ecx, dword [eax + 4]
fld dword [0x6871e4]
mov eax, dword [eax + 0xc]
fstp dword [esp + 0x3c]
lea ebp, [edx + edi]
mov dword [esp + 0x30], ebp
lea ebp, [eax + ecx]
mov dword [esp + 0x88], edi
mov dword [esp + 0x2c], ebp
je 0x50534f
neg edx
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
neg eax
fld qword [0x686830]
mov dword [esp + 0x14], eax
fmul st(1), st(0)
fxch st(1)
fstp dword [esp + 0x64]
fimul dword [esp + 0x14]
fstp dword [esp + 0x1c]
fstp dword [esp + 0x3c]
jmp 0x505351
fstp st(0)
mov ebp, dword [esi + 0xc]
fld dword [esp + 0x1c]
shl ebp, 8
fstp dword [esp + 0x1c]
or ebp, dword [esi]
mov dword [esp + 0x28], ecx
shl ebp, 8
or ebp, dword [esi + 4]
shl ebp, 8
or ebp, dword [esi + 8]
cmp edi, dword [esp + 0x30]
jge 0x505830
cmp ecx, dword [esp + 0x2c]
jge 0x505830
jmp 0x505397
mov edi, dword [esp + 0x88]
fld dword [esp + 0x3c]
mov ecx, dword [esp + 0x2c]
fld dword [esp + 0x64]
sub ecx, dword [esp + 0x28]
fstp dword [esp + 0x14]
mov eax, edi
mov dword [esp + 0x34], edi
fld st(0)
mov dword [esp + 0x84], ecx
fsub dword [esp + 0xdfc]
fstp qword [esp + 0x12c]
fsub dword [esp + 0xe00]
fstp qword [esp + 0x134]
jmp 0x5053eb
mov ecx, dword [esp + 0x84]
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
sub edx, eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x40], edx
lea ecx, [esp + 0x74]
push ecx
lea edx, [esp + 0x74]
push edx
lea ecx, [esp + 0x84]
push ecx
lea edx, [esp + 0x84]
push edx
lea ecx, [esp + 0x34]
push ecx
mov ecx, dword [esp + 0xe00]
lea edx, [esp + 0x54]
push edx
push eax
mov eax, dword [esp + 0x44]
call fcn.00504720
fld dword [esp + 0x14]
fst dword [esp + 0x10c]
xor edi, edi
fld dword [esp + 0x1c]
mov dword [esp + 0x6c], eax
fst dword [esp + 0x110]
xor esi, esi
fild dword [esp + 0x24]
fadd st(1)
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fst dword [esp + 0x14]
fxch st(2)
fst dword [esp + 0x114]
fld dword [esp + 0x14]
fstp dword [esp + 0x118]
fiadd dword [esp + 0x40]
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fst dword [esp + 0x11c]
fstp dword [esp + 0x38]
fstp dword [esp + 0x120]
fstp dword [esp + 0x20]
fld dword [esp + 0x38]
fstp dword [esp + 0x124]
fld dword [esp + 0x20]
fstp dword [esp + 0x128]
fldz
fst dword [esp + 0x44]
fst dword [esp + 0x48]
fst dword [esp + 0x4c]
fst dword [esp + 0x50]
fst dword [esp + 0x54]
fst dword [esp + 0x58]
fst dword [esp + 0x5c]
fstp dword [esp + 0x60]
lea esp, [esp]
mov ecx, dword [esp + 0xdf0]
lea edx, [esp + esi + 0x10c]
lea eax, [esp + 0x13c]
call fcn.004daf70
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + esi + 0x44], ecx
fld dword [esp + esi + 0x44]
fsub qword [esp + 0x12c]
mov dword [esp + esi + 0x48], edx
add esi, 8
cmp esi, 0x20
fstp dword [esp + esi + 0x3c]
fld dword [esp + esi + 0x40]
fsub qword [esp + 0x134]
fstp dword [esp + esi + 0x40]
jl 0x5054d0
mov ecx, dword [esp + 0xdf8]
cmp ecx, edi
mov byte [esp + 0x1b], 0
je 0x5055b5
mov eax, dword [ecx]
mov edx, dword [ecx + 8]
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
add edx, eax
mov eax, dword [ecx + 4]
mov ecx, dword [ecx + 0xc]
add ecx, eax
fstp dword [esp + 0x20]
fld dword [esp + 0x20]
mov dword [esp + 0x68], ecx
mov dword [esp + 0x38], edx
mov dword [esp + 0x80], eax
xor ecx, ecx
fld dword [esp + ecx*8 + 0x44]
fcomp st(1)
fnstsw ax
test ah, 5
jnp 0x5055ae
fld dword [esp + ecx*8 + 0x44]
fild dword [esp + 0x38]
fcompp
fnstsw ax
test ah, 0x41
jnp 0x5055ae
fld dword [esp + ecx*8 + 0x48]
fild dword [esp + 0x80]
fcompp
fnstsw ax
test ah, 0x41
je 0x5055ae
fld dword [esp + ecx*8 + 0x48]
fild dword [esp + 0x68]
fcompp
fnstsw ax
test ah, 0x41
jnp 0x5055ae
add ecx, 1
cmp ecx, 4
jl 0x505561
jmp 0x5055b3
mov byte [esp + 0x1b], 1
fstp st(0)
fld dword [esp + 0x44]
mov eax, dword [esp + 0x6c]
fstp dword [esp + 0x8c]
mov edx, dword [ebx]
fld dword [esp + 0x48]
mov ecx, dword [edx + 0x8c]
fstp dword [esp + 0x90]
push eax
fldz
push edi
fst dword [esp + 0x9c]
push ebx
fld1
mov dword [esp + 0xa8], ebp
fst dword [esp + 0xa4]
mov dword [esp + 0xac], edi
fld dword [esp + 0x84]
mov dword [esp + 0xc8], ebp
fst dword [esp + 0xb0]
mov dword [esp + 0xcc], edi
fld dword [esp + 0x88]
mov dword [esp + 0xe8], ebp
fst dword [esp + 0xb4]
mov dword [esp + 0xec], edi
fld dword [esp + 0x58]
mov dword [esp + 0x108], ebp
fstp dword [esp + 0xb8]
mov dword [esp + 0x10c], edi
fld dword [esp + 0x5c]
fstp dword [esp + 0xbc]
fxch st(3)
fst dword [esp + 0xc0]
fxch st(2)
fst dword [esp + 0xc4]
fxch st(1)
fstp dword [esp + 0xd0]
fld dword [esp + 0x80]
fst dword [esp + 0xd4]
fld dword [esp + 0x60]
fstp dword [esp + 0xd8]
fld dword [esp + 0x64]
fstp dword [esp + 0xdc]
fxch st(2)
fst dword [esp + 0xe0]
fxch st(1)
fst dword [esp + 0xe4]
fld dword [esp + 0x7c]
fst dword [esp + 0xf0]
fxch st(4)
fstp dword [esp + 0xf4]
fld dword [esp + 0x68]
fstp dword [esp + 0xf8]
fld dword [esp + 0x6c]
fstp dword [esp + 0xfc]
fxch st(1)
fstp dword [esp + 0x100]
fstp dword [esp + 0x104]
fxch st(1)
fstp dword [esp + 0x110]
fstp dword [esp + 0x114]
call ecx
push eax
mov edi, str.SetTexture_gTexture
call fcn.00502b30
add esp, 4
cmp byte [esp + 0x1b], 0
jne 0x505733
mov edx, dword [ebx]
mov ecx, dword [edx + 0x64]
push 0
push 4
lea eax, [esp + 0x94]
push eax
push 0x1c4
push 5
push ebx
call ecx
push eax
mov edi, str.DrawPrimitive__Tri__3
call fcn.00502b30
jmp 0x5057ed
lea edx, [esp + 0x144]
mov dword [esp + 0xdc4], edx
mov dword [esp + 0xdcc], 0x64
mov dword [esp + 0xde4], 0
mov ecx, 8
lea esi, [esp + 0x8c]
lea edi, [esp + 0x144]
rep movsd dword es:[edi], dword [esi]
mov ecx, 8
lea esi, [esp + 0xac]
lea edi, [esp + 0x164]
rep movsd dword es:[edi], dword [esi]
mov ecx, 8
lea esi, [esp + 0xec]
lea edi, [esp + 0x184]
rep movsd dword es:[edi], dword [esi]
mov eax, edx
mov edx, dword [esp + 0xdf8]
mov ecx, 8
lea esi, [esp + 0xcc]
lea edi, [esp + 0x1a4]
rep movsd dword es:[edi], dword [esi]
push eax
mov esi, ebx
mov dword [esp + 0xdcc], 4
call fcn.00505100
mov dword [esp + 0xde8], 0xffffffff
mov eax, dword [esp + 0xdc8]
lea ecx, [esp + 0x148]
add esp, 4
cmp eax, ecx
je 0x5057f0
push eax
call fcn.0062493b
add esp, 4
mov eax, dword [esp + 0x34]
fld dword [esp + 0x14]
add eax, dword [esp + 0x40]
fstp dword [esp + 0x14]
cmp eax, dword [esp + 0x30]
mov dword [esp + 0x34], eax
jl 0x5053e0
fild dword [esp + 0x24]
mov eax, dword [esp + 0x28]
add eax, dword [esp + 0x24]
cmp eax, dword [esp + 0x2c]
fadd dword [esp + 0x1c]
mov dword [esp + 0x28], eax
fstp dword [esp + 0x1c]
jl 0x505390
mov ecx, dword [esp + 0xddc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
add esp, 0xdd8
ret 0x1c