Function at 0x417840
Capabilities:
Get common file path
Get file size
Read file on windows

Disassembly:
push 0x264
mov eax, 0x45fc51
call fcn.0043c548
mov edi, ecx
or dword [ebp - 0x254], 0xffffffff
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp dword [edi + 0x14], 8
mov dword [edi + 0x10], ebx
jb 0x41786a
mov eax, dword [edi]
jmp 0x41786c
mov eax, edi
xor ecx, ecx
push 0x20a
mov word [eax], cx
lea eax, [ebp - 0x220]
push ebx
push eax
call fcn.0043e920
add esp, 0xc
lea eax, [ebp - 0x220]
push eax
push ebx
push ebx
push 0x1c
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x417b27
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x250]
call fcn.004062f0
mov esi, 0x473f24
mov byte [ebp - 4], 1
push esi
call fcn.004012d2
pop ecx
push eax
push esi
lea ecx, [ebp - 0x250]
call fcn.0040a414
cmp dword [ebp - 0x23c], 8
lea eax, [ebp - 0x250]
push ebx
cmovae eax, dword [ebp - 0x250]
push 0x2000000
push 3
push ebx
push 7
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x254], esi
cmp esi, 0xffffffff
jne 0x41792f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push ebx
push 1
lea ecx, [ebp - 0x250]
call fcn.00408a5c
movzx eax, si
or eax, 0x80070000
test esi, esi
cmovle eax, esi
jmp 0x417b27
lea eax, [ebp - 0x25c]
mov dword [ebp - 0x25c], ebx
push eax
push esi
mov dword [ebp - 0x258], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
cmp eax, 1
jne 0x417acb
mov eax, dword [ebp - 0x25c]
or eax, dword [ebp - 0x258]
je 0x417acb
mov dword [ebp - 0x224], 0xf
mov dword [ebp - 0x228], ebx
mov byte [ebp - 0x238], bl
push ebx
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x238]
push dword [ebp - 0x25c]
call fcn.00408ce8
cmp dword [ebp - 0x224], 0x10
lea ecx, [ebp - 0x26c]
push ebx
push ecx
push dword [ebp - 0x25c]
lea eax, [ebp - 0x238]
mov dword [ebp - 0x26c], ebx
cmovae eax, dword [ebp - 0x238]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, 1
jne 0x417aa9
mov eax, dword [ebp - 0x26c]
cmp dword [ebp - 0x25c], eax
jne 0x417aa9
cmp dword [ebp - 0x258], ebx
jne 0x417aa9
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x268], ebx
mov dword [ebp - 0x264], ebx
mov dword [ebp - 0x260], ebx
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x268]
push dword [ebp - 0x228]
call fcn.00417d41
mov esi, dword [ebp - 0x264]
lea eax, [ebp - 0x270]
sub esi, dword [ebp - 0x268]
lea ecx, [ebp - 0x238]
cmp dword [ebp - 0x224], 0x10
mov edx, dword [ebp - 0x228]
cmovae ecx, dword [ebp - 0x238]
push eax
push dword [ebp - 0x268]
mov dword [ebp - 0x270], esi
call fcn.004176f8
pop ecx
pop ecx
test eax, eax
jne 0x417a6e
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x268]
mov esi, eax
call fcn.00408971
jmp 0x417ab8
shr esi, 1
mov ecx, edi
push esi
push dword [ebp - 0x268]
call fcn.00408ab3
lea ecx, [ebp - 0x268]
call fcn.00408971
push ebx
push 1
lea ecx, [ebp - 0x238]
call fcn.00408c93
push ebx
push 1
lea ecx, [ebp - 0x250]
call fcn.00408a5c
xor eax, eax
jmp 0x417b27
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push ebx
push 1
lea ecx, [ebp - 0x238]
call fcn.00408c93
jmp 0x41790f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push 1
lea ecx, [ebp - 0x250]
call fcn.00408a5c
mov eax, 0x570
jmp 0x417b27
call fcn.0043c495
ret