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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x328
mov eax, dword [0x1009400c]
xor eax, esp
mov dword [esp + 0x324], eax
mov ecx, dword [0x101f4880]
push esi
mov esi, dword [0x101f487c]
push edi
cmp esi, ecx
jne 0x10048c4a
mov dword [0x101f436c], 0
pop edi
pop esi
mov ecx, dword [esp + 0x324]
xor ecx, esp
call fcn.1004d763
mov esp, ebp
pop ebp
ret
mov eax, dword [0x101f4258]
sub ecx, esi
movss xmm0, dword [eax + 0x28]
movss dword [esp + 0xcc], xmm0
movss xmm0, dword [eax + 0x30]
movss dword [esp + 0xd0], xmm0
movss xmm0, dword [eax + 0x2c]
mov eax, 0x3159721f
imul ecx
movss dword [esp + 0xd4], xmm0
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 1
jbe 0x10048cae
lea ecx, [esp + 0xcc]
push ecx
push 0x10048b70
push 0x14c
push eax
push esi
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_qsort_s]
add esp, 0x14
call fcn.1002b970
mov esi, eax
mov edi, edx
mov ecx, esi
sub ecx, dword [0x101f4370]
sbb edx, dword [0x101f4374]
call fcn.1007b6a0
cvtsd2ss xmm0, xmm0
mov eax, dword [0x101f3f18]
mov dword [0x101f4370], esi
mov dword [0x101f4374], edi
push dword [0x101f4260]
divss xmm0, dword [0x1008b9dc]
mov ecx, dword [eax]
push eax
movss dword [esp + 0x34], xmm0
call dword [ecx + 0x15c]
mov eax, dword [0x101f3f18]
push 0x20
push 0
push dword [0x101f4268]
mov ecx, dword [eax]
push 0
push eax
call dword [ecx + 0x190]
mov eax, dword [0x101f3f18]
push dword [0x101f425c]
push 0
mov ecx, dword [eax]
push eax
call dword [ecx + 0x94]
mov eax, dword [0x101f3f18]
push dword [0x101f4384]
push 1
mov ecx, dword [eax]
push eax
call dword [ecx + 0x94]
mov eax, dword [0x101f3f18]
push dword [0x101f41ec]
push 2
mov ecx, dword [eax]
push eax
call dword [ecx + 0x94]
mov eax, dword [0x101f4378]
push str.RenderNebula
push eax
mov ecx, dword [eax]
call dword [ecx + 0xe8]
mov eax, dword [0x101f4378]
push dword [0x101f41a0]
push str.scene_depth
mov ecx, dword [eax]
push eax
call dword [ecx + 0xd0]
mov eax, dword [0x101f4378]
push 0x101f45e8
push str.g_mProjection
push eax
mov ecx, dword [eax]
call dword [ecx + 0x98]
mov eax, dword [0x101f4378]
push 0x101f4668
push str.g_mProjectionInverse
push eax
mov ecx, dword [eax]
call dword [ecx + 0x98]
mov eax, dword [0x101f4240]
mov dword [esp + 0x48], 0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x1008bb80]
mov eax, dword [0x101f4244]
cvtpd2ps xmm0, xmm0
movss dword [esp + 0x40], xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x1008bb80]
cvtpd2ps xmm0, xmm0
movss dword [esp + 0x44], xmm0
mov eax, dword [0x101f4378]
lea edx, [esp + 0x40]
push edx
mov dword [esp + 0x50], 0
push str.g_fScreenSize
mov ecx, dword [eax]
push eax
call dword [ecx + 0x88]
mov eax, dword [0x101f4378]
movss xmm0, dword [0x101f424c]
mov ecx, dword [eax]
push ecx
movss dword [esp], xmm0
push str.g_fFarClip
push eax
call dword [ecx + 0x78]
mov esi, dword [0x101f487c]
mov dword [esp + 0x3c], esi
cmp esi, dword [0x101f4880]
je 0x10049ec7
mov eax, dword [sym.imp.d3dx9_43.dll_D3DXVec3Transform]
lea edi, [esi + 0x88]
movsd xmm0, qword [0x1008b900]
mov ecx, dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
mov dword [esp + 0x38], eax
mov eax, dword [sym.imp.d3dx9_43.dll_D3DXMatrixScaling]
mov dword [esp + 0x50], eax
mov eax, dword [sym.imp.d3dx9_43.dll_D3DXMatrixTranslation]
mov dword [esp + 0x54], eax
mov eax, dword [sym.imp.d3dx9_43.dll_D3DXMatrixInverse]
mov dword [esp + 0x90], eax
mov eax, dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
mov dword [esp + 0x24], eax
mov eax, dword [sym.imp.d3dx9_43.dll_D3DXMatrixLookAtLH]
mov dword [esp + 0x80], eax
mov eax, dword [sym.imp.d3dx9_43.dll_D3DXMatrixTranspose]
mov dword [esp + 0x84], eax
mov eax, dword [sym.imp.d3dx9_43.dll_D3DXVec3Normalize]
movsd qword [esp + 0x98], xmm0
movsd xmm0, qword [0x1008b8e8]
mov dword [esp + 0x58], eax
mov eax, dword [sym.imp.d3dx9_43.dll_D3DXMatrixMultiply]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x18], eax
movsd qword [esp + 0xb0], xmm0
push dword [0x101f4370]
call ecx
add esp, 4
cmp byte [edi + 0x1c], 0
je 0x10048fb9
movss xmm0, dword [edi + 0x40]
movss dword [esp + 0x10], xmm0
xorps xmm0, xmmword [0x1008bbe0]
movss dword [esp + 0xc], xmm0
call dword [esp + 0x24]
movss xmm1, dword [esp + 0x10]
subss xmm1, dword [esp + 0xc]
movss xmm0, dword [edi + 0x3c]
movd xmm2, eax
cvtdq2ps xmm2, xmm2
movss dword [esp + 0x10], xmm0
divss xmm2, dword [0x1008b9f4]
xorps xmm0, xmmword [0x1008bbe0]
mulss xmm2, xmm1
addss xmm2, dword [esp + 0xc]
movss dword [esp + 0xc], xmm0
movss dword [esp + 0x14], xmm2
call dword [esp + 0x24]
movss xmm1, dword [esp + 0x10]
subss xmm1, dword [esp + 0xc]
movss xmm3, dword [esp + 0x2c]
movd xmm2, eax
cvtdq2ps xmm2, xmm2
movss xmm0, dword [esp + 0x14]
divss xmm2, dword [0x1008b9f4]
mulss xmm0, xmm3
mulss xmm2, xmm1
addss xmm0, dword [edi + 0xc0]
addss xmm2, dword [esp + 0xc]
movss dword [edi + 0xc0], xmm0
mulss xmm2, xmm3
addss xmm2, dword [edi + 0xbc]
movss dword [edi + 0xbc], xmm2
jmp 0x10048fbf
movss xmm3, dword [esp + 0x2c]
cmp byte [edi + 0x98], 0
jne 0x10049059
call dword [esp + 0x24]
movss xmm0, dword [edi + 0x6c]
movd xmm1, eax
cvtdq2ps xmm1, xmm1
divss xmm1, dword [0x1008b9f4]
addss xmm1, dword [0x1008b820]
comiss xmm0, xmm1
jbe 0x100491a0
movss xmm0, dword [edi + 0x78]
movss dword [esp + 0x10], xmm0
movss xmm0, dword [edi + 0x7c]
mov byte [edi + 0x98], 1
movss dword [esp + 0xc], xmm0
call dword [esp + 0x24]
movss xmm1, dword [esp + 0xc]
subss xmm1, dword [esp + 0x10]
mov byte [edi + 0xa0], 0
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mov dword [edi + 0xa4], 0
divss xmm0, dword [0x1008b9f4]
mulss xmm0, xmm1
addss xmm0, dword [esp + 0x10]
movss dword [edi + 0x9c], xmm0
jmp 0x100491a0
movss xmm0, dword [edi + 0x9c]
xorps xmm1, xmm1
subss xmm0, xmm3
comiss xmm0, xmm1
movss dword [edi + 0x9c], xmm0
jbe 0x10049199
movss xmm0, dword [edi + 0xa4]
subss xmm0, xmm3
comiss xmm1, xmm0
movss dword [edi + 0xa4], xmm0
jb 0x100491a0
mov cl, byte [edi + 0xa0]
test cl, cl
sete al
mov byte [edi + 0xa0], al
test cl, cl
jne 0x100490b5
movss xmm0, dword [edi + 0x80]
jmp 0x100490bd
movss xmm0, dword [edi + 0x84]
movss dword [esp + 0xc], xmm0
call dword [esp + 0x24]
cmp byte [edi + 0xa0], 0
xorps xmm1, xmm1
movss xmm2, dword [esp + 0xc]
subss xmm2, xmm1
movd xmm0, eax
cvtdq2ps xmm0, xmm0
divss xmm0, dword [0x1008b9f4]
mulss xmm0, xmm2
addss xmm0, xmm1
movss dword [edi + 0xa4], xmm0
je 0x100491a0
cmp dword [edi + 0xb8], 0
mov dword [esp + 0xc], 0
jbe 0x1004916b
mov esi, dword [esp + 0xc]
call dword [esp + 0x24]
movss xmm0, dword [edi + 0x70]
mov edx, esi
shr edx, 5
mov ecx, esi
and ecx, 0x1f
movd xmm1, eax
cvtdq2ps xmm1, xmm1
mov eax, dword [edi + 0xac]
mov eax, dword [eax + edx*4]
divss xmm1, dword [0x1008b9f4]
addss xmm1, dword [0x1008b820]
comiss xmm0, xmm1
jbe 0x10049152
bts eax, ecx
jmp 0x10049155
btr eax, ecx
mov ecx, dword [edi + 0xac]
inc esi
mov dword [ecx + edx*4], eax
cmp esi, dword [edi + 0xb8]
jb 0x10049115
mov esi, dword [esp + 0x3c]
call dword [esp + 0x24]
movss xmm0, dword [edi + 0x74]
movd xmm1, eax
cvtdq2ps xmm1, xmm1
divss xmm1, dword [0x1008b9f4]
addss xmm1, dword [0x1008b820]
comiss xmm0, xmm1
seta al
mov byte [edi + 0xa8], al
jmp 0x100491a0
mov byte [edi + 0x98], 0
push dword [esi]
call dword [esp + 0x60]
add esp, 4
lea eax, [edi - 0x78]
push 0x101f4568
push eax
lea eax, [esp + 0x74]
push eax
call dword [esp + 0x44]
movss xmm2, dword [0x1008b888]
lea edx, [esp + 0x6c]
divss xmm2, dword [esp + 0x78]
mov eax, dword [0x101f4378]
push edx
push str.g_fNebulaPosition
push eax
movups xmm0, xmmword [esp + 0x78]
shufps xmm2, xmm2, 0
mulps xmm0, xmm2
movups xmmword [esp + 0x78], xmm0
mov ecx, dword [eax]
call dword [ecx + 0x88]
movss xmm1, dword [0x1008b8b8]
lea eax, [esp + 0x1e8]
movss xmm0, dword [edi - 0x7c]
sub esp, 0xc
mulss xmm0, xmm1
movss dword [esp + 8], xmm0
movss xmm0, dword [edi - 0x80]
mulss xmm0, xmm1
movss dword [esp + 4], xmm0
movss xmm0, dword [edi - 0x84]
mulss xmm0, xmm1
movss dword [esp], xmm0
push eax
call dword [esp + 0x60]
movss xmm0, dword [edi - 0x70]
lea eax, [esp + 0x228]
sub esp, 0xc
movss dword [esp + 8], xmm0
movss xmm0, dword [edi - 0x74]
movss dword [esp + 4], xmm0
movss xmm0, dword [edi - 0x78]
movss dword [esp], xmm0
push eax
call dword [esp + 0x64]
lea eax, [edi - 0x6c]
push eax
lea eax, [esp + 0x1ec]
push eax
lea eax, [esp + 0x168]
push eax
call dword [esp + 0x24]
lea eax, [esp + 0x228]
push eax
lea eax, [esp + 0x164]
push eax
lea eax, [esp + 0x128]
push eax
call dword [esp + 0x24]
movaps xmm0, xmmword [esp + 0x120]
lea eax, [esp + 0x1a0]
movaps xmmword [esp + 0x1a0], xmm0
movaps xmm0, xmmword [esp + 0x130]
movaps xmmword [esp + 0x1b0], xmm0
movaps xmm0, xmmword [esp + 0x140]
push eax
movaps xmmword [esp + 0x1c4], xmm0
lea eax, [esp + 0x164]
movaps xmm0, xmmword [esp + 0x154]
push 0
push eax
movaps xmmword [esp + 0x1dc], xmm0
call dword [esp + 0x9c]
lea eax, [esp + 0x160]
push eax
lea eax, [esp + 0xd0]
push eax
lea eax, [esp + 0x48]
push eax
call dword [esp + 0x44]
movss xmm2, dword [0x1008b888]
divss xmm2, dword [esp + 0x4c]
mov dword [esp + 0x4c], 0
movaps xmm1, xmm2
movaps xmm0, xmm2
mulss xmm0, dword [esp + 0x44]
mulss xmm1, dword [esp + 0x40]
mulss xmm2, dword [esp + 0x48]
movss dword [esp + 0x44], xmm0
mulss xmm0, xmm0
movss dword [esp + 0x40], xmm1
mulss xmm1, xmm1
movss dword [esp + 0x48], xmm2
mulss xmm2, xmm2
addss xmm0, xmm1
xorps xmm1, xmm1
addss xmm0, xmm2
addss xmm0, dword [0x1008b820]
cvtps2pd xmm0, xmm0
ucomisd xmm1, xmm0
ja 0x1004937b
sqrtsd xmm0, xmm0
jmp 0x10049380
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_sqrt_precise
mov eax, dword [0x101f4378]
cvtsd2ss xmm0, xmm0
mov ecx, dword [eax]
push ecx
movss dword [esp], xmm0
push str.g_fCameraNebulaDistance
push eax
movss dword [esp + 0x98], xmm0
call dword [ecx + 0x78]
mov ecx, dword [0x101f4378]
lea eax, [edi + 0x88]
push eax
push str.g_fFlashColor
push ecx
mov edx, dword [ecx]
call dword [edx + 0x88]
mov eax, dword [0x101f4378]
movss xmm0, dword [edi + 8]
mov ecx, dword [eax]
push ecx
movss dword [esp], xmm0
push str.g_fDistortStrength
push eax
call dword [ecx + 0x78]
mov eax, dword [0x101f4378]
push 0
push 0x101f4264
push eax
mov ecx, dword [eax]
call dword [ecx + 0xfc]
cmp dword [edi - 0x2c], 0
jbe 0x10049c9b
mov ecx, dword [0x101f4378]
lea eax, [edi - 0x28]
push 0xc
push eax
push str.g_fExteriorFade
mov edx, dword [ecx]
push ecx
call dword [edx + 0x50]
mov eax, dword [0x101f4378]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x104]
mov eax, dword [0x101f4378]
push 1
push eax
mov ecx, dword [eax]
call dword [ecx + 0x100]
mov eax, dword [edi - 0x2c]
sub esp, 8
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x1008bb80]
cvtpd2ps xmm0, xmm0
mulss xmm0, dword [0x1008b84c]
movss dword [esp + 0x14], xmm0
fld dword [esp + 0x14]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_ceil
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
add esp, 8
fstp dword [esp + 0xc]
movss xmm0, dword [esp + 0xc]
call fcn.1007b560
mov ecx, dword [edi - 0x2c]
xorps xmm0, xmm0
movss xmm1, dword [0x1008b92c]
sub ecx, eax
movss dword [esp + 0x28], xmm0
mov eax, ecx
shr eax, 0x1f
mov dword [esp + 0x88], ecx
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x1008bb80]
cvtpd2ps xmm0, xmm0
divss xmm1, xmm0
movss dword [esp + 0x20], xmm0
movss xmm0, dword [edi - 0x84]
movss dword [esp + 0x94], xmm1
movss xmm1, dword [edi - 0x80]
comiss xmm1, xmm0
movss dword [esp + 0xc], xmm0
jbe 0x100494eb
movss xmm2, dword [0x1008b888]
jmp 0x100494f3
movss xmm2, dword [0x1008ba1c]
minss xmm0, xmm1
movss dword [esp + 0x30], xmm2
movsd xmm1, qword [esp + 0x98]
cvtps2pd xmm0, xmm0
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_pow_precise
movsd xmm1, qword [esp + 0x98]
movsd qword [esp + 0x60], xmm0
movss xmm0, dword [esp + 0xc]
maxss xmm0, dword [edi - 0x80]
cvtps2pd xmm0, xmm0
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_pow_precise
movsd xmm2, qword [esp + 0x60]
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd xmm0, qword [esp + 0xb0]
cvtps2pd xmm1, xmm1
divsd xmm2, xmm1
xorps xmm1, xmm1
subsd xmm0, xmm2
ucomisd xmm1, xmm0
ja 0x10049560
sqrtsd xmm0, xmm0
jmp 0x10049565
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_sqrt_precise
cvtsd2ss xmm0, xmm0
sub esp, 8
movss dword [esp + 0x3c], xmm0
movss xmm0, dword [esp + 0x28]
mulss xmm0, dword [0x1008b92c]
movss dword [esp + 0x14], xmm0
fld dword [esp + 0x14]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_floor
fstp dword [esp + 0x14]
movss xmm0, dword [esp + 0x14]
add esp, 4
addss xmm0, xmm0
addss xmm0, dword [0x1008b888]
divss xmm0, dword [esp + 0x24]
movss dword [esp], xmm0
call fcn.100411d0
fstp dword [esp + 0x14]
movss xmm0, dword [esp + 0x14]
mulss xmm0, dword [esp + 0x38]
movss dword [esp + 0x14], xmm0
movss xmm0, dword [0x1008b888]
divss xmm0, dword [esp + 0x24]
movss dword [esp], xmm0
call fcn.100411d0
movss xmm3, dword [esp + 0x14]
add esp, 4
cmp dword [edi - 0x2c], 0
movss xmm0, dword [esp + 0x34]
movss xmm1, dword [0x1008b968]
movss xmm2, dword [0x1008b974]
fstp dword [esp + 0x14]
divss xmm3, dword [esp + 0x14]
mov dword [esp + 0x20], 0
mulss xmm0, xmm1
subss xmm1, dword [esp + 0x30]
subss xmm2, xmm0
movss xmm0, dword [0x1008b974]
mulss xmm1, dword [esp + 0x34]
mulss xmm2, dword [esp + 0xc]
subss xmm0, xmm1
addss xmm2, xmm0
movss xmm0, dword [0x1008b9a4]
addss xmm3, xmm2
divss xmm0, xmm3
movss dword [esp + 0x7c], xmm0
jbe 0x10049c8d
mov esi, dword [esp + 0x24]
xor ecx, ecx
mov dword [esp + 0xc], ecx
nop
mov eax, dword [esp + 0x1c]
mov edi, dword [edi]
sub edi, dword [eax - 4]
sar edi, 2
call esi
xor edx, edx
mov ecx, dword [0x101f4378]
div edi
mov eax, dword [esp + 0x1c]
mov edi, dword [ecx]
mov dword [esp + 0x10], edx
mov eax, dword [eax - 4]
push dword [eax + edx*4]
push str.diffuse
push ecx
call dword [edi + 0xd0]
mov eax, dword [esp + 0x1c]
mov ecx, dword [0x101f4378]
mov edi, dword [esp + 0x10]
mov eax, dword [eax + 0x10]
mov edx, dword [ecx]
push dword [eax + edi*4]
push str.distort
push ecx
call dword [edx + 0xd0]
mov eax, dword [esp + 0x1c]
mov edi, dword [eax]
sub edi, dword [eax - 4]
sar edi, 2
call esi
xor edx, edx
div edi
mov edi, dword [esp + 0x1c]
mov eax, dword [0x101f4378]
shl edx, 4
add edx, dword [edi - 0x1c]
mov ecx, dword [eax]
push edx
push str.g_fDiffuseColor
push eax
call dword [ecx + 0x88]
mov eax, edi
cmp byte [eax + 0x98], 0
je 0x1004972f
cmp byte [eax + 0xa0], 0
je 0x1004972f
mov ecx, dword [esp + 0x20]
mov edi, ecx
mov edx, dword [eax + 0xac]
and ecx, 0x1f
shr edi, 5
mov eax, 1
shl eax, cl
test dword [edx + edi*4], eax
je 0x1004972f
mov edx, 1
jmp 0x10049731
xor edx, edx
mov eax, dword [0x101f4378]
push edx
push str.g_bFlashing
push eax
mov ecx, dword [eax]
call dword [ecx + 0x58]
call esi
movd xmm0, eax
cvtdq2ps xmm0, xmm0
divss xmm0, dword [0x1008b9f4]
mulss xmm0, dword [0x1008b85c]
addss xmm0, dword [0x1008b880]
movss dword [esp + 0x10], xmm0
call esi
movd xmm0, eax
cvtdq2ps xmm0, xmm0
divss xmm0, dword [0x1008b9f4]
mulss xmm0, dword [0x1008b85c]
addss xmm0, dword [0x1008b880]
movss dword [esp + 0x14], xmm0
call esi
mov edi, dword [esp + 0x1c]
sub esp, 0xc
movss xmm1, dword [esp + 0x1c]
movd xmm0, eax
lea eax, [esp + 0x234]
cvtdq2ps xmm0, xmm0
mulss xmm1, dword [edi - 0x7c]
divss xmm0, dword [0x1008b9f4]
movss dword [esp + 8], xmm1
mulss xmm0, dword [0x1008b85c]
movss xmm1, dword [esp + 0x20]
mulss xmm1, dword [edi - 0x80]
addss xmm0, dword [0x1008b880]
movss dword [esp + 4], xmm1
mulss xmm0, dword [edi - 0x84]
movss dword [esp], xmm0
push eax
call dword [esp + 0x60]
call esi
movd xmm0, eax
cvtdq2ps xmm0, xmm0
divss xmm0, dword [0x1008b9f4]
mulss xmm0, dword [0x1008b868]
subss xmm0, dword [0x1008b854]
movss dword [esp + 0x10], xmm0
call esi
movd xmm0, eax
cvtdq2ps xmm0, xmm0
divss xmm0, dword [0x1008b9f4]
mulss xmm0, dword [0x1008b868]
subss xmm0, dword [0x1008b854]
movss dword [esp + 0x14], xmm0
call esi
movss xmm2, dword [esp + 0x10]
sub esp, 0xc
movss xmm1, dword [esp + 0x20]
mulss xmm2, dword [edi - 0x7c]
movd xmm0, eax
lea eax, [esp + 0x1f4]
cvtdq2ps xmm0, xmm0
mulss xmm1, dword [edi - 0x80]
divss xmm0, dword [0x1008b9f4]
addss xmm2, dword [edi - 0x70]
mulss xmm0, dword [0x1008b868]
addss xmm1, dword [edi - 0x74]
subss xmm0, dword [0x1008b854]
movss dword [esp + 8], xmm2
movss dword [esp + 0x1c], xmm2
movss dword [esp + 4], xmm1
movss dword [esp + 0x20], xmm1
mulss xmm0, dword [edi - 0x84]
addss xmm0, dword [edi - 0x78]
movss dword [esp], xmm0
push eax
movss dword [esp + 0x70], xmm0
call dword [esp + 0x64]
mov eax, dword [esp + 0x88]
cmp dword [esp + 0x20], eax
jae 0x10049c89
movss xmm0, dword [esp + 0x28]
cvtps2pd xmm0, xmm0
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_cos_precise
cvtsd2ss xmm0, xmm0
push ecx
movss dword [esp + 0x100], xmm0
movss xmm0, dword [esp + 0x2c]
movss dword [esp], xmm0
call fcn.100411d0
add esp, 4
fstp dword [esp + 0x100]
call esi
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mov eax, dword [esp + 0xc]
divss xmm0, dword [0x1008b9f4]
mulss xmm0, dword [0x1008b8bc]
subss xmm0, dword [0x1008b87c]
movss dword [esp + 0x104], xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x1008bb80]
cvtpd2ps xmm0, xmm0
mulss xmm0, dword [esp + 0x94]
cvtps2pd xmm0, xmm0
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_cos_precise
xorps xmm1, xmm1
mov dword [esp + 0xf0], 0
cvtsd2ss xmm1, xmm0
lea eax, [esp + 0xf0]
mov dword [esp + 0xf4], 0x3f800000
push eax
lea eax, [esp + 0x100]
mov dword [esp + 0xfc], 0
push eax
movss xmm0, dword [0x1008b888]
lea eax, [esp + 0x110]
mulss xmm1, dword [esp + 0x38]
push eax
subss xmm0, dword [esp + 0x40]
lea eax, [esp + 0x12c]
mov dword [esp + 0x114], 0
mulss xmm1, dword [0x1008b858]
push eax
mov dword [esp + 0x11c], 0
mov dword [esp + 0x120], 0
mulss xmm1, dword [esp + 0x44]
addss xmm1, dword [0x1008b878]
addss xmm1, xmm0
movss xmm0, dword [esp + 0x38]
mulss xmm1, dword [esp + 0x8c]
addss xmm0, xmm1
movss dword [esp + 0x38], xmm0
call dword [esp + 0x90]
lea eax, [esp + 0x120]
push eax
push eax
call dword [esp + 0x8c]
lea eax, [edi - 0x6c]
mov dword [esp + 0x158], 0
push eax
lea eax, [esp + 0x124]
mov dword [esp + 0x158], 0
push eax
lea eax, [esp + 0x168]
mov dword [esp + 0x158], 0
push eax
mov dword [esp + 0x158], 0
mov dword [esp + 0x148], 0
mov dword [esp + 0x138], 0
mov dword [esp + 0x168], 0x3f800000
call dword [esp + 0x24]
lea eax, [esp + 0x160]
mov dword [esp + 0x114], 0
push eax
lea eax, [esp + 0x118]
mov dword [esp + 0x11c], 0
push eax
mov dword [esp + 0x124], 0x3f800000
lea eax, [esp + 0xc4]
push eax
call dword [esp + 0x44]
movss xmm0, dword [esp + 0xbc]
lea eax, [esp + 0xe4]
movss dword [esp + 0xe4], xmm0
movss xmm0, dword [esp + 0xc0]
movss dword [esp + 0xe8], xmm0
movss xmm0, dword [esp + 0xc4]
push eax
push eax
movss dword [esp + 0xf4], xmm0
call dword [esp + 0x60]
movss xmm0, dword [esp + 0xcc]
lea eax, [esp + 0xd8]
subss xmm0, dword [esp + 0x60]
push eax
push eax
movss dword [esp + 0xe0], xmm0
movss xmm0, dword [esp + 0xd8]
subss xmm0, dword [esp + 0x1c]
movss dword [esp + 0xe4], xmm0
movss xmm0, dword [esp + 0xdc]
subss xmm0, dword [esp + 0x18]
movss dword [esp + 0xe8], xmm0
call dword [esp + 0x60]
movss xmm0, dword [esp + 0xdc]
movss xmm1, dword [esp + 0xd8]
mulss xmm0, dword [esp + 0xe8]
push ecx
mulss xmm1, dword [esp + 0xe8]
addss xmm1, xmm0
movss xmm0, dword [esp + 0xe4]
mulss xmm0, dword [esp + 0xf0]
addss xmm1, xmm0
movss dword [esp], xmm1
call fcn.10009960
add esp, 4
lea eax, [esp + 0x228]
fstp dword [esp + 0x60]
push eax
lea eax, [esp + 0x124]
push eax
lea eax, [esp + 0x168]
push eax
call dword [esp + 0x24]
lea eax, [edi - 0x6c]
push eax
lea eax, [esp + 0x164]
push eax
lea eax, [esp + 0x2b0]
push eax
call dword [esp + 0x24]
lea eax, [esp + 0x1e8]
push eax
lea eax, [esp + 0x2ac]
push eax
lea eax, [esp + 0x2f0]
push eax
call dword [esp + 0x24]
push 0x101f4568
lea eax, [esp + 0x2ec]
push eax
lea eax, [esp + 0x270]
push eax
call dword [esp + 0x24]
mov eax, dword [0x101f4378]
lea edx, [esp + 0x268]
push edx
push str.g_mWorldView
push eax
mov ecx, dword [eax]
call dword [ecx + 0x98]
mov eax, dword [0x101f4378]
movss xmm0, dword [esp + 0x60]
mov ecx, dword [eax]
push ecx
movss dword [esp], xmm0
push str.g_fDot
push eax
call dword [ecx + 0x78]
mov eax, dword [0x101f4378]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x104]
mov eax, dword [0x101f3f18]
push 2
push 0
push 5
mov ecx, dword [eax]
push eax
call dword [ecx + 0x144]
mov eax, dword [esp + 0x20]
add dword [esp + 0xc], 2
inc eax
mov dword [esp + 0x20], eax
cmp eax, dword [edi - 0x2c]
jb 0x10049670
mov esi, dword [esp + 0x3c]
mov eax, dword [0x101f4378]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x108]
movss xmm0, dword [edi + 0x48]
xorps xmm2, xmm2
comiss xmm0, xmm2
jb 0x10049e78
movss xmm0, dword [0x1008b888]
comiss xmm0, dword [esp + 0x8c]
jb 0x10049e78
movss xmm1, dword [esp + 0x2c]
lea eax, [edi + 0x4c]
addss xmm1, dword [0x101f436c]
mov ecx, dword [0x101f4378]
movss xmm0, dword [0x1008b864]
push eax
push str.g_fFogFade
mov edx, dword [ecx]
minss xmm0, xmm1
push ecx
movss dword [0x101f436c], xmm0
call dword [edx + 0x88]
movss xmm0, dword [edi + 0x44]
lea edx, [esp + 0xa0]
movss xmm1, dword [edi + 0x48]
movss dword [esp + 0xa4], xmm1
subss xmm1, xmm0
movss dword [esp + 0xa0], xmm0
movss xmm0, dword [0x1008b888]
mov eax, dword [0x101f4378]
push edx
divss xmm0, xmm1
push str.g_fFogExtents
push eax
movss dword [esp + 0xb4], xmm1
movss dword [esp + 0xb8], xmm0
mov ecx, dword [eax]
call dword [ecx + 0x88]
push 0x101f4568
lea eax, [esp + 0x1a4]
push eax
lea eax, [esp + 0x270]
push eax
call dword [esp + 0x24]
mov eax, dword [0x101f4378]
lea edx, [esp + 0x268]
push edx
push str.g_mWorldView
push eax
mov ecx, dword [eax]
call dword [ecx + 0x98]
mov ecx, dword [0x101f4378]
lea eax, [edi + 0x5c]
push eax
push str.g_fDiffuseColor
push ecx
mov edx, dword [ecx]
call dword [edx + 0x88]
cmp byte [edi + 0x98], 0
je 0x10049dc3
cmp byte [edi + 0xa0], 0
je 0x10049dc3
cmp byte [edi + 0xa8], 0
je 0x10049dc3
mov edx, 1
jmp 0x10049dc5
xor edx, edx
mov eax, dword [0x101f4378]
push edx
push str.g_bFlashing
push eax
mov ecx, dword [eax]
call dword [ecx + 0x58]
cmp byte [edi + 0x1c], 0
je 0x10049de3
movss xmm0, dword [edi + 0xc]
jmp 0x10049de6
xorps xmm0, xmm0
mov eax, dword [0x101f4378]
mov ecx, dword [eax]
push ecx
movss dword [esp], xmm0
push str.g_fDistortStrength
push eax
call dword [ecx + 0x78]
mov ecx, dword [0x101f4378]
lea eax, [edi + 0xbc]
push 8
push eax
push str.g_fFogDistortOffset
mov edx, dword [ecx]
push ecx
call dword [edx + 0x50]
cmp byte [edi + 0x1c], 0
mov eax, dword [0x101f4378]
mov ecx, dword [eax]
je 0x10049e28
push dword [edi + 0x38]
jmp 0x10049e2a
push 0
push str.distort
push eax
call dword [ecx + 0xd0]
mov eax, dword [0x101f4378]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x104]
mov eax, dword [0x101f4378]
push 0
push eax
mov ecx, dword [eax]
call dword [ecx + 0x100]
mov eax, dword [0x101f3f18]
push 2
push 0
push 5
mov ecx, dword [eax]
push eax
call dword [ecx + 0x144]
mov eax, dword [0x101f4378]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x108]
jmp 0x10049e95
movss xmm1, dword [0x101f436c]
xorps xmm0, xmm0
subss xmm1, dword [esp + 0x2c]
maxss xmm0, xmm1
movss dword [0x101f436c], xmm0
mov eax, dword [0x101f4378]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10c]
mov ecx, dword [esp + 0x5c]
add esi, 0x14c
add edi, 0x14c
mov dword [esp + 0x3c], esi
mov dword [esp + 0x1c], edi
cmp esi, dword [0x101f4880]
jne 0x10048ee6
mov eax, dword [0x101f3f18]
push 0
push 1
push eax
mov ecx, dword [eax]
call dword [ecx + 0x94]
mov eax, dword [0x101f3f18]
push 0
push 2
push eax
mov ecx, dword [eax]
call dword [ecx + 0x94]
mov ecx, dword [esp + 0x32c]
pop edi
pop esi
xor ecx, esp
call fcn.1004d763
mov esp, ebp
pop ebp
ret