Function at 0x405cf3
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.0040b61b
pop ecx
pop ecx
test eax, eax
jne 0x405d11
mov eax, 0x80004005
jmp 0x405d59
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.0040c23c
mov ebx, dword [ebp + 0x18]
mov esi, ebx
and esi, 4
jne 0x405d38
test bl, 2
je 0x405d5d
push edi
mov edi, dword [ebp + 0x14]
push 1
push edi
lea ecx, [ebp - 0x30]
call fcn.0040beae
test al, al
jne 0x405d60
lea ecx, [ebp - 0x30]
call fcn.0040bdb2
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 0x18
mov edi, dword [ebp + 0x14]
test edi, edi
je 0x405ec2
cmp word [edi], 0
je 0x405ec2
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405d77
sub eax, edx
sar eax, 1
cmp word [edi + eax*2 - 2], 0x2e
je 0x405ec2
test esi, esi
je 0x405e06
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 0x405e16
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 0x405e4b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
mov esi, dword [ebp - 4]
jmp 0x405efc
test bl, 2
je 0x405e36
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x405e1f
mov dword [ebp - 4], 1
jmp 0x405dfe
and dword [ebp - 8], 0
mov dword [ebp - 0xc], 0xc0000000
mov dword [ebp + 0x18], 3
jmp 0x405da8
test bl, 1
je 0x405e16
mov dword [ebp - 0xc], SysReAllocString
mov dword [ebp - 8], 1
jmp 0x405e2a
test esi, 0x10000000
je 0x405ec9
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 0x405e72
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x405ec9
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 0x405e8a
cmp eax, 0xee6b280
jbe 0x405ec9
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 0x405ec9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
mov dword [ebp + 0x10], ebx
jmp 0x405ec9
mov dword [ebp - 4], 1
cmp dword [ebp + 0x10], 0
je 0x405dfe
push dword [ebp + 0x1c]
mov eax, dword [ebp + 8]
push dword [ebp + 0x10]
add eax, 8
push eax
call fcn.00408d46
add esp, 0xc
test al, al
jne 0x405dfe
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
inc esi
lea ecx, [ebp - 0x30]
call fcn.0040bdb2
mov eax, esi
jmp 0x405d56