Function at 0x405d00
Capabilities:
Get file attributes
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.0040b5f7
pop ecx
pop ecx
test eax, eax
jne 0x405d1e
mov eax, 0x80004005
jmp 0x405d66
mov eax, dword [ebp + 0x1c]
push ebx
push esi
push edi
xor edi, edi
lea ecx, [ebp - 0x30]
mov dword [ebp - 4], edi
mov dword [ebp + 0x10], edi
mov dword [eax], edi
call fcn.0040c1ef
mov ebx, dword [ebp + 0x18]
mov esi, ebx
and esi, 4
jne 0x405d45
test bl, 2
je 0x405d6a
push edi
mov edi, dword [ebp + 0x14]
push 1
push edi
lea ecx, [ebp - 0x30]
call fcn.0040be61
test al, al
jne 0x405d6d
lea ecx, [ebp - 0x30]
call fcn.0040bd65
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 0x18
mov edi, dword [ebp + 0x14]
test edi, edi
je 0x405ecf
cmp word [edi], 0
je 0x405ecf
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405d84
sub eax, edx
sar eax, 1
cmp word [edi + eax*2 - 2], 0x2e
je 0x405ecf
test esi, esi
je 0x405e13
and dword [ebp - 8], 0
mov dword [ebp - 0xc], 0xc0000000
mov dword [ebp + 0x18], 2
mov eax, ebx
and eax, 0x28
cmp al, 0x28
je 0x405e23
mov esi, ebx
and esi, 8
add esi, esi
mov eax, ebx
and eax, 0x20
or esi, eax
and bl, 0x40
movsx eax, bl
shl esi, 0x17
neg eax
sbb eax, eax
push 0
and eax, 0x4000080
sub eax, 0xffffff80
or esi, eax
push esi
push dword [ebp + 0x18]
push 0
push dword [ebp - 8]
push dword [ebp - 0xc]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
call edi
mov dword [ebp + 0x10], eax
cmp eax, 0xffffffff
jne 0x405e58
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
mov esi, dword [ebp - 4]
jmp 0x405f09
test bl, 2
je 0x405e43
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x405e2c
mov dword [ebp - 4], 1
jmp 0x405e0b
and dword [ebp - 8], 0
mov dword [ebp - 0xc], 0xc0000000
mov dword [ebp + 0x18], 3
jmp 0x405db5
test bl, 1
je 0x405e23
mov dword [ebp - 0xc], SysReAllocString
mov dword [ebp - 8], 1
jmp 0x405e37
test esi, 0x10000000
je 0x405ed6
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
jne 0x405e7f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x405ed6
mov ecx, dword [ebp - 0x10]
xor eax, eax
or eax, dword [ebp - 0x14]
xor edx, edx
or ecx, edx
mov dword [ebp - 0x14], ecx
ja 0x405e97
cmp eax, 0xee6b280
jbe 0x405ed6
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
push ebx
and esi, 0xefffffff
push esi
push dword [ebp + 0x18]
push ebx
push dword [ebp - 8]
push dword [ebp - 0xc]
push dword [ebp + 0x14]
call edi
mov dword [ebp + 0x10], eax
cmp eax, 0xffffffff
jne 0x405ed6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
mov dword [ebp + 0x10], ebx
jmp 0x405ed6
mov dword [ebp - 4], 1
cmp dword [ebp + 0x10], 0
je 0x405e0b
push dword [ebp + 0x1c]
mov eax, dword [ebp + 8]
push dword [ebp + 0x10]
add eax, 8
push eax
call fcn.00408cf9
add esp, 0xc
test al, al
jne 0x405e0b
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
inc esi
lea ecx, [ebp - 0x30]
call fcn.0040bd65
mov eax, esi
jmp 0x405d63