Function at 0x1002ca68
Capabilities:
Resolve function by parsing pe exports
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
push 0xffffffffffffffff
push 0x1016eda1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1744
call fcn.10158150
mov eax, dword [0x101b6f10]
push ebx
push esi
push edi
mov dword [esp + 0x174c], eax
mov ebx, ecx
call fcn.1001617c
mov ecx, ebx
call fcn.10015cab
mov esi, dword [ebp + 8]
push esi
mov ecx, ebx
call fcn.1001e5f1
push esi
mov ecx, ebx
call fcn.10015eea
push esi
mov ecx, ebx
call fcn.1001b21a
push 0x109ff280
mov dword [ebx + 0x208c], esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea ecx, [esp + 0x900]
call fcn.101512c0
and dword [esp + 0x175c], 0
cmp esi, 0x9c41
jae 0x1002cafb
cmp esi, 0xa027
jbe 0x1002cb10
mov ecx, dword [ebx + 0x30]
lea eax, [esp + 0x900]
push eax
push esi
call fcn.10046cb8
test al, al
jne 0x1002cb1a
mov esi, 0x80004005
jmp 0x1002e330
push 0x10
call fcn.10157b9f
pop ecx
mov dword [esp + 0x48], eax
test eax, eax
mov byte [esp + 0x175c], 1
je 0x1002cb3f
mov ecx, eax
call fcn.1001121d
mov dword [esp + 0xc], eax
jmp 0x1002cb44
and dword [esp + 0xc], 0
lea eax, [esp + 0x900]
push eax
lea eax, [esp + 0xd4]
push str.resourcemap_
push eax
mov byte [esp + 0x1768], 0
call fcn.101516c0
add esp, 0xc
push eax
lea ecx, [esp + 0x904]
mov byte [esp + 0x1760], 2
call fcn.101511b0
lea ecx, [esp + 0xd0]
mov byte [esp + 0x175c], 0
call fcn.101512b0
lea ecx, [esp + 0x900]
call fcn.101510f0
mov ecx, dword [esp + 0xc]
push eax
call fcn.100112e3
test eax, eax
jne 0x1002cb10
lea ecx, [ebx + 0x1d4c]
call fcn.101510f0
mov ecx, dword [esp + 0xc]
push eax
push str.path
push 0x1018240c
call fcn.1000fedf
fldz
fstp dword [esp + 0x1c]
mov ecx, dword [esp + 0xc]
fldz
lea eax, [ebx + 0x20c4]
fstp dword [esp + 0x20]
mov edi, eax
fldz
lea esi, [esp + 0x1c]
push eax
fstp dword [esp + 0x28]
push str.ClearColorR
fldz
fstp dword [esp + 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, 0x1018240c
push esi
call fcn.1000fdd9
mov ecx, dword [esp + 0xc]
lea eax, [ebx + 0x20c8]
push eax
push str.ClearColorG
push esi
call fcn.1000fdd9
mov ecx, dword [esp + 0xc]
lea eax, [ebx + 0x20cc]
push eax
push str.ClearColorB
push esi
call fcn.1000fdd9
fldz
fstp dword [esp + 0x1c]
lea eax, [ebx + 0x20d4]
fldz
mov edi, eax
fstp dword [esp + 0x20]
lea esi, [esp + 0x1c]
fldz
push eax
push str.ColorR
fstp dword [esp + 0x2c]
fldz
fstp dword [esp + 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x14]
mov esi, str.AMBIENTLIGHT
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [ebx + 0x20d8]
push eax
push str.ColorG
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [ebx + 0x20dc]
push eax
push str.ColorB
push esi
mov ecx, edi
call fcn.1000fdd9
mov ecx, dword [ebx + 0x20]
mov edx, dword [ecx]
lea eax, [ebx + 0x20d4]
push eax
call dword [edx + 0x214]
mov ecx, dword [ebx + 0x20]
lea eax, [ebx + 0x1396]
mov edx, dword [ecx]
push eax
push eax
call dword [edx + 0x220]
lea eax, [ebx + 0x1c84]
push eax
push str.tiletexturerange
mov esi, str.TERRAIN
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [ebx + 0x1c88]
push eax
push str.detailtexture
push esi
mov ecx, edi
call fcn.1000ff93
push str.resource_fxENVTEX.hpk
lea ecx, [esp + 0x1024]
call fcn.101512e0
mov ecx, dword [ebx + 0x1d28]
push 1
lea eax, [esp + 0x1024]
push eax
mov byte [esp + 0x1764], 3
call fcn.10157540
lea ecx, [esp + 0x14b0]
call fcn.100128e0
lea ecx, [esp + 0x14b5]
mov byte [esp + 0x175c], 4
mov dword [esp + 0x14b0], 0x36
call fcn.101510f0
push eax
push str.sunfile
mov esi, 0x10182370
push esi
mov ecx, edi
call fcn.1000fedf
lea eax, [esp + 0x15d4]
push eax
push str.scaleX
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0x15d8]
push eax
push str.scaleY
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0x15dc]
push eax
push str.scaleZ
push esi
mov ecx, edi
call fcn.1000fdd9
mov ecx, dword [ebx + 0x20]
mov eax, dword [ecx]
lea edx, [esp + 0x14b0]
push edx
lea edx, [ebx + 0x16ac]
push edx
call dword [eax + 0x44]
lea ecx, [esp + 0x1220]
call fcn.100128e0
lea ecx, [esp + 0x1225]
mov byte [esp + 0x175c], 5
mov dword [esp + 0x1220], 0x37
call fcn.101510f0
push eax
push str.moonfile
mov esi, str.MOON
push esi
mov ecx, edi
call fcn.1000fedf
lea eax, [esp + 0x1344]
push eax
push str.scaleX
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0x1348]
push eax
push str.scaleY
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0x134c]
push eax
push str.scaleZ
push esi
mov ecx, edi
call fcn.1000fdd9
mov ecx, dword [ebx + 0x20]
mov eax, dword [ecx]
lea edx, [esp + 0x1220]
push edx
lea edx, [ebx + 0x16b0]
push edx
call dword [eax + 0x44]
lea ecx, [esp + 0xd90]
call fcn.100128e0
lea eax, [esp + 0xe98]
push eax
push str.isenablefog
mov esi, 0x10182334
push esi
mov ecx, edi
mov byte [esp + 0x1768], 6
mov dword [esp + 0xd9c], 0x38
call fcn.1000fcd3
lea eax, [esp + 0xf04]
push eax
push str.isvertexfog
push esi
mov ecx, edi
call fcn.1000fcd3
lea eax, [esp + 0xf00]
push eax
push str.israngebasedfog
push esi
mov ecx, edi
call fcn.1000fcd3
lea eax, [esp + 0x58]
push eax
push str.colorR
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0x88]
push eax
push str.colorG
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0x54]
push eax
push str.colorB
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0xf48]
push eax
push str.start
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0xf4c]
push eax
push 0x1018230c
push esi
mov ecx, edi
call fcn.1000fdd9
mov eax, dword [esp + 0x58]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x54]
mov ecx, dword [ebx + 0x20]
fld1
mov dword [esp + 0x24], eax
fstp dword [esp + 0x28]
lea esi, [esp + 0x1c]
lea edi, [esp + 0xf08]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea edx, [esp + 0xd90]
push edx
lea edx, [ebx + 0x17dc]
movsd dword es:[edi], dword [esi]
mov eax, dword [ecx]
push edx
call dword [eax + 0x44]
lea ecx, [esp + 0xa00]
call fcn.100128e0
mov ecx, dword [ebx + 0x30]
lea eax, [esp + 0xa05]
push eax
push dword [ebp + 8]
mov byte [esp + 0x1764], 7
mov dword [esp + 0xa08], 0x29
call fcn.10046c54
mov eax, dword [ebx + 0x1c80]
mov ecx, dword [esp + 0xc]
mov dword [esp + 0xbcc], eax
mov eax, dword [ebx + 0x1c84]
mov dword [esp + 0xbd0], eax
lea eax, [esp + 0x18]
push eax
push str.diffuseR
mov esi, str.TERRAIN_MATERIAL
push esi
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.diffuseG
push esi
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push str.diffuseB
push esi
call fcn.1000fcd3
fld dword [0x1017fc48]
fild dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
lea esi, [esp + 0x1c]
lea edi, [esp + 0xb78]
fmul st(1)
lea eax, [esp + 0x18]
fild dword [esp + 0x14]
push eax
push str.ambientR
fmul st(2)
fild dword [esp + 0x20]
fmul st(3)
fstp dword [esp + 0x24]
fstp dword [esp + 0x28]
fst dword [esp + 0x2c]
fstp st(0)
fstp st(0)
fld1
fstp dword [esp + 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, str.TERRAIN_MATERIAL
push esi
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.ambientG
push esi
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push str.ambientB
push esi
call fcn.1000fcd3
fld dword [0x1017fc48]
fild dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
lea esi, [esp + 0x1c]
lea edi, [esp + 0xb88]
fmul st(1)
lea eax, [esp + 0x18]
fild dword [esp + 0x14]
push eax
push str.specularR
fmul st(2)
fild dword [esp + 0x20]
fmul st(3)
fstp dword [esp + 0x24]
fstp dword [esp + 0x28]
fst dword [esp + 0x2c]
fstp st(0)
fstp st(0)
fld1
fstp dword [esp + 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, str.TERRAIN_MATERIAL
push esi
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.specularG
push esi
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push str.specularB
push esi
call fcn.1000fcd3
fld dword [0x1017fc48]
fild dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
lea esi, [esp + 0x1c]
lea edi, [esp + 0xb98]
fmul st(1)
lea eax, [esp + 0x18]
fild dword [esp + 0x14]
push eax
push str.emissiveR
fmul st(2)
fild dword [esp + 0x20]
fmul st(3)
fstp dword [esp + 0x24]
fstp dword [esp + 0x28]
fst dword [esp + 0x2c]
fstp st(0)
fstp st(0)
fld1
fstp dword [esp + 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, str.TERRAIN_MATERIAL
push esi
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.emissiveG
push esi
call fcn.1000fcd3
lea eax, [esp + 0x10]
push eax
mov ecx, dword [esp + 0x10]
push str.emissiveB
push esi
call fcn.1000fcd3
fld dword [0x1017fc48]
fild dword [esp + 0x10]
mov ecx, dword [ebx + 0x20]
lea esi, [esp + 0x1c]
lea edi, [esp + 0xba8]
fmul st(1)
lea eax, [ebx + 0x1196]
fild dword [esp + 0x14]
push eax
lea eax, [ebx + 0x1d4c]
push eax
fmul st(2)
fild dword [esp + 0x20]
fmul st(3)
fstp dword [esp + 0x24]
fstp dword [esp + 0x28]
fst dword [esp + 0x2c]
fstp st(0)
fstp st(0)
fld1
fstp dword [esp + 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edx, dword [ecx]
call dword [edx + 0x220]
mov edi, dword [esp + 0xc]
fldz
lea eax, [esp + 0x30]
fstp dword [esp + 0x30]
push eax
fldz
push str.SectionUVGridFor256
fstp dword [esp + 0x4c]
mov esi, str.TERRAIN
fldz
push esi
mov ecx, edi
fstp dword [esp + 0x48]
fldz
fstp dword [esp + 0x40]
call fcn.1000fdd9
test eax, eax
je 0x1002d1ee
fldz
fstp dword [esp + 0x30]
lea eax, [esp + 0x3c]
push eax
push str.SectionUVAdjustFor256
push esi
mov ecx, edi
call fcn.1000fdd9
test eax, eax
je 0x1002d20a
fldz
fstp dword [esp + 0x3c]
lea eax, [esp + 0x44]
push eax
push str.SectionUVGridFor512
push esi
mov ecx, edi
call fcn.1000fdd9
test eax, eax
je 0x1002d226
fldz
fstp dword [esp + 0x44]
lea eax, [esp + 0x34]
push eax
push str.SectionUVAdjustFor512
push esi
mov ecx, edi
call fcn.1000fdd9
test eax, eax
je 0x1002d242
fldz
fstp dword [esp + 0x34]
mov eax, dword [esp + 0x30]
mov dword [esp + 0xbfc], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0xbc8], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xbbc], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0xbc0], eax
lea eax, [ebx + 0x1d4c]
push eax
lea ecx, [esp + 0xc94]
call fcn.101512e0
push str.TerrainTex.hpk
lea ecx, [esp + 0xc94]
mov byte [esp + 0x1760], 8
call fcn.10151470
mov ecx, dword [ebx + 0x1d28]
push 1
lea eax, [esp + 0xc94]
push eax
call fcn.10157540
mov ecx, dword [ebx + 0x20]
mov eax, dword [ecx]
lea edx, [esp + 0xa00]
push edx
lea esi, [ebx + 0x17c4]
push esi
call dword [eax + 0x44]
lea ecx, [esp + 0xd0]
call fcn.10012753
mov eax, dword [ebx + 0x1698]
mov ecx, dword [ebx + 0x20]
mov dword [esp + 0x128], eax
mov eax, dword [ebx + 0x1c80]
mov dword [esp + 0x180], eax
mov eax, dword [ebx + 0x1c84]
mov dword [esp + 0x184], eax
mov al, byte [ebx + 0x1c88]
lea edx, [esp + 0xd0]
push edx
push dword [esi]
mov byte [esp + 0x1a8], al
mov eax, dword [ecx]
call dword [eax + 0x70]
lea ecx, [esp + 0x670]
call fcn.100128e0
lea eax, [esp + 0x94]
push eax
push str.PosX
mov esi, str.WATER
push esi
mov ecx, edi
mov byte [esp + 0x1768], 9
mov dword [esp + 0x67c], 0x3a
call fcn.1000fdd9
lea eax, [esp + 0x98]
push eax
push str.PosY
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0x9c]
push eax
push str.PosZ
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0x90]
push eax
push str.Width
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0x74]
push eax
push str.Height
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0xb0]
push eax
push str.Layer1ColorR
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0xb4]
push eax
push str.Layer1ColorG
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0xb8]
push eax
push str.Layer1ColorB
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0xbc]
push eax
push str.Layer1ColorA
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0xa0]
push eax
push str.Layer2ColorR
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0xa4]
push eax
push str.Layer2ColorG
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0xa8]
push eax
push str.Layer2ColorB
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0xac]
push eax
push str.Layer2ColorA
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0x5c]
push eax
push str.Layer1FrameTime
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0x84]
push eax
push str.Layer2FrameTime
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0x64]
push eax
push str.Layer1TextureWidth
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0x6c]
push eax
push str.Layer2TextureWidth
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0x7c]
push eax
push str.Layer1TextureHeight
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0x8c]
push eax
push str.Layer2TextureHeight
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0x50]
push eax
push str.Layer1FrameNum
push esi
mov ecx, edi
call fcn.1000fcd3
lea eax, [esp + 0x4c]
push eax
push str.Layer2FrameNum
push esi
mov ecx, edi
call fcn.1000fcd3
lea ecx, [esp + 0x675]
call fcn.101510f0
push eax
push str.TextureSetFileName
push esi
mov ecx, edi
call fcn.1000fedf
fldz
mov eax, dword [esp + 0x90]
fstp dword [esp + 0x20]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x74]
lea esi, [esp + 0x94]
lea edi, [esp + 0x77c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [esp + 0x24], eax
lea esi, [esp + 0x1c]
lea edi, [esp + 0x794]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea esi, [esp + 0xb0]
lea edi, [esp + 0x7e8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x5c]
movsd dword es:[edi], dword [esi]
lea esi, [esp + 0xa0]
lea edi, [esp + 0x7f8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [esp + 0x828], eax
mov eax, dword [esp + 0x84]
mov edi, dword [esp + 0xc]
mov dword [esp + 0x82c], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 0x86c], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x838], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x868], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x83c], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x7e4], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x7e0], eax
lea eax, [esp + 0x94]
push eax
push str.PosX
push str.WATER
mov ecx, edi
call fcn.1000fdd9
test eax, eax
jne 0x1002d5ee
mov ecx, dword [ebx + 0x20]
mov eax, dword [ecx]
lea edx, [esp + 0x670]
push edx
lea edx, [ebx + 0x1860]
push edx
call dword [eax + 0x44]
jmp 0x1002d5f5
or dword [ebx + 0x1860], 0xffffffff
lea ecx, [esp + 0x3e0]
call fcn.100128e0
lea eax, [esp + 0x43]
push eax
push 0x101820a8
mov esi, 0x101809d4
push esi
mov ecx, edi
mov byte [esp + 0x1768], 0xa
mov dword [esp + 0x3ec], 0x35
call fcn.1000ff93
lea eax, [esp + 0x60]
push eax
push str.Texture1USpeed
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0x68]
push eax
push str.Texture1VSpeed
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0x70]
push eax
push str.Texture2USpeed
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0x78]
push eax
push str.Texture2VSpeed
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0x80]
push eax
push str.NumOfStar
push esi
mov ecx, edi
call fcn.1000fcd3
mov eax, dword [esp + 0x60]
mov dword [esp + 0x5dc], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 0x5a8], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x59c], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 0x5a0], eax
mov eax, dword [esp + 0x80]
lea ecx, [esp + 0x3e5]
mov dword [esp + 0x5d0], eax
call fcn.101510f0
push eax
push 0x10182058
push esi
mov ecx, edi
call fcn.1000fedf
test eax, eax
jne 0x1002d811
mov ecx, dword [ebx + 0x20]
mov eax, dword [ecx]
lea edx, [esp + 0x3e0]
push edx
lea edx, [ebx + 0x17cc]
push edx
call dword [eax + 0x44]
fld1
fstp dword [esp + 0x1c]
lea eax, [esp + 0x1c]
fld1
push eax
fstp dword [esp + 0x24]
push str.StarMinR
fld1
push esi
mov ecx, edi
fstp dword [esp + 0x30]
mov dword [esp + 0x3ec], 0x34
fld1
fstp dword [esp + 0x34]
call fcn.1000fdd9
test eax, eax
je 0x1002d73a
fld1
fstp dword [esp + 0x1c]
lea eax, [esp + 0x20]
push eax
push str.StarMinG
push esi
mov ecx, edi
call fcn.1000fdd9
test eax, eax
je 0x1002d756
fld1
fstp dword [esp + 0x20]
lea eax, [esp + 0x24]
push eax
push str.StarMinB
push esi
mov ecx, edi
call fcn.1000fdd9
test eax, eax
je 0x1002d772
fld1
fstp dword [esp + 0x24]
mov ecx, dword [esp + 0xc]
lea esi, [esp + 0x1c]
lea edi, [esp + 0x568]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [esp + 0x1c]
push eax
movsd dword es:[edi], dword [esi]
push str.StarMaxR
mov esi, 0x101809d4
push esi
call fcn.1000fdd9
test eax, eax
je 0x1002d7a4
fld1
fstp dword [esp + 0x1c]
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x20]
push eax
push str.StarMaxG
push esi
call fcn.1000fdd9
test eax, eax
je 0x1002d7c2
fld1
fstp dword [esp + 0x20]
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x24]
push eax
push str.StarMaxB
push esi
call fcn.1000fdd9
test eax, eax
je 0x1002d7e0
fld1
fstp dword [esp + 0x24]
mov ecx, dword [ebx + 0x20]
lea esi, [esp + 0x1c]
lea edi, [esp + 0x558]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea edx, [esp + 0x3e0]
push edx
lea edx, [ebx + 0x17d4]
movsd dword es:[edi], dword [esi]
mov eax, dword [ecx]
push edx
call dword [eax + 0x44]
mov edi, dword [esp + 0xc]
mov esi, 0x101809d4
jmp 0x1002d818
or dword [ebx + 0x17cc], 0xffffffff
lea ecx, [esp + 0x3e5]
call fcn.101510f0
push eax
push str.SkyTerrain
push esi
mov ecx, edi
call fcn.1000fedf
test eax, eax
jne 0x1002d886
lea eax, [esp + 0x2c]
push eax
push str.SkyTerrainHeight
push esi
mov ecx, edi
mov dword [esp + 0x3ec], 0x3b
call fcn.1000fdd9
test eax, eax
jne 0x1002d864
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x5a4], eax
jmp 0x1002d86d
fldz
fstp dword [esp + 0x5a4]
mov ecx, dword [ebx + 0x20]
mov eax, dword [ecx]
lea edx, [esp + 0x3e0]
push edx
lea edx, [ebx + 0x17d0]
push edx
call dword [eax + 0x44]
jmp 0x1002d88d
or dword [ebx + 0x17d0], 0xffffffff
and dword [esp + 0x38], 0
lea eax, [esp + 0x38]
push eax
push 0x10181fec
mov esi, str.FLOCKING
push esi
mov ecx, edi
call fcn.1000fcd3
test eax, eax
jne 0x1002d9fc
and dword [esp + 0x2c], eax
cmp dword [esp + 0x38], eax
jle 0x1002d9fc
jmp 0x1002d8c6
mov esi, str.FLOCKING
lea ecx, [esp + 0xd0]
call fcn.101512c0
push dword [esp + 0x2c]
lea eax, [esp + 0xd4]
push str.MODEL__d
push eax
mov byte [esp + 0x1768], 0xb
call fcn.10151120
add esp, 0xc
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0xd4]
call fcn.101510f0
push eax
push esi
mov ecx, edi
call fcn.1000fcd3
push dword [esp + 0x2c]
lea eax, [esp + 0xd4]
push 0x10181fd0
push eax
call fcn.10151120
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0xd4]
call fcn.101510f0
push eax
push esi
mov ecx, edi
call fcn.1000fdd9
push dword [esp + 0x2c]
lea eax, [esp + 0xd4]
push 0x10181fcc
push eax
call fcn.10151120
add esp, 0xc
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0xd4]
call fcn.101510f0
push eax
push esi
mov ecx, edi
call fcn.1000fdd9
push dword [esp + 0x2c]
lea eax, [esp + 0xd4]
push 0x10181fc8
push eax
call fcn.10151120
add esp, 0xc
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0xd4]
call fcn.101510f0
push eax
push esi
mov ecx, edi
call fcn.1000fdd9
mov eax, dword [esp + 0x48]
mov dword [esp + 0xc0], eax
lea esi, [esp + 0x1c]
lea edi, [esp + 0xc4]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [esp + 0xc0]
push eax
lea ecx, [ebx + 0x2188]
movsd dword es:[edi], dword [esi]
call fcn.10028b91
lea ecx, [esp + 0xd0]
mov byte [esp + 0x175c], 0xa
call fcn.101512b0
inc dword [esp + 0x2c]
mov eax, dword [esp + 0x2c]
cmp eax, dword [esp + 0x38]
mov edi, dword [esp + 0xc]
jl 0x1002d8c1
lea ecx, [esp + 0x1e0]
call fcn.101512c0
mov ecx, dword [ebx + 0x20]
mov eax, dword [ecx]
lea esi, [ebx + 0x1d4c]
push esi
push esi
mov byte [esp + 0x1764], 0xc
call dword [eax + 0x220]
mov ecx, dword [ebx + 0x30]
lea eax, [esp + 0x1e0]
push eax
push dword [ebp + 8]
call fcn.10046de4
lea ecx, [esp + 0x1e0]
call fcn.101510e0
cmp eax, 2
jle 0x1002dac3
push 0
lea ecx, [esp + 0x1e4]
call fcn.10151690
push 0
lea ecx, [esp + 0x1e4]
call fcn.10151690
push 0
lea ecx, [esp + 0x1e4]
call fcn.10151690
push 0x10181fc4
lea ecx, [esp + 0x1e4]
call fcn.10151470
push 0x1017fbec
lea ecx, [esp + 0x1e4]
call fcn.10151220
test al, al
je 0x1002dac3
push 0x1017fc1e
lea ecx, [esp + 0x1e4]
call fcn.10151220
test al, al
je 0x1002dac3
mov ecx, dword [ebx + 0x20]
mov eax, dword [ecx]
lea edx, [esp + 0x1e0]
push edx
push 0x182ba
push 1
call dword [eax + 0x10]
lea ecx, [esp + 0x2e0]
call fcn.101512c0
mov ecx, dword [ebx + 0x30]
lea eax, [esp + 0x2e0]
push eax
push dword [ebp + 8]
mov byte [esp + 0x1764], 0xd
call fcn.10046dfd
push 0x1017fbec
lea ecx, [esp + 0x2e4]
call fcn.10151220
test al, al
je 0x1002db6d
push 0x1017fc1e
lea ecx, [esp + 0x2e4]
call fcn.10151220
test al, al
je 0x1002db6d
lea eax, [esp + 0x2e0]
push eax
lea eax, [esp + 0xd4]
push 0x101811a0
push eax
call fcn.101516c0
add esp, 0xc
push eax
lea ecx, [esp + 0x2e4]
mov byte [esp + 0x1760], 0xe
call fcn.101511b0
lea ecx, [esp + 0xd0]
mov byte [esp + 0x175c], 0xd
call fcn.101512b0
mov ecx, dword [ebx + 0x20e8]
lea eax, [esp + 0x2e0]
push eax
call fcn.100daedf
lea ecx, [esp + 0x1120]
call fcn.101512c0
mov ecx, dword [ebx + 0x30]
lea eax, [esp + 0x1120]
push eax
push dword [ebp + 8]
mov byte [esp + 0x1764], 0xf
call fcn.10046c86
lea eax, [esp + 0x1120]
push eax
push esi
mov ecx, ebx
call fcn.10016b0a
mov ecx, dword [ebx + 0x1d28]
lea eax, [esp + 0x1020]
push eax
call fcn.10157290
mov ecx, dword [ebx + 0x1d28]
lea eax, [esp + 0xc90]
push eax
call fcn.10157290
lea eax, [ebx + 0x1c28]
push eax
push 0x1017fd68
mov esi, str.CHARACTERLIGHT
push esi
mov ecx, edi
call fcn.1000fcd3
lea eax, [esp + 0x18]
push eax
push str.diffuseR
push esi
mov ecx, edi
call fcn.1000fcd3
lea eax, [esp + 0x14]
push eax
push str.diffuseG
push esi
mov ecx, edi
call fcn.1000fcd3
lea eax, [esp + 0x10]
push eax
push str.diffuseB
push esi
mov ecx, edi
call fcn.1000fcd3
fild dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
lea edi, [ebx + 0x1c2c]
fmul dword [0x1017fc48]
lea esi, [esp + 0x1c]
fild dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push str.ambientR
fmul dword [0x1017fc48]
fild dword [esp + 0x20]
fmul dword [0x1017fc48]
fstp dword [esp + 0x24]
fstp dword [esp + 0x28]
fstp dword [esp + 0x2c]
fld1
fstp dword [esp + 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, str.CHARACTERLIGHT
push esi
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.ambientG
push esi
call fcn.1000fcd3
lea eax, [esp + 0x10]
push eax
push str.ambientB
push esi
mov ecx, dword [esp + 0x18]
call fcn.1000fcd3
fild dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
lea edi, [ebx + 0x1c3c]
fmul dword [0x1017fc48]
lea esi, [esp + 0x1c]
fild dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push str.specularR
fmul dword [0x1017fc48]
fild dword [esp + 0x20]
fmul dword [0x1017fc48]
fstp dword [esp + 0x24]
fstp dword [esp + 0x28]
fstp dword [esp + 0x2c]
fld1
fstp dword [esp + 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, str.CHARACTERLIGHT
push esi
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.specularG
push esi
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push str.specularB
push esi
call fcn.1000fcd3
fild dword [esp + 0x10]
lea edi, [ebx + 0x1c4c]
lea esi, [esp + 0x1c]
fmul dword [0x1017fc48]
lea eax, [ebx + 0x1c5c]
fild dword [esp + 0x14]
push eax
push str.range
fmul dword [0x1017fc48]
fild dword [esp + 0x20]
fmul dword [0x1017fc48]
fstp dword [esp + 0x24]
fstp dword [esp + 0x28]
fstp dword [esp + 0x2c]
fld1
fstp dword [esp + 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x14]
mov esi, str.CHARACTERLIGHT
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [ebx + 0x1c60]
push eax
push str.smallangle
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [ebx + 0x1c60]
fld dword [eax]
mov ecx, edi
fmul dword [0x1017fd5c]
fstp dword [eax]
lea eax, [ebx + 0x1c64]
push eax
push str.largeangle
push esi
call fcn.1000fdd9
lea eax, [ebx + 0x1c64]
fld dword [eax]
mov ecx, edi
fmul dword [0x1017fd5c]
fstp dword [eax]
lea eax, [ebx + 0x1c68]
push eax
push str.positionX
push esi
call fcn.1000fdd9
lea eax, [ebx + 0x1c6c]
push eax
push str.positionY
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [ebx + 0x1c70]
push eax
push str.positionZ
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [ebx + 0x1c74]
push eax
push str.directionX
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [ebx + 0x1c78]
push eax
push str.directionY
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [ebx + 0x1c7c]
push eax
push str.directionZ
push esi
mov ecx, edi
call fcn.1000fdd9
lea eax, [esp + 0x18]
push eax
push str.diffuseR
mov esi, str.CHAR_MATERIAL
push esi
mov ecx, edi
call fcn.1000fcd3
lea eax, [esp + 0x14]
push eax
push str.diffuseG
push esi
mov ecx, edi
call fcn.1000fcd3
lea eax, [esp + 0x10]
push eax
push str.diffuseB
push esi
mov ecx, edi
call fcn.1000fcd3
fild dword [esp + 0x10]
lea edi, [ebx + 0x1954]
lea esi, [esp + 0x1c]
fmul dword [0x1017fc48]
lea eax, [esp + 0x18]
fild dword [esp + 0x14]
push eax
push str.ambientR
fmul dword [0x1017fc48]
fild dword [esp + 0x20]
fmul dword [0x1017fc48]
fstp dword [esp + 0x24]
fstp dword [esp + 0x28]
fstp dword [esp + 0x2c]
fld1
fstp dword [esp + 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, str.CHAR_MATERIAL
push esi
mov ecx, dword [esp + 0x18]
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.ambientG
push esi
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push str.ambientB
push esi
call fcn.1000fcd3
fild dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
lea edi, [ebx + 0x1964]
fmul dword [0x1017fc48]
lea esi, [esp + 0x1c]
fild dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push str.specularR
fmul dword [0x1017fc48]
fild dword [esp + 0x20]
fmul dword [0x1017fc48]
fstp dword [esp + 0x24]
fstp dword [esp + 0x28]
fstp dword [esp + 0x2c]
fld1
fstp dword [esp + 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, str.CHAR_MATERIAL
push esi
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.specularG
push esi
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push str.specularB
push esi
call fcn.1000fcd3
fild dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
lea edi, [ebx + 0x1984]
fmul dword [0x1017fc48]
lea esi, [esp + 0x1c]
fild dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push str.emissiveR
fmul dword [0x1017fc48]
fild dword [esp + 0x20]
fmul dword [0x1017fc48]
fstp dword [esp + 0x24]
fstp dword [esp + 0x28]
fstp dword [esp + 0x2c]
fld1
fstp dword [esp + 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, str.CHAR_MATERIAL
push esi
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.emissiveG
push esi
call fcn.1000fcd3
lea eax, [esp + 0x10]
mov ecx, dword [esp + 0xc]
push eax
push str.emissiveB
push esi
call fcn.1000fcd3
fild dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
lea edi, [ebx + 0x1974]
fmul dword [0x1017fc48]
lea esi, [esp + 0x1c]
fild dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push str.diffuseR
fmul dword [0x1017fc48]
fild dword [esp + 0x20]
fmul dword [0x1017fc48]
fstp dword [esp + 0x24]
fstp dword [esp + 0x28]
fstp dword [esp + 0x2c]
fld1
fstp dword [esp + 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, str.OBJ_MATERIAL
push esi
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.diffuseG
push esi
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push str.diffuseB
push esi
call fcn.1000fcd3
fild dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
lea edi, [ebx + 0x18b4]
fmul dword [0x1017fc48]
lea esi, [esp + 0x1c]
fild dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push str.ambientR
fmul dword [0x1017fc48]
fild dword [esp + 0x20]
fmul dword [0x1017fc48]
fstp dword [esp + 0x24]
fstp dword [esp + 0x28]
fstp dword [esp + 0x2c]
fld1
fstp dword [esp + 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, str.OBJ_MATERIAL
push esi
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.ambientG
push esi
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push str.ambientB
push esi
call fcn.1000fcd3
fild dword [esp + 0x10]
fmul dword [0x1017fc48]
fild dword [esp + 0x14]
fmul dword [0x1017fc48]
fild dword [esp + 0x18]
mov ecx, dword [esp + 0xc]
lea edi, [ebx + 0x18c4]
lea esi, [esp + 0x1c]
fmul dword [0x1017fc48]
lea eax, [esp + 0x18]
push eax
push str.specularR
fstp dword [esp + 0x24]
fstp dword [esp + 0x28]
fstp dword [esp + 0x2c]
fld1
fstp dword [esp + 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, str.OBJ_MATERIAL
push esi
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.specularG
push esi
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push str.specularB
push esi
call fcn.1000fcd3
fild dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
lea edi, [ebx + 0x18e4]
fmul dword [0x1017fc48]
lea esi, [esp + 0x1c]
fild dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push str.emissiveR
fmul dword [0x1017fc48]
fild dword [esp + 0x20]
fmul dword [0x1017fc48]
fstp dword [esp + 0x24]
fstp dword [esp + 0x28]
fstp dword [esp + 0x2c]
fld1
fstp dword [esp + 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, str.OBJ_MATERIAL
push esi
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.emissiveG
push esi
call fcn.1000fcd3
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push str.emissiveB
push esi
call fcn.1000fcd3
fild dword [esp + 0x10]
lea edi, [ebx + 0x18d4]
lea esi, [esp + 0x1c]
fmul dword [0x1017fc48]
fild dword [esp + 0x14]
fmul dword [0x1017fc48]
fild dword [esp + 0x18]
fmul dword [0x1017fc48]
fstp dword [esp + 0x1c]
fstp dword [esp + 0x20]
fstp dword [esp + 0x24]
fld1
fstp dword [esp + 0x28]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0xc]
push esi
mov ecx, ebx
call fcn.10013ec3
test esi, esi
je 0x1002e23c
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
cmp dword [ebx + 0x208c], 0x9ca4
jne 0x1002e252
mov dword [ebx + 0x1998], 0x3f5ef9db
lea ecx, [esp + 0x1120]
mov byte [esp + 0x175c], 0xd
call fcn.101512b0
lea ecx, [esp + 0x2e0]
mov byte [esp + 0x175c], 0xc
call fcn.101512b0
lea ecx, [esp + 0x1e0]
mov byte [esp + 0x175c], 0xa
call fcn.101512b0
lea ecx, [esp + 0x3e5]
mov byte [esp + 0x175c], 9
call fcn.101512b0
lea ecx, [esp + 0x675]
mov byte [esp + 0x175c], 8
call fcn.101512b0
lea ecx, [esp + 0xc90]
mov byte [esp + 0x175c], 7
call fcn.101512b0
lea ecx, [esp + 0xa05]
mov byte [esp + 0x175c], 6
call fcn.101512b0
lea ecx, [esp + 0xd95]
mov byte [esp + 0x175c], 5
call fcn.101512b0
lea ecx, [esp + 0x1225]
mov byte [esp + 0x175c], 4
call fcn.101512b0
lea ecx, [esp + 0x14b5]
mov byte [esp + 0x175c], 3
call fcn.101512b0
lea ecx, [esp + 0x1020]
mov byte [esp + 0x175c], 0
call fcn.101512b0
xor esi, esi
or dword [esp + 0x175c], 0xffffffff
lea ecx, [esp + 0x900]
call fcn.101512b0
mov ecx, dword [esp + 0x1754]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x174c]
mov eax, esi
call fcn.101581be
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4