Function at 0x408600
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x238
push ebx
push esi
push edi
mov esi, ecx
mov ebx, dword [esp + 0x248]
push ebp
lea ecx, [esp + 0x1c]
lea eax, [ebx + 1]
push eax
push str.Light_d
push ecx
call fcn.004bd200
add esp, 0xc
mov ecx, dword [esi]
mov eax, dword [ecx + 0x184]
test eax, eax
je 0x408c06
lea edi, [esi + 0x60]
lea eax, [esp + 0x44]
lea ecx, [esp + 0x1c]
push edi
push 0x100
push eax
push 0x4df418
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x408c06
lea eax, [esp + 0x44]
push edi
lea ecx, [esp + 0x20]
push 0x100
push eax
push 0x4df418
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x408bff
mov eax, dword [esi + 0x4c]
lea ecx, [ebx + ebx*4]
lea edx, [ebx + ecx*4]
lea ecx, [esp + 0x1c]
push edi
push 0x100
lea ebx, [eax + edx*8]
lea eax, [esp + 0x4c]
push eax
push str.BLANK
push str.Type
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea ecx, [esp + 0x44]
push 0x4df908
push ecx
push ebx
call fcn.00407be0
lea ecx, [esp + 0x28]
add esp, 0xc
test eax, eax
lea eax, [esp + 0x44]
push eax
push str.Type
push ecx
mov ecx, esi
je 0x408bf3
call fcn.00408160
lea ecx, [esp + 0x1c]
push 1
push 0x4df418
lea edx, [ebx + 4]
push str.ColorRGB
push ecx
push edx
mov ecx, esi
call fcn.004083d0
test eax, eax
jne 0x40870a
xor eax, eax
jmp 0x408d75
lea eax, [ebx + 8]
push 0
lea ecx, [esp + 0x20]
push 0x4df418
push str.Position
mov dword [ebx + 0x14], eax
push ecx
push eax
mov ecx, esi
call fcn.004081b0
test eax, eax
jne 0x408786
lea ecx, [esp + 0x10]
lea edx, [ebx + 8]
mov dword [esp + 0x10], 0xc4fa0000
mov dword [esp + 0x14], 0x457a0000
mov dword [esp + 0x18], 0x449c8000
mov ebp, dword [ecx]
mov dword [edx], ebp
mov eax, dword [ecx + 4]
mov dword [edx + 4], eax
mov ecx, dword [ecx + 8]
mov dword [edx + 8], ecx
mov eax, dword [ebx]
cmp eax, 6
je 0x40877f
cmp eax, 7
je 0x40877f
mov eax, dword [ebx + 0x14]
lea ecx, [esp + 0x1c]
push eax
push str.Position_Default_
push ecx
mov ecx, esi
call fcn.004081a0
jmp 0x408786
mov dword [ebx + 0x14], 0
lea eax, [esp + 0x1c]
push edi
push 0
push str.PlaceLightAtInfinity
push eax
call fcn.00470270
lea ecx, [esp + 0x2c]
add esp, 0x10
mov dword [ebx + 0x3c], eax
nop
push eax
push str.PlaceLightAtInfinity
push ecx
mov ecx, esi
call fcn.00408190
mov ecx, dword [ebx + 0x3c]
test ecx, ecx
je 0x408843
fld dword [ebx + 8]
fmul dword [ebx + 8]
fld dword [ebx + 0x10]
fmul dword [ebx + 0x10]
fld dword [ebx + 0xc]
fmul dword [ebx + 0xc]
fxch st(1)
faddp st(2)
faddp st(1)
fcom dword [0x4d41f8]
fstp dword [esp + 0x10]
fnstsw ax
test ah, 0x40
je 0x4087ef
mov dword [esp + 0x10], 0
jmp 0x408806
mov eax, dword [esp + 0x10]
push eax
call fcn.00401770
fdivr dword [0x4d4208]
add esp, 4
fstp dword [esp + 0x10]
fld dword [0x4d420c]
fdiv dword [esp + 0x10]
fld dword [ebx + 8]
fmul st(1)
lea ecx, [ebx + 0x18]
lea edx, [esp + 0x10]
fstp dword [esp + 0x10]
fld dword [ebx + 0xc]
fmul st(1)
fstp dword [esp + 0x14]
fmul dword [ebx + 0x10]
fstp dword [esp + 0x18]
mov eax, dword [edx]
mov dword [ecx], eax
mov ebp, dword [edx + 4]
mov dword [ecx + 4], ebp
mov edx, dword [edx + 8]
mov dword [ecx + 8], edx
mov dword [ebx + 0x14], ecx
lea ebp, [ebx + 0x24]
push 0
lea eax, [esp + 0x20]
push 0x4df418
lea ecx, [esp + 0x40]
push str.LookVector
push eax
mov dword [ebx + 0x30], ebp
push ecx
mov ecx, esi
call fcn.004081b0
test eax, eax
je 0x408886
mov eax, dword [esp + 0x38]
lea ecx, [esp + 0x38]
mov dword [ebp], eax
mov edx, dword [ecx + 4]
mov dword [ebp + 4], edx
mov ecx, dword [ecx + 8]
mov dword [ebp + 8], ecx
jmp 0x40897c
lea eax, [esp + 0x1c]
push 0
lea ecx, [esp + 0x3c]
push 0x4df418
push str.TargetPosition
push eax
push ecx
mov ecx, esi
call fcn.004081b0
test eax, eax
je 0x40892f
fld dword [esp + 0x38]
fsub dword [ebx + 8]
fld dword [esp + 0x3c]
fsub dword [ebx + 0xc]
fld dword [esp + 0x40]
fsub dword [ebx + 0x10]
fxch st(2)
fstp dword [esp + 0x2c]
fstp dword [esp + 0x30]
fstp dword [esp + 0x34]
fld dword [esp + 0x30]
fmul dword [esp + 0x30]
fld dword [esp + 0x34]
fmul dword [esp + 0x34]
fld dword [esp + 0x2c]
fmul dword [esp + 0x2c]
fxch st(1)
faddp st(2)
sub esp, 4
faddp st(1)
fstp dword [esp]
call fcn.00401770
fld dword [esp + 0x30]
fmul st(1)
fld dword [esp + 0x34]
fmul st(2)
fxch st(1)
fstp dword [esp + 0x14]
fstp dword [esp + 0x18]
fmul dword [esp + 0x38]
lea ecx, [esp + 0x14]
add esp, 4
fstp dword [esp + 0x18]
mov eax, dword [ecx]
mov dword [ebp], eax
mov edx, dword [ecx + 4]
mov dword [ebp + 4], edx
mov ecx, dword [ecx + 8]
mov dword [ebp + 8], ecx
jmp 0x40897c
xor eax, eax
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov eax, dword [ecx]
mov dword [ebp], eax
mov edx, dword [ecx + 4]
mov dword [ebp + 4], edx
mov ecx, dword [ecx + 8]
mov dword [ebp + 8], ecx
mov eax, dword [ebx]
cmp eax, 4
jne 0x408975
cmp eax, 5
jne 0x408975
mov eax, dword [ebx + 0x30]
lea ecx, [esp + 0x1c]
push eax
push str.Direction_Default_
push ecx
mov ecx, esi
call fcn.004081a0
jmp 0x40897c
mov dword [ebx + 0x30], 0
lea eax, [esp + 0x1c]
push edi
push 0xbff00000
push 0
push str.Range
push eax
call fcn.00470310
fcom qword [0x4d4210]
add esp, 0x14
fstp dword [ebx + 0x34]
fnstsw ax
test ah, 0x40
je 0x4089c7
mov dword [ebx + 0x34], 0
mov eax, dword [ebx]
cmp eax, 6
je 0x4089dc
cmp eax, 7
je 0x4089dc
lea eax, [esp + 0x1c]
push 0
push str.Range_Default_
push eax
jmp 0x4089d5
mov eax, dword [ebx + 0x34]
lea ecx, [esp + 0x1c]
push eax
push str.Range
push ecx
mov ecx, esi
call fcn.00408170
lea eax, [esp + 0x1c]
push edi
push 0
push str.ShowDebugSphere
push eax
call fcn.00470270
lea ecx, [esp + 0x2c]
add esp, 0x10
mov dword [ebx + 0x38], eax
nop
push eax
push str.ShowDebugSphere
push ecx
mov ecx, esi
call fcn.00408190
lea ecx, [esp + 0x1c]
push edi
push 0
push str.CastsShadows
push ecx
call fcn.00470270
lea ecx, [esp + 0x2c]
add esp, 0x10
mov dword [ebx + 0x44], eax
nop
push eax
push str.CastsShadows
push ecx
mov ecx, esi
call fcn.00408190
lea ecx, [esp + 0x1c]
push edi
push 1
push str.EmitsLight
push ecx
call fcn.00470270
lea ecx, [esp + 0x2c]
add esp, 0x10
mov dword [ebx + 0x40], eax
nop
push eax
push str.EmitsLight
push ecx
mov ecx, esi
call fcn.00408190
lea ecx, [esp + 0x1c]
push edi
push 0
push str.HasLensFlare
push ecx
call fcn.00470270
lea ecx, [esp + 0x2c]
add esp, 0x10
mov dword [ebx + 0x48], eax
nop
push eax
push str.HasLensFlare
push ecx
mov ecx, esi
call fcn.00408190
mov ecx, dword [ebx + 0x48]
test ecx, ecx
je 0x408be9
lea eax, [esp + 0x1c]
push 0
push 0x4df418
lea ecx, [ebx + 0x4c]
push str.LensFlareColorRGB
push eax
push ecx
mov ecx, esi
call fcn.004083d0
lea ecx, [esp + 0x1c]
push edi
push 0xbff00000
push 0
push str.LensFlareBrightness
push ecx
call fcn.00470310
fcom qword [0x4d4210]
add esp, 0x14
fstp dword [ebx + 0x50]
fnstsw ax
test ah, 0x40
je 0x408af1
lea eax, [esp + 0x1c]
push 0x3f800000
mov dword [ebx + 0x50], 0x3f800000
push str.LensFlareBrightness_Default_
push eax
jmp 0x408aff
mov eax, dword [ebx + 0x50]
lea ecx, [esp + 0x1c]
push eax
push str.LensFlareBrightness
push ecx
mov ecx, esi
lea ebp, [ebx + 0x54]
call fcn.00408170
lea eax, [esp + 0x1c]
push 0
push str.T_F_F_F_F
mov ecx, esi
push str.LensFlareLayersVisible
push eax
push 5
push ebp
call fcn.00408530
test eax, eax
je 0x408ba5
mov eax, dword [ebx + 0x64]
test eax, eax
mov eax, 0x4df9f4
jne 0x408b39
mov eax, 0x4df9f0
push eax
mov eax, dword [ebx + 0x60]
test eax, eax
mov eax, 0x4df9f4
jne 0x408b4b
mov eax, 0x4df9f0
push eax
mov eax, dword [ebx + 0x5c]
test eax, eax
mov eax, 0x4df9f4
jne 0x408b5d
mov eax, 0x4df9f0
push eax
mov eax, dword [ebx + 0x58]
test eax, eax
mov eax, 0x4df9f4
jne 0x408b6f
mov eax, 0x4df9f0
push eax
mov eax, dword [ebp]
test eax, eax
mov eax, 0x4df9f4
jne 0x408b81
mov eax, 0x4df9f0
lea ecx, [esp + 0x54]
push eax
lea eax, [esp + 0x30]
push eax
push str.__s_.LensFlareLayersVisible_s__s__s__s__s
push ecx
call fcn.004bd200
lea ecx, [esp + 0x64]
add esp, 0x20
push ecx
mov ecx, esi
call fcn.00408150
add ebx, 0x68
push edi
lea eax, [esp + 0x20]
push 0x40
push ebx
push 0x4df418
push str.LensFlareTextureMapName
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x408bd9
lea eax, [esp + 0x1c]
push ebx
push str.LensFlareTextureMapName
mov ecx, esi
push eax
call fcn.00408160
jmp 0x408be9
push 0x3f
push str.overlaylensflare.tga
push ebx
call fcn.004bd6d0
add esp, 0xc
push 0x4df418
jmp 0x408d69
call fcn.00408130
xor eax, eax
jmp 0x408d75
xor eax, eax
jmp 0x408d75
mov eax, dword [esi + 0x4c]
lea ecx, [ebx + ebx*4]
lea edx, [ebx + ecx*4]
xor ecx, ecx
test ebx, ebx
nop
lea edi, [eax + edx*8]
jne 0x408c67
mov dword [edi], 6
lea ebx, [esp + 0x10]
mov dword [edi + 4], 0x5a5a5a
lea edx, [edi + 0x24]
mov dword [edi + 0x14], ecx
mov dword [edi + 0x3c], ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ecx
mov eax, dword [ebx]
mov dword [edx], eax
mov ebp, dword [ebx + 4]
mov dword [edx + 4], ebp
mov ebx, dword [ebx + 8]
mov dword [edx + 8], ebx
mov dword [edi + 0x30], ecx
mov dword [edi + 0x34], ecx
mov dword [edi + 0x38], ecx
mov dword [edi + 0x40], 1
mov dword [edi + 0x44], ecx
jmp 0x408d61
lea ebx, [edi + 8]
lea ecx, [esp + 0x10]
mov dword [edi], 2
mov dword [edi + 4], 0xc8c8c8
mov dword [esp + 0x10], 0xc4fa0000
mov dword [esp + 0x14], 0x457a0000
mov dword [esp + 0x18], 0x449c8000
mov eax, dword [ecx]
mov dword [ebx], eax
mov edx, dword [ecx + 4]
mov dword [ebx + 4], edx
mov ecx, dword [ecx + 8]
mov dword [ebx + 8], ecx
xor ecx, ecx
mov dword [edi + 0x3c], ecx
fld dword [ebx]
fmul dword [ebx]
fld dword [edi + 0xc]
fmul dword [edi + 0xc]
fld dword [edi + 0x10]
fmul dword [edi + 0x10]
fxch st(1)
faddp st(2)
faddp st(1)
fcom dword [0x4d41f8]
fstp dword [esp + 0x10]
fnstsw ax
test ah, 0x40
je 0x408cd5
mov dword [esp + 0x10], ecx
jmp 0x408cec
mov eax, dword [esp + 0x10]
push eax
call fcn.00401770
fdivr dword [0x4d4208]
add esp, 4
fstp dword [esp + 0x10]
fld dword [0x4d420c]
fdiv dword [esp + 0x10]
fld dword [ebx]
fmul st(1)
lea edx, [esp + 0x10]
lea ecx, [edi + 0x18]
fstp dword [esp + 0x10]
fld dword [edi + 0xc]
fmul st(1)
fstp dword [esp + 0x14]
fmul dword [edi + 0x10]
fstp dword [esp + 0x18]
mov eax, dword [edx]
mov dword [ecx], eax
mov ebp, dword [edx + 4]
mov dword [ecx + 4], ebp
mov edx, dword [edx + 8]
mov dword [ecx + 8], edx
xor ecx, ecx
lea edx, [edi + 0x24]
mov dword [edi + 0x14], ebx
lea ebx, [esp + 0x10]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ecx
mov eax, dword [ebx]
mov dword [edx], eax
mov ebp, dword [ebx + 4]
mov eax, 1
mov dword [edx + 4], ebp
mov ebx, dword [ebx + 8]
mov dword [edx + 8], ebx
mov dword [edi + 0x30], ecx
mov dword [edi + 0x34], ecx
mov dword [edi + 0x38], ecx
mov dword [edi + 0x40], eax
mov dword [edi + 0x44], eax
push str.No_Scene_File_or_no_light_data:__Use_DEFAULT_Lights__1_Ambient__1_ObjectPoint_shadowcaster_n
mov dword [edi + 0x48], ecx
mov ecx, esi
call fcn.00408140
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x238
ret 4