Function at 0x40be40
Capabilities:
Access peb ldr_data

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42c86c
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x68
mov eax, dword [0x43e070]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebx + 8]
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x64], 0
mov ecx, esi
mov dword [ebp - 4], 1
call fcn.004053a0
push str.Models
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x64], 1
push eax
push str.Resources
lea eax, [ebp - 0x50]
mov ecx, 0x43f9c8
push eax
call fcn.00402aa0
mov ecx, eax
call fcn.00402aa0
cmp dword [ebx + 0x20], 0x10
lea eax, [ebx + 0xc]
cmovae eax, dword [ebx + 0xc]
push eax
push ecx
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x4c]
call fcn.00402ba0
push str.path
lea eax, [ebp - 0x70]
push eax
push str.Mesh
lea eax, [ebp - 0x60]
push eax
lea ecx, [ebp - 0x48]
call fcn.00402aa0
mov ecx, eax
call fcn.00402b20
mov edx, dword [eax]
test edx, edx
je 0x40bf0a
mov edx, dword [edx + 8]
test edx, edx
jne 0x40bf0f
mov edx, 0x437fe3
mov dword [ebp - 0x30], 0xf
mov dword [ebp - 0x34], 0
mov byte [ebp - 0x44], 0
cmp byte [edx], 0
jne 0x40bf2a
xor ecx, ecx
jmp 0x40bf39
mov ecx, edx
lea edi, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40bf30
sub ecx, edi
push ecx
push edx
lea ecx, [ebp - 0x44]
call fcn.00403310
sub esp, 0x18
mov byte [ebp - 4], 2
mov ecx, esp
mov dword [ebp - 0x4c], esp
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
cmp dword [ecx + 0x14], 0x10
jb 0x40bf67
mov eax, dword [ecx]
jmp 0x40bf69
mov eax, ecx
push 0xffffffffffffffff
mov byte [eax], 0
lea eax, [ebp - 0x44]
push 0
push eax
call fcn.00403410
mov byte [ebp - 4], 3
mov eax, dword fs:[0x2c]
mov edi, dword [eax]
mov eax, dword [0x43facc]
cmp eax, dword [edi + 4]
jle 0x40bfcf
push 0x43facc
call fcn.0040f025
add esp, 4
cmp dword [0x43facc], 0xffffffff
jne 0x40bfcf
mov byte [ebp - 4], 4
call fcn.00407580
push 0x42cb90
call fcn.0040f3cc
add esp, 4
mov byte [ebp - 4], 3
push 0x43facc
call fcn.0040efe6
add esp, 4
mov ecx, 0x43faa0
mov byte [ebp - 4], 2
call fcn.0040a6c0
mov dword [esi + 4], eax
lea ecx, [ebp - 0x48]
push str.Material
lea eax, [ebp - 0x50]
push eax
call fcn.00402aa0
push str.Texture
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x50]
call fcn.00402aa0
push str.PhongParameters
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x50]
call fcn.00402aa0
push str.path
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebp - 0x4c]
call fcn.00402b20
mov edx, dword [eax]
test edx, edx
je 0x40c031
mov edx, dword [edx + 8]
test edx, edx
jne 0x40c036
mov edx, 0x437fe3
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x2c], 0
cmp byte [edx], 0
jne 0x40c051
xor ecx, ecx
jmp 0x40c06a
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x4c], eax
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40c060
sub ecx, dword [ebp - 0x4c]
push ecx
push edx
lea ecx, [ebp - 0x2c]
call fcn.00403310
sub esp, 0x18
mov byte [ebp - 4], 5
mov ecx, esp
mov dword [ebp - 0x60], esp
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
cmp dword [ecx + 0x14], 0x10
jb 0x40c098
mov eax, dword [ecx]
jmp 0x40c09a
mov eax, ecx
push 0xffffffffffffffff
mov byte [eax], 0
lea eax, [ebp - 0x2c]
push 0
push eax
call fcn.00403410
mov byte [ebp - 4], 6
mov eax, dword [0x43facc]
cmp eax, dword [edi + 4]
jle 0x40c0f8
push 0x43facc
call fcn.0040f025
add esp, 4
cmp dword [0x43facc], 0xffffffff
jne 0x40c0f8
mov byte [ebp - 4], 7
call fcn.00407580
push 0x42cb90
call fcn.0040f3cc
add esp, 4
mov byte [ebp - 4], 6
push 0x43facc
call fcn.0040efe6
add esp, 4
mov ecx, 0x43faa0
mov byte [ebp - 4], 5
call fcn.0040a850
mov dword [esi + 8], eax
lea ecx, [ebp - 0x48]
push str.diffuse
lea eax, [ebp - 0x60]
push eax
call fcn.00402b20
mov edi, dword [eax]
test edi, edi
je 0x40c127
mov edi, dword [edi + 8]
test edi, edi
jne 0x40c12c
mov edi, 0x437fe3
push str.ambient
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x48]
call fcn.00402b20
mov eax, dword [eax]
test eax, eax
je 0x40c14d
mov eax, dword [eax + 8]
mov dword [ebp - 0x50], eax
test eax, eax
jne 0x40c154
mov dword [ebp - 0x50], 0x437fe3
push str.specular
lea eax, [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x48]
call fcn.00402b20
mov eax, dword [eax]
test eax, eax
je 0x40c175
mov eax, dword [eax + 8]
mov dword [ebp - 0x4c], eax
test eax, eax
jne 0x40c17c
mov dword [ebp - 0x4c], 0x437fe3
push str.shininess
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x48]
call fcn.00402b20
mov eax, dword [eax]
test eax, eax
je 0x40c19d
mov eax, dword [eax + 8]
mov dword [ebp - 0x48], eax
test eax, eax
jne 0x40c1a4
mov dword [ebp - 0x48], 0x437fe3
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x54]
push eax
push str._f__f__f
push edi
call fcn.0040b250
movss xmm0, dword [ebp - 0x54]
lea eax, [ebp - 0x5c]
add esp, 0x14
movss dword [esi + 0x20], xmm0
movss xmm0, dword [ebp - 0x58]
movss dword [esi + 0x24], xmm0
movss xmm0, dword [ebp - 0x5c]
push eax
lea eax, [ebp - 0x58]
movss dword [esi + 0x28], xmm0
push eax
lea eax, [ebp - 0x54]
mov dword [esi + 0x2c], 0x3f800000
push eax
push str._f__f__f
push dword [ebp - 0x50]
call fcn.0040b250
movss xmm0, dword [ebp - 0x54]
lea eax, [ebp - 0x5c]
add esp, 0x14
movss dword [esi + 0x10], xmm0
movss xmm0, dword [ebp - 0x58]
movss dword [esi + 0x14], xmm0
movss xmm0, dword [ebp - 0x5c]
push eax
lea eax, [ebp - 0x58]
movss dword [esi + 0x18], xmm0
push eax
lea eax, [ebp - 0x54]
mov dword [esi + 0x1c], 0x3f800000
push eax
push str._f__f__f
push dword [ebp - 0x4c]
call fcn.0040b250
movss xmm0, dword [ebp - 0x54]
lea eax, [ebp - 0x68]
add esp, 0x14
movss dword [esi + 0x30], xmm0
movss xmm0, dword [ebp - 0x58]
movss dword [esi + 0x34], xmm0
movss xmm0, dword [ebp - 0x5c]
push eax
push 0x43876c
push dword [ebp - 0x48]
movss dword [esi + 0x38], xmm0
mov dword [esi + 0x3c], 0x3f800000
call fcn.0040b250
movss xmm0, dword [ebp - 0x68]
lea ecx, [ebp - 0x2c]
add esp, 0xc
movss dword [esi + 0x40], xmm0
call fcn.00403190
lea ecx, [ebp - 0x44]
call fcn.00403190
lea ecx, [ebx + 0xc]
call fcn.00403190
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040eedb
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x1c