Function at 0x40d860
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 0x43033c
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x68
mov eax, dword [0x443070]
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.00405730
push str.Models
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x64], 1
push eax
push str.Resources
lea eax, [ebp - 0x50]
mov ecx, 0x444b30
push eax
call fcn.00402ac0
mov ecx, eax
call fcn.00402ac0
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.00402bc0
push str.path
lea eax, [ebp - 0x70]
push eax
push str.Mesh
lea eax, [ebp - 0x60]
push eax
lea ecx, [ebp - 0x48]
call fcn.00402ac0
mov ecx, eax
call fcn.00402b40
mov edx, dword [eax]
test edx, edx
je 0x40d92a
mov edx, dword [edx + 8]
test edx, edx
jne 0x40d92f
mov edx, 0x43c033
mov dword [ebp - 0x30], 0xf
mov dword [ebp - 0x34], 0
mov byte [ebp - 0x44], 0
cmp byte [edx], 0
jne 0x40d94a
xor ecx, ecx
jmp 0x40d959
mov ecx, edx
lea edi, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40d950
sub ecx, edi
push ecx
push edx
lea ecx, [ebp - 0x44]
call fcn.004034b0
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 0x40d987
mov eax, dword [ecx]
jmp 0x40d989
mov eax, ecx
push 0xffffffffffffffff
mov byte [eax], 0
lea eax, [ebp - 0x44]
push 0
push eax
call fcn.004035b0
mov byte [ebp - 4], 3
mov eax, dword fs:[0x2c]
mov edi, dword [eax]
mov eax, dword [0x444c3c]
cmp eax, dword [edi + 4]
jle 0x40d9ef
push 0x444c3c
call fcn.004129bf
add esp, 4
cmp dword [0x444c3c], 0xffffffff
jne 0x40d9ef
mov byte [ebp - 4], 4
call fcn.00407fb0
push 0x4308b0
call fcn.00412d49
add esp, 4
mov byte [ebp - 4], 3
push 0x444c3c
call fcn.00412980
add esp, 4
mov ecx, 0x444c10
mov byte [ebp - 4], 2
call fcn.0040ba90
mov dword [esi + 8], eax
lea ecx, [ebp - 0x48]
push str.Material
lea eax, [ebp - 0x50]
push eax
call fcn.00402ac0
push str.Texture
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x50]
call fcn.00402ac0
push str.PhongParameters
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x50]
call fcn.00402ac0
push str.path
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebp - 0x4c]
call fcn.00402b40
mov edx, dword [eax]
test edx, edx
je 0x40da51
mov edx, dword [edx + 8]
test edx, edx
jne 0x40da56
mov edx, 0x43c033
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x2c], 0
cmp byte [edx], 0
jne 0x40da71
xor ecx, ecx
jmp 0x40da8a
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 0x40da80
sub ecx, dword [ebp - 0x4c]
push ecx
push edx
lea ecx, [ebp - 0x2c]
call fcn.004034b0
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 0x40dab8
mov eax, dword [ecx]
jmp 0x40daba
mov eax, ecx
push 0xffffffffffffffff
mov byte [eax], 0
lea eax, [ebp - 0x2c]
push 0
push eax
call fcn.004035b0
mov byte [ebp - 4], 6
mov eax, dword [0x444c3c]
cmp eax, dword [edi + 4]
jle 0x40db18
push 0x444c3c
call fcn.004129bf
add esp, 4
cmp dword [0x444c3c], 0xffffffff
jne 0x40db18
mov byte [ebp - 4], 7
call fcn.00407fb0
push 0x4308b0
call fcn.00412d49
add esp, 4
mov byte [ebp - 4], 6
push 0x444c3c
call fcn.00412980
add esp, 4
mov ecx, 0x444c10
mov byte [ebp - 4], 5
call fcn.0040bc20
mov dword [esi + 0xc], eax
lea ecx, [ebp - 0x48]
push str.diffuse
lea eax, [ebp - 0x60]
push eax
call fcn.00402b40
mov edi, dword [eax]
test edi, edi
je 0x40db47
mov edi, dword [edi + 8]
test edi, edi
jne 0x40db4c
mov edi, 0x43c033
push str.ambient
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x48]
call fcn.00402b40
mov eax, dword [eax]
test eax, eax
je 0x40db6d
mov eax, dword [eax + 8]
mov dword [ebp - 0x50], eax
test eax, eax
jne 0x40db74
mov dword [ebp - 0x50], 0x43c033
push str.specular
lea eax, [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x48]
call fcn.00402b40
mov eax, dword [eax]
test eax, eax
je 0x40db95
mov eax, dword [eax + 8]
mov dword [ebp - 0x4c], eax
test eax, eax
jne 0x40db9c
mov dword [ebp - 0x4c], 0x43c033
push str.shininess
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x48]
call fcn.00402b40
mov eax, dword [eax]
test eax, eax
je 0x40dbbd
mov eax, dword [eax + 8]
mov dword [ebp - 0x48], eax
test eax, eax
jne 0x40dbc4
mov dword [ebp - 0x48], 0x43c033
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.0040c620
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.0040c620
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.0040c620
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 0x43c96c
push dword [ebp - 0x48]
movss dword [esi + 0x38], xmm0
mov dword [esi + 0x3c], 0x3f800000
call fcn.0040c620
movss xmm0, dword [ebp - 0x68]
lea ecx, [ebp - 0x2c]
add esp, 0xc
movss dword [esi + 0x40], xmm0
call fcn.00403330
lea ecx, [ebp - 0x44]
call fcn.00403330
lea ecx, [ebx + 0xc]
call fcn.00403330
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.00412858
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x1c