Function at 0x4396b0
Capabilities:
Check if file exists
Get common file path
Get file attributes
Get program files directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x491ba6
mov eax, dword fs:[0]
push eax
sub esp, 0x218
mov eax, dword [0x4c51d0]
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 [section..data]
mov edx, dword [eax + 0xc]
mov ecx, section..data
call edx
add eax, 0x10
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x224]
push eax
mov ebx, 0x4a59e4
mov edi, 0x4ab0d8
mov ecx, 0x80000002
mov dword [ebp - 4], 0
call fcn.00416ae0
mov edi, dword [ebp - 0x224]
mov eax, dword [edi - 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
add esp, 4
test eax, eax
je 0x439767
push edi
call esi
cmp eax, 0xffffffff
je 0x439767
test al, 0x10
jne 0x439767
lea eax, [edi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x43975d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x439a66
lea ecx, [ebp - 0x224]
push ecx
mov ebx, 0x4a59e4
mov edi, 0x4ab158
mov ecx, 0x80000002
call fcn.00416ae0
mov ebx, dword [ebp - 0x224]
add esp, 4
cmp dword [ebx - 0xc], 0
je 0x4397b6
push ebx
call esi
cmp eax, 0xffffffff
je 0x4397b6
test al, 0x10
jne 0x4397b6
lea eax, [ebx - 0x10]
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x439751
xor ecx, ecx
push 0x208
push ecx
lea edx, [ebp - 0x21a]
push edx
mov word [ebp - 0x21c], cx
call fcn.004720e0
mov edi, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
add esp, 0xc
push 0
push 0x26
lea eax, [ebp - 0x21c]
push eax
push 0
call edi
push 0x4ab1d4
lea ecx, [ebp - 0x21c]
push 0x105
push ecx
call fcn.0046f98c
add esp, 0xc
lea edx, [ebp - 0x21c]
push edx
call esi
cmp eax, 0xffffffff
je 0x43981c
test al, 0x10
jne 0x43981c
lea eax, [ebx - 0x10]
jmp 0x43973d
push 0x104
lea ecx, [ebp - 0x21c]
push 0
push ecx
call fcn.004720e0
add esp, 0xc
push 0
push 0x1a
lea edx, [ebp - 0x21c]
push edx
push 0
call edi
push 0x4ab208
lea eax, [ebp - 0x21c]
push 0x105
push eax
call fcn.0046f98c
add esp, 0xc
lea ecx, [ebp - 0x21c]
push ecx
call esi
cmp eax, 0xffffffff
je 0x439870
test al, 0x10
je 0x43979d
push 0x104
lea ecx, [ebp - 0x21c]
push 0
push ecx
call fcn.004720e0
add esp, 0xc
push 0
push 0x1a
lea edx, [ebp - 0x21c]
push edx
push 0
call edi
push 0x4ab2b0
lea eax, [ebp - 0x21c]
push 0x105
push eax
call fcn.0046f98c
add esp, 0xc
lea ecx, [ebp - 0x21c]
push ecx
call esi
cmp eax, 0xffffffff
je 0x4398c4
test al, 0x10
je 0x43979d
push 0x4ab350
lea ecx, [ebp - 0x220]
call fcn.00401c40
push 0x104
lea ecx, [ebp - 0x21c]
push 0
push ecx
mov byte [ebp - 4], 1
call fcn.004720e0
add esp, 0xc
push 0
push 0x10
lea edx, [ebp - 0x21c]
push edx
push 0
call edi
mov eax, dword [ebp - 0x220]
push eax
lea ecx, [ebp - 0x21c]
push 0x105
push ecx
call fcn.0046f98c
add esp, 0xc
lea edx, [ebp - 0x21c]
push edx
call esi
cmp eax, 0xffffffff
je 0x43994a
test al, 0x10
jne 0x43994a
lea ecx, [ebp - 0x220]
call fcn.00401670
lea ecx, [ebp - 0x224]
call fcn.00401670
mov eax, 1
jmp 0x439a66
push 0x104
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.004720e0
add esp, 0xc
push 0
push 0x19
lea ecx, [ebp - 0x21c]
push ecx
push 0
call edi
mov edx, dword [ebp - 0x220]
push edx
lea eax, [ebp - 0x21c]
push 0x105
push eax
call fcn.0046f98c
add esp, 0xc
lea eax, [ebp - 0x21c]
call fcn.0040eaa0
lea ecx, [ebp - 0x220]
test eax, eax
jne 0x439930
push 0x4ab370
call fcn.00401bf0
push 0x104
lea ecx, [ebp - 0x21c]
push 0
push ecx
call fcn.004720e0
add esp, 0xc
push 0
push 2
lea edx, [ebp - 0x21c]
push edx
push 0
call edi
mov eax, dword [ebp - 0x220]
push eax
lea ecx, [ebp - 0x21c]
push 0x105
push ecx
call fcn.0046f98c
add esp, 0xc
lea eax, [ebp - 0x21c]
call fcn.0040eaa0
test eax, eax
jne 0x43992a
push 0x104
push eax
lea edx, [ebp - 0x21c]
push edx
call fcn.004720e0
add esp, 0xc
push 0
push 0x17
lea eax, [ebp - 0x21c]
push eax
push 0
call edi
mov ecx, dword [ebp - 0x220]
push ecx
lea edx, [ebp - 0x21c]
push 0x105
push edx
call fcn.0046f98c
add esp, 0xc
lea eax, [ebp - 0x21c]
call fcn.0040eaa0
lea ecx, [ebp - 0x220]
test eax, eax
jne 0x439930
call fcn.00401670
lea ecx, [ebp - 0x224]
call fcn.00401670
xor eax, eax
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.0046e5d5
mov esp, ebp
pop ebp
ret