Function at 0x41d549
Capabilities:
Check if file exists
Get file attributes
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a8928
mov eax, dword fs:[0]
push eax
mov eax, 0x105c
call fcn.00477a70
mov eax, dword [0x4f9340]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1044], eax
mov eax, dword [ebp + 0xc]
mov edi, ecx
push edi
mov dword [ebp - 0x1038], eax
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x41d5a6
xor eax, eax
jmp 0x41d77a
push esi
and eax, 0x10
mov dword [ebp - 0x1058], eax
shl eax, 0x15
push eax
push 3
push esi
push 1
push SysReAllocStringLen
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1050], eax
cmp eax, 0xffffffff
je 0x41d59f
lea ecx, [ebp - 0x1068]
push ecx
push esi
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileTime]
lea eax, [ebp - 0x1060]
push eax
lea eax, [ebp - 0x1068]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
lea eax, [ebp - 0x1048]
push eax
lea eax, [ebp - 0x104c]
push eax
lea eax, [ebp - 0x1060]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
push 9
xor eax, eax
pop ecx
push dword [ebp - 0x1038]
lea edi, [ebp - 0x1034]
rep stosd dword es:[edi], eax
movzx eax, word [ebp - 0x104c]
movzx ecx, word [ebp - 0x1048]
or dword [ebp - 0x1014], ebx
shl eax, 0x10
or eax, ecx
lea ecx, [ebp - 0x1054]
mov dword [ebp - 0x101c], eax
call fcn.00431491
mov dword [ebp - 4], esi
push 9
push 8
push esi
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x1034]
push eax
push dword [ebp - 0x1054]
push dword [ebp - 0x1044]
call fcn.00403510
add esp, 0x28
test eax, eax
jne 0x41d74e
cmp dword [ebp - 0x1058], esi
jne 0x41d74e
mov dword [ebp - 0x1040], esi
lea edi, [ebp - 0x103c]
stosd dword es:[edi], eax
lea eax, [ebp - 0x1040]
push eax
push dword [ebp - 0x1050]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x41d74e
cmp dword [ebp - 0x103c], esi
jl 0x41d74b
mov eax, dword [ebp - 0x1040]
jg 0x41d6cb
cmp eax, esi
jbe 0x41d74b
mov edi, 0x1000
cmp dword [ebp - 0x103c], esi
jl 0x41d6e0
jg 0x41d6de
cmp eax, edi
jbe 0x41d6e0
mov eax, edi
push esi
lea ecx, [ebp - 0x1038]
push ecx
push eax
lea eax, [ebp - 0x1010]
push eax
push dword [ebp - 0x1050]
mov dword [ebp - 0x1038], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41d74e
push dword [ebp - 0x1038]
lea eax, [ebp - 0x1010]
push eax
push dword [ebp - 0x1044]
call fcn.00403670
add esp, 0xc
test eax, eax
js 0x41d74e
mov eax, dword [ebp - 0x1040]
sub eax, dword [ebp - 0x1038]
sbb dword [ebp - 0x103c], esi
mov dword [ebp - 0x1040], eax
cmp dword [ebp - 0x103c], esi
jg 0x41d6de
jl 0x41d74b
cmp eax, esi
ja 0x41d6d0
xor esi, esi
inc esi
push dword [ebp - 0x1044]
call fcn.00403fa0
pop ecx
push dword [ebp - 0x1050]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x1054]
add ecx, 0xfffffff0
call fcn.00409a10
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00473108
leave
ret