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

Disassembly:
push 0xffffffffffffffff
push 0x430b28
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push ebp
push esi
push edi
mov eax, dword [0x43c510]
xor eax, esp
push eax
lea eax, [esp + 0x3c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x50]
push eax
push ecx
call fcn.0040bc10
add esp, 8
test eax, eax
jne 0x404fc7
mov eax, 0x80004005
jmp 0x405090
mov edx, dword [esp + 0x60]
xor esi, esi
mov dword [esp + 0x50], esi
mov dword [edx], esi
call dword [0x43c4f0]
lea ecx, [esp + 0x24]
call fcn.0040c830
mov ebx, dword [esp + 0x5c]
mov ebp, ebx
and ebp, 4
mov dword [esp + 0x44], esi
jne 0x404ff6
test bl, 2
je 0x405023
mov edi, dword [esp + 0x58]
push esi
push 1
push edi
lea ecx, [esp + 0x30]
call fcn.0040c5c0
test al, al
jne 0x405027
lea ecx, [esp + 0x24]
mov dword [esp + 0x44], 0xffffffff
call fcn.0040c110
mov eax, 1
jmp 0x405090
mov edi, dword [esp + 0x58]
cmp edi, esi
je 0x405073
cmp word [edi], si
je 0x405073
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x405035
sub eax, edx
sar eax, 1
cmp word [edi + eax*2 - 2], 0x2e
je 0x405073
cmp ebp, esi
je 0x405063
mov ebp, 0xc0000000
mov dword [esp + 0x14], esi
mov dword [esp + 0x5c], 2
jmp 0x4050cb
test bl, 2
je 0x4050b1
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x4050a6
mov dword [esp + 0x50], 1
lea ecx, [esp + 0x24]
mov dword [esp + 0x44], 0xffffffff
call fcn.0040c110
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret 0x18
mov ebp, 0xc0000000
mov dword [esp + 0x14], esi
jmp 0x4050c3
test bl, 1
je 0x405073
mov ebp, SysReAllocString
mov dword [esp + 0x14], 1
mov dword [esp + 0x5c], 3
mov eax, ebx
and eax, 0x28
cmp al, 0x28
je 0x405073
mov edx, dword [esp + 0x5c]
mov esi, ebx
mov ecx, ebx
mov eax, dword [esp + 0x14]
and esi, 8
add esi, esi
and ecx, 0x20
or esi, ecx
and bl, 0x40
shl esi, 0x17
neg bl
push 0
sbb ebx, ebx
and ebx, 0x4000080
add ebx, 0x80
or esi, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
push esi
push edx
push 0
push eax
push ebp
push edi
call ebx
mov edi, eax
cmp edi, 0xffffffff
jne 0x405129
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x50], eax
jmp 0x40507b
test esi, 0x10000000
je 0x405196
lea ecx, [esp + 0x18]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
jne 0x405150
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x405196
mov edx, dword [esp + 0x18]
xor eax, eax
or eax, dword [esp + 0x1c]
xor ecx, ecx
or edx, ecx
mov dword [esp + 0x20], edx
ja 0x40516b
cmp eax, 0xee6b280
jbe 0x405196
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x58]
push 0
and esi, 0xefffffff
push esi
push edx
push 0
push eax
push ebp
push ecx
call ebx
mov edi, eax
cmp edi, 0xffffffff
je 0x40511a
test edi, edi
je 0x40507b
mov edx, dword [esp + 0x60]
push edx
push edi
call fcn.00409050
add esp, 8
test al, al
jne 0x40507b
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40500b