Function at 0x405d01
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.0040b565
pop ecx
pop ecx
test eax, eax
jne 0x405d1f
mov eax, 0x80004005
jmp 0x405d67
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.0040c202
mov ebx, dword [ebp + 0x18]
mov esi, ebx
and esi, 4
jne 0x405d46
test bl, 2
je 0x405d6b
push edi
mov edi, dword [ebp + 0x14]
push 1
push edi
lea ecx, [ebp - 0x30]
call fcn.0040be74
test al, al
jne 0x405d6e
lea ecx, [ebp - 0x30]
call fcn.0040bd78
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 0x18
mov edi, dword [ebp + 0x14]
test edi, edi
je 0x405ed0
cmp word [edi], 0
je 0x405ed0
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405d85
sub eax, edx
sar eax, 1
cmp word [edi + eax*2 - 2], 0x2e
je 0x405ed0
test esi, esi
je 0x405e14
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 0x405e24
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 0x405e59
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
mov esi, dword [ebp - 4]
jmp 0x405f0a
test bl, 2
je 0x405e44
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x405e2d
mov dword [ebp - 4], 1
jmp 0x405e0c
and dword [ebp - 8], 0
mov dword [ebp - 0xc], 0xc0000000
mov dword [ebp + 0x18], 3
jmp 0x405db6
test bl, 1
je 0x405e24
mov dword [ebp - 0xc], SysReAllocString
mov dword [ebp - 8], 1
jmp 0x405e38
test esi, 0x10000000
je 0x405ed7
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 0x405e80
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x405ed7
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 0x405e98
cmp eax, 0xee6b280
jbe 0x405ed7
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 0x405ed7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
mov dword [ebp + 0x10], ebx
jmp 0x405ed7
mov dword [ebp - 4], 1
cmp dword [ebp + 0x10], 0
je 0x405e0c
push dword [ebp + 0x1c]
mov eax, dword [ebp + 8]
push dword [ebp + 0x10]
add eax, 8
push eax
call fcn.00408d0c
add esp, 0xc
test al, al
jne 0x405e0c
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
inc esi
lea ecx, [ebp - 0x30]
call fcn.0040bd78
mov eax, esi
jmp 0x405d64