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

Disassembly:
push 0x264
mov eax, 0x4441ba
call fcn.00424af3
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 0x40d99b
mov eax, dword [edi]
jmp 0x40d99d
mov eax, edi
xor ecx, ecx
push 0x20a
mov word [eax], cx
lea eax, [ebp - 0x220]
push ebx
push eax
call fcn.004272a0
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 0x40dc7a
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x250]
call fcn.004065a8
mov esi, str.NVIDIA_accounts
mov byte [ebp - 4], 1
push esi
call fcn.004024c8
pop ecx
push eax
push esi
lea ecx, [ebp - 0x250]
call fcn.00409414
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 0x40da60
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push ebx
push 1
lea ecx, [ebp - 0x250]
call fcn.0040812d
movzx eax, si
or eax, 0x80070000
test esi, esi
cmovle eax, esi
jmp 0x40dc7a
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 0x40dc1e
mov eax, dword [ebp - 0x25c]
or eax, dword [ebp - 0x258]
je 0x40dc1e
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.004083d9
cmp dword [ebp - 0x224], 0x10
lea ecx, [ebp - 0x260]
push ebx
push ecx
push dword [ebp - 0x25c]
lea eax, [ebp - 0x238]
mov dword [ebp - 0x260], ebx
cmovae eax, dword [ebp - 0x238]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, 1
jne 0x40dbfc
mov eax, dword [ebp - 0x260]
cmp dword [ebp - 0x25c], eax
jne 0x40dbfc
cmp dword [ebp - 0x258], ebx
jne 0x40dbfc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x26c], ebx
mov dword [ebp - 0x268], ebx
mov dword [ebp - 0x264], ebx
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x26c]
push dword [ebp - 0x228]
call fcn.0040de87
mov ebx, dword [ebp - 0x268]
lea eax, [ebp - 0x270]
mov esi, dword [ebp - 0x26c]
lea ecx, [ebp - 0x238]
mov edx, dword [ebp - 0x228]
sub ebx, esi
cmp dword [ebp - 0x224], 0x10
push eax
cmovae ecx, dword [ebp - 0x238]
push esi
mov dword [ebp - 0x270], ebx
call fcn.0040d834
pop ecx
pop ecx
test eax, eax
jne 0x40dbb5
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test esi, esi
je 0x40dbda
mov eax, dword [ebp - 0x264]
push 1
sub eax, esi
push eax
push esi
call fcn.004025a7
add esp, 0xc
jmp 0x40dbda
shr ebx, 1
mov ecx, edi
push ebx
push esi
call fcn.00408222
test esi, esi
je 0x40dbd8
mov eax, dword [ebp - 0x264]
push 1
sub eax, esi
push eax
push esi
call fcn.004025a7
add esp, 0xc
xor edi, edi
push 0
push 1
lea ecx, [ebp - 0x238]
call fcn.00408384
push 0
push 1
lea ecx, [ebp - 0x250]
call fcn.0040812d
mov eax, edi
jmp 0x40dc7a
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push 1
lea ecx, [ebp - 0x238]
mov esi, eax
call fcn.00408384
jmp 0x40da40
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push 1
lea ecx, [ebp - 0x250]
call fcn.0040812d
mov eax, 0x570
jmp 0x40dc7a
call fcn.00424a40
ret