Function at 0x405a40
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
mov eax, dword [0x42f00c]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov dword [ebp - 0x140], ecx
lea ecx, [ebp - 0x118]
push 3
mov dword [ebp - 0x11c], ecx
lea ecx, [ebp - 0x11c]
push eax
mov dword [ebp - 0x144], esi
call fcn.00405f80
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push dword [ebp - 0x11c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
lea ecx, [ebp - 0x118]
mov eax, dword [ebp - 0x11c]
cmp eax, ecx
je 0x405aba
push eax
call fcn.0041571d
add esp, 4
cmp edi, 0xffffffff
jne 0x405add
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, 0x80004005
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406933
mov esp, ebp
pop ebp
ret 0xc
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x124]
push 0
push eax
push 4
push esi
push edi
call ebx
test eax, eax
je 0x405ce9
cmp dword [esi], 0
mov dword [ebp - 0x130], 0
jbe 0x405ccd
nop
push 0
lea eax, [ebp - 0x124]
push eax
push 4
lea eax, [ebp - 0x12c]
push eax
push edi
call ebx
test eax, eax
je 0x405ce9
push 0
lea eax, [ebp - 0x124]
push eax
push 4
lea eax, [ebp - 0x128]
push eax
push edi
call ebx
test eax, eax
je 0x405ce9
lea eax, [ebp - 0x120]
mov dword [ebp - 0x120], 0
push eax
push dword [0x42f964]
push 0x12
push 0x220
push dword [ebp - 0x12c]
push dword [ebp - 0x128]
call dword [sym.imp.d3dx9_43.dll_D3DXCreateMeshFVF]
test eax, eax
js 0x405cf0
mov eax, dword [ebp - 0x120]
lea edx, [ebp - 0x134]
push edx
push 0
push eax
mov ecx, dword [eax]
call dword [ecx + 0x3c]
push 0
lea eax, [ebp - 0x124]
push eax
mov eax, dword [ebp - 0x12c]
lea eax, [eax + eax*2]
shl eax, 3
push eax
push dword [ebp - 0x134]
push edi
call ebx
test eax, eax
je 0x405ce9
mov eax, dword [ebp - 0x120]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x40]
mov eax, dword [ebp - 0x120]
lea edx, [ebp - 0x138]
push edx
push 0
push eax
mov ecx, dword [eax]
call dword [ecx + 0x44]
push 0
lea eax, [ebp - 0x124]
push eax
mov eax, dword [ebp - 0x128]
lea eax, [eax + eax*2]
add eax, eax
push eax
push dword [ebp - 0x138]
push edi
call ebx
test eax, eax
je 0x405ce9
mov eax, dword [ebp - 0x120]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x48]
mov eax, dword [ebp - 0x120]
lea edx, [ebp - 0x13c]
push edx
push 0
push eax
mov ecx, dword [eax]
call dword [ecx + 0x60]
mov eax, dword [ebp - 0x120]
xor esi, esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10]
test eax, eax
je 0x405c5e
nop dword [eax + eax]
mov eax, dword [ebp - 0x13c]
mov dword [eax + esi*4], 0
inc esi
mov eax, dword [ebp - 0x120]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10]
cmp esi, eax
jb 0x405c40
mov eax, dword [ebp - 0x120]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x64]
mov eax, dword [ebp - 0x128]
lea edx, [ebp - 0x18]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x12c]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x120]
push 1
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0xc], 0
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x70]
mov esi, dword [ebp - 0x130]
mov ecx, dword [ebp - 0x140]
mov eax, dword [ebp - 0x120]
mov dword [ecx + esi*4], eax
inc esi
mov eax, dword [ebp - 0x144]
mov dword [ebp - 0x130], esi
cmp esi, dword [eax]
jb 0x405b10
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406933
mov esp, ebp
pop ebp
ret 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, 0x80004005
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.00406933
mov esp, ebp
pop ebp
ret 0xc