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

Disassembly:
sub esp, 0xf28
mov eax, dword [esp + 0xf2c]
push ebx
push ebp
xor ebp, ebp
movsx ecx, word [eax + 0x2bc]
push esi
push edi
lea eax, [ecx + ecx*2]
mov dword [esp + 0x20], ebp
shl eax, 3
sub eax, ecx
lea ecx, [eax + eax*2]
mov eax, dword [ecx*4 + 0xecc6f0]
cmp eax, ebp
lea ebx, [ecx*4 + 0xecc6b8]
mov dword [esp + 0x24], ebx
jle 0x4370f4
mov dword [esp + 0x10], ebp
mov edi, 0x7f99b0
mov esi, dword [ebx + 0xd8]
mov edx, dword [esp + 0x10]
push ebp
push ebx
add esi, edx
call fcn.0047e9c0
add esp, 8
test eax, eax
jne 0x4370db
mov edx, dword [esi + 0x94]
push 0x444
push str.D:descent3mainNewEditoreditor_object_lighting.cpp
push edx
call fcn.004cb090
mov dword [edi], eax
mov ecx, dword [esi + 0x94]
add esp, 0xc
xor eax, eax
test ecx, ecx
jle 0x4370db
mov ecx, dword [edi]
inc eax
mov byte [eax + ecx - 1], 0
mov ecx, dword [esi + 0x94]
cmp eax, ecx
jl 0x4370c9
mov edx, dword [esp + 0x10]
mov eax, dword [ebx + 0x38]
inc ebp
add edx, 0x164
add edi, 4
cmp ebp, eax
mov dword [esp + 0x10], edx
jl 0x437088
mov eax, dword [ebx + 0x38]
xor edi, edi
cmp eax, edi
jle 0x437185
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], 0x7f99b0
mov ebp, dword [ebx + 0xd8]
mov ecx, dword [esp + 0x10]
push edi
push ebx
add ebp, ecx
call fcn.0047e9c0
add esp, 8
test eax, eax
jne 0x437164
mov eax, dword [ebp + 0x94]
xor esi, esi
test eax, eax
jle 0x437164
mov edx, dword [esp + 0x14]
mov eax, dword [edx]
cmp byte [esi + eax], 0
jne 0x437159
mov ecx, dword [esp + 0xf40]
mov edx, dword [esp + 0xf3c]
push ecx
push esi
push edi
push edx
call fcn.00436c60
add esp, 0x10
mov eax, dword [ebp + 0x94]
inc esi
cmp esi, eax
jl 0x437133
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov eax, dword [ebx + 0x38]
inc edi
add edx, 0x164
add ecx, 4
cmp edi, eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ecx
jl 0x43710d
mov eax, dword [ebx + 0x38]
xor esi, esi
cmp eax, esi
mov dword [esp + 0x10], esi
jle 0x4372bb
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], 0x7f99b0
mov edi, dword [ebx + 0xd8]
mov ecx, dword [esp + 0x18]
push esi
push ebx
add edi, ecx
call fcn.0047e9c0
add esp, 8
test eax, eax
jne 0x437292
mov eax, dword [edi + 0x94]
xor ecx, ecx
test eax, eax
mov dword [esp + 0x14], ecx
jle 0x437292
xor ebp, ebp
mov eax, dword [esp + 0x1c]
mov edx, dword [eax]
cmp byte [edx + ecx], 0
jne 0x437278
mov eax, dword [edi + 0x78]
xor esi, esi
add eax, ebp
cmp byte [eax], 0
jle 0x43722e
lea ebx, [esp + 0x38]
mov ecx, dword [eax + 4]
mov eax, dword [esp + 0x10]
movsx edx, word [ecx + esi*2]
mov ecx, dword [esp + 0xf3c]
push edx
push eax
push ecx
push ebx
call fcn.00433c30
mov edx, dword [edi + 0x78]
add esp, 0x10
inc esi
add ebx, 0xc
movsx ecx, byte [edx + ebp]
lea eax, [edx + ebp]
cmp esi, ecx
jl 0x4371f6
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0xf40]
mov dword [esp + 0x28], ecx
mov ecx, dword [edi + 0x78]
mov dword [esp + 0x30], edx
push eax
movsx edx, byte [ecx + ebp]
lea eax, [esp + 0x3c]
push edx
push eax
mov eax, dword [esp + 0xf48]
lea ecx, [esp + 0x34]
push 1
lea edx, [esp + 0x40]
push ecx
push edx
push eax
call fcn.004354d0
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x30]
add esp, 0x1c
inc eax
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0x94]
inc ecx
add ebp, 0x24
cmp ecx, eax
mov dword [esp + 0x14], ecx
jl 0x4371d6
mov esi, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov eax, dword [ebx + 0x38]
inc esi
add edx, 0x164
add ecx, 4
cmp esi, eax
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ecx
jl 0x4371a2
mov eax, dword [ebx + 0x38]
xor esi, esi
test eax, eax
jle 0x4372ed
mov edi, 0x7f99b0
push esi
push ebx
call fcn.0047e9c0
add esp, 8
test eax, eax
jne 0x4372e2
mov ecx, dword [edi]
push ecx
call fcn.004cb110
add esp, 4
mov eax, dword [ebx + 0x38]
inc esi
add edi, 4
cmp esi, eax
jl 0x4372c9
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xf28
ret