Function at 0x404db0
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
sub esp, 0x41c
mov eax, dword [0x414028]
xor eax, esp
mov dword [esp + 0x418], eax
push ebp
push esi
push edi
xor ebp, ebp
push 0x40e
lea eax, [esp + 0x1a]
push ebp
push eax
mov word [esp + 0x20], bp
call fcn.00407780
add esp, 0xc
lea ecx, [esp + 0xc]
push ecx
push 0x1a
push ebp
mov dword [esp + 0x18], ebp
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x404e21
mov eax, dword [esp + 0xc]
lea edx, [esp + 0x14]
push edx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
je 0x404e1c
mov eax, dword [esp + 0xc]
cmp eax, ebp
je 0x404e21
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
jmp 0x404e21
mov word [esp + 0x14], bp
lea edi, [esp + 0x14]
add edi, 0xfffffffe
jmp 0x404e30
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x404e30
mov ecx, dword [0x411c98]
lea eax, [esp + 0x14]
mov dword [edi], ecx
add eax, 0xfffffffe
jmp 0x404e50
mov cx, word [eax + 2]
add eax, 2
cmp cx, bp
jne 0x404e50
mov edx, dword [0x411c9c]
mov ecx, dword [str.45Pic]
mov dword [eax], edx
mov edx, dword [0x411ca4]
mov dword [eax + 4], ecx
mov ecx, dword [0x411ca8]
mov dword [eax + 8], edx
lea edx, [esp + 0x14]
push edx
mov dword [eax + 0xc], ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x404e94
mov word [esp + 0x14], bp
push 0x410
lea esi, [ebx + 0xc20]
push ebp
push esi
call fcn.00407780
lea eax, [esp + 0x20]
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x404eb0
sub eax, edx
sar eax, 1
jne 0x405019
mov eax, dword [ebx + 0x1034]
cmp eax, ebp
jne 0x404ed6
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x40f
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp eax, 0x410
jae 0x405019
cmp eax, ebp
je 0x405019
push 0x5c
push esi
mov word [ebx + eax*2 + 0xc20], bp
call fcn.00406fc2
add esp, 8
cmp eax, ebp
jne 0x404f1c
push 0x2f
push esi
call fcn.00406fc2
add esp, 8
cmp eax, ebp
je 0x404f20
mov word [eax + 2], bp
mov edi, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x404f25
mov eax, dword [0x411c98]
mov dword [edi], eax
mov eax, esi
add eax, 0xfffffffe
lea ecx, [ecx]
mov cx, word [eax + 2]
add eax, 2
cmp cx, bp
jne 0x404f40
mov ecx, dword [str.config]
mov dword [eax], ecx
mov edx, dword [0x411cb0]
mov dword [eax + 4], edx
mov ecx, dword [0x411cb4]
mov dword [eax + 8], ecx
mov dx, word [0x411cb8]
push esi
mov word [eax + 0xc], dx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x404f85
mov word [esi], bp
jmp 0x405019
mov edi, esi
add edi, 0xfffffffe
lea ebx, [ebx]
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x404f90
mov eax, dword [0x411c98]
mov dword [edi], eax
mov eax, esi
add eax, 0xfffffffe
jmp 0x404fb0
mov cx, word [eax + 2]
add eax, 2
cmp cx, bp
jne 0x404fb0
mov ecx, dword [str.RCImage.hzv]
mov dword [eax], ecx
mov edx, dword [0x411cc0]
mov dword [eax + 4], edx
mov ecx, dword [0x411cc4]
push ebp
push 0x80
mov dword [eax + 8], ecx
mov edx, dword [0x411cc8]
push 4
mov dword [eax + 0xc], edx
mov ecx, dword [0x411ccc]
push ebp
push 7
mov dword [eax + 0x10], ecx
mov edx, dword [0x411cd0]
push 0xc0000000
push esi
mov dword [eax + 0x14], edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x405012
mov word [esi], bp
jmp 0x405019
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x405020
sub eax, edx
sar eax, 1
jne 0x4050bf
push 0x207
lea eax, [esp + 0x18]
push eax
push esi
call fcn.00406ff7
mov eax, esi
add esp, 0xc
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x405050
sub eax, edx
sar eax, 1
je 0x4050bf
mov edi, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x405066
mov ecx, dword [0x411c98]
mov dword [edi], ecx
add esi, 0xfffffffe
lea ecx, [ecx]
mov ax, word [esi + 2]
add esi, 2
cmp ax, bp
jne 0x405080
mov edx, dword [str.RCImage.hzv]
mov dword [esi], edx
mov eax, dword [0x411cc0]
mov dword [esi + 4], eax
mov ecx, dword [0x411cc4]
mov dword [esi + 8], ecx
mov edx, dword [0x411cc8]
mov dword [esi + 0xc], edx
mov eax, dword [0x411ccc]
mov dword [esi + 0x10], eax
mov ecx, dword [0x411cd0]
mov dword [esi + 0x14], ecx
mov ecx, dword [esp + 0x424]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.00406bc8
add esp, 0x41c
ret