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

Disassembly:
push 0xffffffffffffffff
push 0x4309b8
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.0040bb20
add esp, 8
test eax, eax
jne 0x404f97
mov eax, 0x80004005
jmp 0x405060
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.0040c790
mov ebx, dword [esp + 0x5c]
mov ebp, ebx
and ebp, 4
mov dword [esp + 0x44], esi
jne 0x404fc6
test bl, 2
je 0x404ff3
mov edi, dword [esp + 0x58]
push esi
push 1
push edi
lea ecx, [esp + 0x30]
call fcn.0040c520
test al, al
jne 0x404ff7
lea ecx, [esp + 0x24]
mov dword [esp + 0x44], 0xffffffff
call fcn.0040c070
mov eax, 1
jmp 0x405060
mov edi, dword [esp + 0x58]
cmp edi, esi
je 0x405043
cmp word [edi], si
je 0x405043
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x405005
sub eax, edx
sar eax, 1
cmp word [edi + eax*2 - 2], 0x2e
je 0x405043
cmp ebp, esi
je 0x405033
mov ebp, 0xc0000000
mov dword [esp + 0x14], esi
mov dword [esp + 0x5c], 2
jmp 0x40509b
test bl, 2
je 0x405081
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x405076
mov dword [esp + 0x50], 1
lea ecx, [esp + 0x24]
mov dword [esp + 0x44], 0xffffffff
call fcn.0040c070
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 0x405093
test bl, 1
je 0x405043
mov ebp, SysReAllocString
mov dword [esp + 0x14], 1
mov dword [esp + 0x5c], 3
mov eax, ebx
and eax, 0x28
cmp al, 0x28
je 0x405043
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 0x4050f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x50], eax
jmp 0x40504b
test esi, 0x10000000
je 0x405166
lea ecx, [esp + 0x18]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
jne 0x405120
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x405166
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 0x40513b
cmp eax, 0xee6b280
jbe 0x405166
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 0x4050ea
test edi, edi
je 0x40504b
mov edx, dword [esp + 0x60]
push edx
push edi
call fcn.00408fc0
add esp, 8
test al, al
jne 0x40504b
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x404fdb