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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
push 0xffffffffffffffff
push 0x1016fbc6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1744
call fcn.10158fb0
mov eax, dword [0x101b7f10]
push ebx
push esi
push edi
mov dword [esp + 0x174c], eax
mov ebx, ecx
call fcn.10015f24
mov ecx, ebx
call fcn.10015a53
mov esi, dword [ebp + 8]
push esi
mov ecx, ebx
call fcn.1001e3d4
push esi
mov ecx, ebx
call fcn.10015c92
push esi
mov ecx, ebx
call fcn.1001afc2
push 0x10a00280
mov dword [ebx + 0x208c], esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea ecx, [esp + 0x900]
call fcn.10152120
and dword [esp + 0x175c], 0
cmp esi, 0x9c41
jae 0x1002c8ed
cmp esi, 0xa027
jbe 0x1002c902
mov ecx, dword [ebx + 0x30]
lea eax, [esp + 0x900]
push eax
push esi
call fcn.10046b20
test al, al
jne 0x1002c90c
mov esi, 0x80004005
jmp 0x1002e122
push 0x10
call fcn.101589ff
pop ecx
mov dword [esp + 0x48], eax
test eax, eax
mov byte [esp + 0x175c], 1
je 0x1002c931
mov ecx, eax
call fcn.10011118
mov dword [esp + 0xc], eax
jmp 0x1002c936
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.10152520
add esp, 0xc
push eax
lea ecx, [esp + 0x904]
mov byte [esp + 0x1760], 2
call fcn.10152010
lea ecx, [esp + 0xd0]
mov byte [esp + 0x175c], 0
call fcn.10152110
lea ecx, [esp + 0x900]
call fcn.10151f50
mov ecx, dword [esp + 0xc]
push eax
call fcn.100111de
test eax, eax
jne 0x1002c902
lea ecx, [ebx + 0x1d4c]
call fcn.10151f50
mov ecx, dword [esp + 0xc]
push eax
push str.path
push 0x10183404
call fcn.1000fda7
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, 0x10183404
push esi
call fcn.1000fca1
mov ecx, dword [esp + 0xc]
lea eax, [ebx + 0x20c8]
push eax
push str.ClearColorG
push esi
call fcn.1000fca1
mov ecx, dword [esp + 0xc]
lea eax, [ebx + 0x20cc]
push eax
push str.ClearColorB
push esi
call fcn.1000fca1
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.1000fca1
lea eax, [ebx + 0x20d8]
push eax
push str.ColorG
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [ebx + 0x20dc]
push eax
push str.ColorB
push esi
mov ecx, edi
call fcn.1000fca1
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.1000fca1
lea eax, [ebx + 0x1c88]
push eax
push str.detailtexture
push esi
mov ecx, edi
call fcn.1000fe5b
push str.resource_fxENVTEX.hpk
lea ecx, [esp + 0x1024]
call fcn.10152140
mov ecx, dword [ebx + 0x1d28]
push 1
lea eax, [esp + 0x1024]
push eax
mov byte [esp + 0x1764], 3
call fcn.101583a0
lea ecx, [esp + 0x14b0]
call fcn.100126c3
lea ecx, [esp + 0x14b5]
mov byte [esp + 0x175c], 4
mov dword [esp + 0x14b0], 0x36
call fcn.10151f50
push eax
push str.sunfile
mov esi, 0x10183368
push esi
mov ecx, edi
call fcn.1000fda7
lea eax, [esp + 0x15d4]
push eax
push str.scaleX
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0x15d8]
push eax
push str.scaleY
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0x15dc]
push eax
push str.scaleZ
push esi
mov ecx, edi
call fcn.1000fca1
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.100126c3
lea ecx, [esp + 0x1225]
mov byte [esp + 0x175c], 5
mov dword [esp + 0x1220], 0x37
call fcn.10151f50
push eax
push str.moonfile
mov esi, str.MOON
push esi
mov ecx, edi
call fcn.1000fda7
lea eax, [esp + 0x1344]
push eax
push str.scaleX
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0x1348]
push eax
push str.scaleY
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0x134c]
push eax
push str.scaleZ
push esi
mov ecx, edi
call fcn.1000fca1
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.100126c3
lea eax, [esp + 0xe98]
push eax
push str.isenablefog
mov esi, 0x1018332c
push esi
mov ecx, edi
mov byte [esp + 0x1768], 6
mov dword [esp + 0xd9c], 0x38
call fcn.1000fb9b
lea eax, [esp + 0xf04]
push eax
push str.isvertexfog
push esi
mov ecx, edi
call fcn.1000fb9b
lea eax, [esp + 0xf00]
push eax
push str.israngebasedfog
push esi
mov ecx, edi
call fcn.1000fb9b
lea eax, [esp + 0x58]
push eax
push str.colorR
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0x88]
push eax
push str.colorG
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0x54]
push eax
push str.colorB
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0xf48]
push eax
push str.start
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0xf4c]
push eax
push 0x10183304
push esi
mov ecx, edi
call fcn.1000fca1
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.100126c3
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.10046abc
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.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.diffuseG
push esi
call fcn.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push str.diffuseB
push esi
call fcn.1000fb9b
fld dword [0x10180c40]
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.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.ambientG
push esi
call fcn.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push str.ambientB
push esi
call fcn.1000fb9b
fld dword [0x10180c40]
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.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.specularG
push esi
call fcn.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push str.specularB
push esi
call fcn.1000fb9b
fld dword [0x10180c40]
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.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.emissiveG
push esi
call fcn.1000fb9b
lea eax, [esp + 0x10]
push eax
mov ecx, dword [esp + 0x10]
push str.emissiveB
push esi
call fcn.1000fb9b
fld dword [0x10180c40]
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.1000fca1
test eax, eax
je 0x1002cfe0
fldz
fstp dword [esp + 0x30]
lea eax, [esp + 0x3c]
push eax
push str.SectionUVAdjustFor256
push esi
mov ecx, edi
call fcn.1000fca1
test eax, eax
je 0x1002cffc
fldz
fstp dword [esp + 0x3c]
lea eax, [esp + 0x44]
push eax
push str.SectionUVGridFor512
push esi
mov ecx, edi
call fcn.1000fca1
test eax, eax
je 0x1002d018
fldz
fstp dword [esp + 0x44]
lea eax, [esp + 0x34]
push eax
push str.SectionUVAdjustFor512
push esi
mov ecx, edi
call fcn.1000fca1
test eax, eax
je 0x1002d034
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.10152140
push str.TerrainTex.hpk
lea ecx, [esp + 0xc94]
mov byte [esp + 0x1760], 8
call fcn.101522d0
mov ecx, dword [ebx + 0x1d28]
push 1
lea eax, [esp + 0xc94]
push eax
call fcn.101583a0
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.10012536
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.100126c3
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.1000fca1
lea eax, [esp + 0x98]
push eax
push str.PosY
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0x9c]
push eax
push str.PosZ
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0x90]
push eax
push str.Width
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0x74]
push eax
push str.Height
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0xb0]
push eax
push str.Layer1ColorR
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0xb4]
push eax
push str.Layer1ColorG
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0xb8]
push eax
push str.Layer1ColorB
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0xbc]
push eax
push str.Layer1ColorA
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0xa0]
push eax
push str.Layer2ColorR
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0xa4]
push eax
push str.Layer2ColorG
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0xa8]
push eax
push str.Layer2ColorB
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0xac]
push eax
push str.Layer2ColorA
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0x5c]
push eax
push str.Layer1FrameTime
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0x84]
push eax
push str.Layer2FrameTime
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0x64]
push eax
push str.Layer1TextureWidth
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0x6c]
push eax
push str.Layer2TextureWidth
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0x7c]
push eax
push str.Layer1TextureHeight
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0x8c]
push eax
push str.Layer2TextureHeight
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0x50]
push eax
push str.Layer1FrameNum
push esi
mov ecx, edi
call fcn.1000fb9b
lea eax, [esp + 0x4c]
push eax
push str.Layer2FrameNum
push esi
mov ecx, edi
call fcn.1000fb9b
lea ecx, [esp + 0x675]
call fcn.10151f50
push eax
push str.TextureSetFileName
push esi
mov ecx, edi
call fcn.1000fda7
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.1000fca1
test eax, eax
jne 0x1002d3e0
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 0x1002d3e7
or dword [ebx + 0x1860], 0xffffffff
lea ecx, [esp + 0x3e0]
call fcn.100126c3
lea eax, [esp + 0x43]
push eax
push 0x101830a0
mov esi, 0x101819cc
push esi
mov ecx, edi
mov byte [esp + 0x1768], 0xa
mov dword [esp + 0x3ec], 0x35
call fcn.1000fe5b
lea eax, [esp + 0x60]
push eax
push str.Texture1USpeed
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0x68]
push eax
push str.Texture1VSpeed
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0x70]
push eax
push str.Texture2USpeed
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0x78]
push eax
push str.Texture2VSpeed
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0x80]
push eax
push str.NumOfStar
push esi
mov ecx, edi
call fcn.1000fb9b
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.10151f50
push eax
push 0x10183050
push esi
mov ecx, edi
call fcn.1000fda7
test eax, eax
jne 0x1002d603
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.1000fca1
test eax, eax
je 0x1002d52c
fld1
fstp dword [esp + 0x1c]
lea eax, [esp + 0x20]
push eax
push str.StarMinG
push esi
mov ecx, edi
call fcn.1000fca1
test eax, eax
je 0x1002d548
fld1
fstp dword [esp + 0x20]
lea eax, [esp + 0x24]
push eax
push str.StarMinB
push esi
mov ecx, edi
call fcn.1000fca1
test eax, eax
je 0x1002d564
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, 0x101819cc
push esi
call fcn.1000fca1
test eax, eax
je 0x1002d596
fld1
fstp dword [esp + 0x1c]
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x20]
push eax
push str.StarMaxG
push esi
call fcn.1000fca1
test eax, eax
je 0x1002d5b4
fld1
fstp dword [esp + 0x20]
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x24]
push eax
push str.StarMaxB
push esi
call fcn.1000fca1
test eax, eax
je 0x1002d5d2
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, 0x101819cc
jmp 0x1002d60a
or dword [ebx + 0x17cc], 0xffffffff
lea ecx, [esp + 0x3e5]
call fcn.10151f50
push eax
push str.SkyTerrain
push esi
mov ecx, edi
call fcn.1000fda7
test eax, eax
jne 0x1002d678
lea eax, [esp + 0x2c]
push eax
push str.SkyTerrainHeight
push esi
mov ecx, edi
mov dword [esp + 0x3ec], 0x3b
call fcn.1000fca1
test eax, eax
jne 0x1002d656
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x5a4], eax
jmp 0x1002d65f
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 0x1002d67f
or dword [ebx + 0x17d0], 0xffffffff
and dword [esp + 0x38], 0
lea eax, [esp + 0x38]
push eax
push 0x10182fe4
mov esi, str.FLOCKING
push esi
mov ecx, edi
call fcn.1000fb9b
test eax, eax
jne 0x1002d7ee
and dword [esp + 0x2c], eax
cmp dword [esp + 0x38], eax
jle 0x1002d7ee
jmp 0x1002d6b8
mov esi, str.FLOCKING
lea ecx, [esp + 0xd0]
call fcn.10152120
push dword [esp + 0x2c]
lea eax, [esp + 0xd4]
push str.MODEL__d
push eax
mov byte [esp + 0x1768], 0xb
call fcn.10151f80
add esp, 0xc
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0xd4]
call fcn.10151f50
push eax
push esi
mov ecx, edi
call fcn.1000fb9b
push dword [esp + 0x2c]
lea eax, [esp + 0xd4]
push 0x10182fc8
push eax
call fcn.10151f80
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0xd4]
call fcn.10151f50
push eax
push esi
mov ecx, edi
call fcn.1000fca1
push dword [esp + 0x2c]
lea eax, [esp + 0xd4]
push 0x10182fc4
push eax
call fcn.10151f80
add esp, 0xc
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0xd4]
call fcn.10151f50
push eax
push esi
mov ecx, edi
call fcn.1000fca1
push dword [esp + 0x2c]
lea eax, [esp + 0xd4]
push 0x10182fc0
push eax
call fcn.10151f80
add esp, 0xc
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0xd4]
call fcn.10151f50
push eax
push esi
mov ecx, edi
call fcn.1000fca1
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.10028983
lea ecx, [esp + 0xd0]
mov byte [esp + 0x175c], 0xa
call fcn.10152110
inc dword [esp + 0x2c]
mov eax, dword [esp + 0x2c]
cmp eax, dword [esp + 0x38]
mov edi, dword [esp + 0xc]
jl 0x1002d6b3
lea ecx, [esp + 0x1e0]
call fcn.10152120
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.10046c4c
lea ecx, [esp + 0x1e0]
call fcn.10151f40
cmp eax, 2
jle 0x1002d8b5
push 0
lea ecx, [esp + 0x1e4]
call fcn.101524f0
push 0
lea ecx, [esp + 0x1e4]
call fcn.101524f0
push 0
lea ecx, [esp + 0x1e4]
call fcn.101524f0
push 0x10182fbc
lea ecx, [esp + 0x1e4]
call fcn.101522d0
push 0x10180be4
lea ecx, [esp + 0x1e4]
call fcn.10152080
test al, al
je 0x1002d8b5
push 0x10180c16
lea ecx, [esp + 0x1e4]
call fcn.10152080
test al, al
je 0x1002d8b5
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.10152120
mov ecx, dword [ebx + 0x30]
lea eax, [esp + 0x2e0]
push eax
push dword [ebp + 8]
mov byte [esp + 0x1764], 0xd
call fcn.10046c65
push 0x10180be4
lea ecx, [esp + 0x2e4]
call fcn.10152080
test al, al
je 0x1002d95f
push 0x10180c16
lea ecx, [esp + 0x2e4]
call fcn.10152080
test al, al
je 0x1002d95f
lea eax, [esp + 0x2e0]
push eax
lea eax, [esp + 0xd4]
push 0x10182198
push eax
call fcn.10152520
add esp, 0xc
push eax
lea ecx, [esp + 0x2e4]
mov byte [esp + 0x1760], 0xe
call fcn.10152010
lea ecx, [esp + 0xd0]
mov byte [esp + 0x175c], 0xd
call fcn.10152110
mov ecx, dword [ebx + 0x20e8]
lea eax, [esp + 0x2e0]
push eax
call fcn.100db206
lea ecx, [esp + 0x1120]
call fcn.10152120
mov ecx, dword [ebx + 0x30]
lea eax, [esp + 0x1120]
push eax
push dword [ebp + 8]
mov byte [esp + 0x1764], 0xf
call fcn.10046aee
lea eax, [esp + 0x1120]
push eax
push esi
mov ecx, ebx
call fcn.100168b2
mov ecx, dword [ebx + 0x1d28]
lea eax, [esp + 0x1020]
push eax
call fcn.101580f0
mov ecx, dword [ebx + 0x1d28]
lea eax, [esp + 0xc90]
push eax
call fcn.101580f0
lea eax, [ebx + 0x1c28]
push eax
push 0x10180d60
mov esi, str.CHARACTERLIGHT
push esi
mov ecx, edi
call fcn.1000fb9b
lea eax, [esp + 0x18]
push eax
push str.diffuseR
push esi
mov ecx, edi
call fcn.1000fb9b
lea eax, [esp + 0x14]
push eax
push str.diffuseG
push esi
mov ecx, edi
call fcn.1000fb9b
lea eax, [esp + 0x10]
push eax
push str.diffuseB
push esi
mov ecx, edi
call fcn.1000fb9b
fild dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
lea edi, [ebx + 0x1c2c]
fmul dword [0x10180c40]
lea esi, [esp + 0x1c]
fild dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push str.ambientR
fmul dword [0x10180c40]
fild dword [esp + 0x20]
fmul dword [0x10180c40]
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.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.ambientG
push esi
call fcn.1000fb9b
lea eax, [esp + 0x10]
push eax
push str.ambientB
push esi
mov ecx, dword [esp + 0x18]
call fcn.1000fb9b
fild dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
lea edi, [ebx + 0x1c3c]
fmul dword [0x10180c40]
lea esi, [esp + 0x1c]
fild dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push str.specularR
fmul dword [0x10180c40]
fild dword [esp + 0x20]
fmul dword [0x10180c40]
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.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.specularG
push esi
call fcn.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push str.specularB
push esi
call fcn.1000fb9b
fild dword [esp + 0x10]
lea edi, [ebx + 0x1c4c]
lea esi, [esp + 0x1c]
fmul dword [0x10180c40]
lea eax, [ebx + 0x1c5c]
fild dword [esp + 0x14]
push eax
push str.range
fmul dword [0x10180c40]
fild dword [esp + 0x20]
fmul dword [0x10180c40]
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.1000fca1
lea eax, [ebx + 0x1c60]
push eax
push str.smallangle
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [ebx + 0x1c60]
fld dword [eax]
mov ecx, edi
fmul dword [0x10180d54]
fstp dword [eax]
lea eax, [ebx + 0x1c64]
push eax
push str.largeangle
push esi
call fcn.1000fca1
lea eax, [ebx + 0x1c64]
fld dword [eax]
mov ecx, edi
fmul dword [0x10180d54]
fstp dword [eax]
lea eax, [ebx + 0x1c68]
push eax
push str.positionX
push esi
call fcn.1000fca1
lea eax, [ebx + 0x1c6c]
push eax
push str.positionY
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [ebx + 0x1c70]
push eax
push str.positionZ
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [ebx + 0x1c74]
push eax
push str.directionX
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [ebx + 0x1c78]
push eax
push str.directionY
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [ebx + 0x1c7c]
push eax
push str.directionZ
push esi
mov ecx, edi
call fcn.1000fca1
lea eax, [esp + 0x18]
push eax
push str.diffuseR
mov esi, str.CHAR_MATERIAL
push esi
mov ecx, edi
call fcn.1000fb9b
lea eax, [esp + 0x14]
push eax
push str.diffuseG
push esi
mov ecx, edi
call fcn.1000fb9b
lea eax, [esp + 0x10]
push eax
push str.diffuseB
push esi
mov ecx, edi
call fcn.1000fb9b
fild dword [esp + 0x10]
lea edi, [ebx + 0x1954]
lea esi, [esp + 0x1c]
fmul dword [0x10180c40]
lea eax, [esp + 0x18]
fild dword [esp + 0x14]
push eax
push str.ambientR
fmul dword [0x10180c40]
fild dword [esp + 0x20]
fmul dword [0x10180c40]
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.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.ambientG
push esi
call fcn.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push str.ambientB
push esi
call fcn.1000fb9b
fild dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
lea edi, [ebx + 0x1964]
fmul dword [0x10180c40]
lea esi, [esp + 0x1c]
fild dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push str.specularR
fmul dword [0x10180c40]
fild dword [esp + 0x20]
fmul dword [0x10180c40]
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.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.specularG
push esi
call fcn.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push str.specularB
push esi
call fcn.1000fb9b
fild dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
lea edi, [ebx + 0x1984]
fmul dword [0x10180c40]
lea esi, [esp + 0x1c]
fild dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push str.emissiveR
fmul dword [0x10180c40]
fild dword [esp + 0x20]
fmul dword [0x10180c40]
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.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.emissiveG
push esi
call fcn.1000fb9b
lea eax, [esp + 0x10]
mov ecx, dword [esp + 0xc]
push eax
push str.emissiveB
push esi
call fcn.1000fb9b
fild dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
lea edi, [ebx + 0x1974]
fmul dword [0x10180c40]
lea esi, [esp + 0x1c]
fild dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push str.diffuseR
fmul dword [0x10180c40]
fild dword [esp + 0x20]
fmul dword [0x10180c40]
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.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.diffuseG
push esi
call fcn.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push str.diffuseB
push esi
call fcn.1000fb9b
fild dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
lea edi, [ebx + 0x18b4]
fmul dword [0x10180c40]
lea esi, [esp + 0x1c]
fild dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push str.ambientR
fmul dword [0x10180c40]
fild dword [esp + 0x20]
fmul dword [0x10180c40]
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.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.ambientG
push esi
call fcn.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push str.ambientB
push esi
call fcn.1000fb9b
fild dword [esp + 0x10]
fmul dword [0x10180c40]
fild dword [esp + 0x14]
fmul dword [0x10180c40]
fild dword [esp + 0x18]
mov ecx, dword [esp + 0xc]
lea edi, [ebx + 0x18c4]
lea esi, [esp + 0x1c]
fmul dword [0x10180c40]
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.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.specularG
push esi
call fcn.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push str.specularB
push esi
call fcn.1000fb9b
fild dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
lea edi, [ebx + 0x18e4]
fmul dword [0x10180c40]
lea esi, [esp + 0x1c]
fild dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push str.emissiveR
fmul dword [0x10180c40]
fild dword [esp + 0x20]
fmul dword [0x10180c40]
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.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push eax
push str.emissiveG
push esi
call fcn.1000fb9b
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push str.emissiveB
push esi
call fcn.1000fb9b
fild dword [esp + 0x10]
lea edi, [ebx + 0x18d4]
lea esi, [esp + 0x1c]
fmul dword [0x10180c40]
fild dword [esp + 0x14]
fmul dword [0x10180c40]
fild dword [esp + 0x18]
fmul dword [0x10180c40]
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.10013c6b
test esi, esi
je 0x1002e02e
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
cmp dword [ebx + 0x208c], 0x9ca4
jne 0x1002e044
mov dword [ebx + 0x1998], 0x3f5ef9db
lea ecx, [esp + 0x1120]
mov byte [esp + 0x175c], 0xd
call fcn.10152110
lea ecx, [esp + 0x2e0]
mov byte [esp + 0x175c], 0xc
call fcn.10152110
lea ecx, [esp + 0x1e0]
mov byte [esp + 0x175c], 0xa
call fcn.10152110
lea ecx, [esp + 0x3e5]
mov byte [esp + 0x175c], 9
call fcn.10152110
lea ecx, [esp + 0x675]
mov byte [esp + 0x175c], 8
call fcn.10152110
lea ecx, [esp + 0xc90]
mov byte [esp + 0x175c], 7
call fcn.10152110
lea ecx, [esp + 0xa05]
mov byte [esp + 0x175c], 6
call fcn.10152110
lea ecx, [esp + 0xd95]
mov byte [esp + 0x175c], 5
call fcn.10152110
lea ecx, [esp + 0x1225]
mov byte [esp + 0x175c], 4
call fcn.10152110
lea ecx, [esp + 0x14b5]
mov byte [esp + 0x175c], 3
call fcn.10152110
lea ecx, [esp + 0x1020]
mov byte [esp + 0x175c], 0
call fcn.10152110
xor esi, esi
or dword [esp + 0x175c], 0xffffffff
lea ecx, [esp + 0x900]
call fcn.10152110
mov ecx, dword [esp + 0x1754]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x174c]
mov eax, esi
call fcn.1015901e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4