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

Disassembly:
push ebp
lea ebp, [esp - 0x82c]
sub esp, 0x82c
push 0xffffffffffffffff
push 0x428fb0
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x436008]
xor eax, ebp
mov dword [ebp + 0x828], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp byte [0x437a88], 0
jne 0x408941
push 0x410
lea eax, [ebp + 0x418]
mov byte [0x437a88], 1
push 0
push eax
call fcn.004182d0
add esp, 0xc
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x14]
push eax
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x4086a9
lea eax, [ebp + 0x418]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
je 0x4086a0
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4086a9
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
jmp 0x4086a9
xor eax, eax
mov word [ebp + 0x418], ax
lea edi, [ebp + 0x418]
add edi, 0xfffffffe
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x4086b2
mov eax, dword [0x430bc4]
lea ecx, [ebp + 0x418]
mov dword [edi], eax
add ecx, 0xfffffffe
nop
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x4086d0
mov eax, dword [str.2345Pic]
mov dword [ecx], eax
mov eax, dword [0x43127c]
mov dword [ecx + 4], eax
mov eax, dword [0x431280]
mov dword [ecx + 8], eax
mov eax, dword [0x431284]
mov dword [ecx + 0xc], eax
lea eax, [ebp + 0x418]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x408716
xor eax, eax
mov word [ebp + 0x418], ax
push 0x412
lea eax, [ebp + 4]
push 0
push eax
call fcn.004182d0
lea ecx, [ebp + 0x418]
add esp, 0xc
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408732
sub ecx, edx
sar ecx, 1
je 0x4087b8
push 0x207
lea eax, [ebp + 0x418]
push eax
lea eax, [ebp + 4]
push eax
call fcn.0041c80c
lea ecx, [ebp + 4]
add esp, 0xc
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408761
sub ecx, edx
sar ecx, 1
je 0x4087b8
lea edi, [ebp + 4]
add edi, 0xfffffffe
nop dword [eax + eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x408780
mov eax, dword [0x430bc4]
mov dword [edi], eax
lea edi, [ebp + 4]
add edi, 0xfffffffe
nop dword [eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4087a0
mov ecx, 7
mov esi, str.2345Image.hzv
rep movsd dword es:[edi], dword [esi]
call fcn.0040be40
lea ecx, [ebp + 4]
mov edi, eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4087c5
sub ecx, edx
sar ecx, 1
je 0x408941
mov ebx, dword [edi]
mov dword [ebp], 0
mov dword [ebp], ebx
test ebx, ebx
je 0x4087f7
mov eax, dword [ebx]
test eax, eax
je 0x4087f7
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
xor eax, eax
lea ecx, [ebp + 4]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
lea edx, [ecx + 2]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408826
sub ecx, edx
lea eax, [ebp + 4]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x2c]
call fcn.004020b0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x2c]
mov edi, dword [edi]
mov eax, dword [ebp - 0x2c]
add edi, 0x14
cmp dword [ebp - 0x18], 8
mov esi, edi
cmovae ecx, eax
cmp dword [edi + 0x14], 8
jb 0x408862
mov esi, dword [edi]
mov edx, dword [edi + 0x10]
cmp edx, dword [ebp - 0x1c]
jne 0x408883
test edx, edx
je 0x4088d1
sub esi, ecx
mov ax, word [esi + ecx]
cmp ax, word [ecx]
jne 0x408883
add ecx, 2
sub edx, 1
jne 0x408870
jmp 0x4088ce
mov ecx, edi
call fcn.0040d970
lea eax, [ebp - 0x2c]
cmp edi, eax
je 0x4088a4
cmp dword [ebp - 0x18], 8
mov ecx, edi
push dword [ebp - 0x1c]
cmovae eax, dword [ebp - 0x2c]
push eax
call fcn.004020b0
mov eax, dword [edi + 0x1c]
mov esi, dword [edi + 0x18]
mov dword [ebp - 0x10], eax
cmp esi, eax
je 0x4088c7
mov ebx, eax
mov ecx, esi
call fcn.0040e080
add esi, 0x68
cmp esi, ebx
jne 0x4088b3
mov esi, dword [edi + 0x18]
mov ebx, dword [ebp]
mov dword [edi + 0x1c], esi
mov byte [edi + 0x24], 0
mov eax, dword [ebp - 0x2c]
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x18]
cmp ecx, 8
jb 0x40890e
lea ecx, [ecx*2 + 2]
mov edx, eax
cmp ecx, 0x1000
jb 0x408904
mov eax, dword [eax - 4]
add ecx, 0x23
sub edx, eax
mov dword [ebp - 0x10], eax
lea eax, [edx - 4]
cmp eax, 0x1f
ja 0x408964
mov eax, dword [ebp - 0x10]
push ecx
push eax
call fcn.00416b45
add esp, 8
xor eax, eax
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
mov dword [ebp - 4], 0xffffffff
test ebx, ebx
je 0x408941
mov eax, dword [ebx]
test eax, eax
je 0x40893a
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x828]
xor ecx, ebp
call fcn.00416b04
lea esp, [ebp + 0x82c]
pop ebp
ret
call fcn.0041a76f
int3