Function at 0x404cde
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.0040aa99
pop ecx
pop ecx
test eax, eax
jne 0x404cfc
mov eax, 0x80004005
jmp 0x404d44
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.0040b652
mov ebx, dword [ebp + 0x18]
mov esi, ebx
and esi, 4
jne 0x404d23
test bl, 2
je 0x404d48
push edi
mov edi, dword [ebp + 0x14]
push 1
push edi
lea ecx, [ebp - 0x30]
call fcn.0040b2c2
test al, al
jne 0x404d4b
lea ecx, [ebp - 0x30]
call fcn.0040b1c6
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 0x18
mov edi, dword [ebp + 0x14]
test edi, edi
je 0x404ead
cmp word [edi], 0
je 0x404ead
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404d62
sub eax, edx
sar eax, 1
cmp word [edi + eax*2 - 2], 0x2e
je 0x404ead
test esi, esi
je 0x404df1
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 0x404e01
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 0x404e36
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
mov esi, dword [ebp - 4]
jmp 0x404ee7
test bl, 2
je 0x404e21
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x404e0a
mov dword [ebp - 4], 1
jmp 0x404de9
and dword [ebp - 8], 0
mov dword [ebp - 0xc], 0xc0000000
mov dword [ebp + 0x18], 3
jmp 0x404d93
test bl, 1
je 0x404e01
mov dword [ebp - 0xc], SysReAllocString
mov dword [ebp - 8], 1
jmp 0x404e15
test esi, 0x10000000
je 0x404eb4
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 0x404e5d
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x404eb4
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 0x404e75
cmp eax, 0xee6b280
jbe 0x404eb4
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 0x404eb4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
mov dword [ebp + 0x10], ebx
jmp 0x404eb4
mov dword [ebp - 4], 1
cmp dword [ebp + 0x10], 0
je 0x404de9
push dword [ebp + 0x1c]
mov eax, dword [ebp + 8]
push dword [ebp + 0x10]
add eax, 8
push eax
call fcn.004081eb
add esp, 0xc
test al, al
jne 0x404de9
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
inc esi
lea ecx, [ebp - 0x30]
call fcn.0040b1c6
mov eax, esi
jmp 0x404d41