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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4522d7
mov eax, dword fs:[0]
push eax
sub esp, 0x22c
mov eax, dword [0x46c2f0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], 0
lea edx, [ecx + 0x18]
cmp byte [ecx + 0x10], 0
mov eax, dword [edx]
je 0x4058cc
cmp dword [eax - 0xc], 0
je 0x4058b0
push ecx
mov ecx, esp
push edx
mov dword [ebp - 0x220], ecx
call fcn.00404f60
call fcn.004048c0
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0043503f
mov esp, ebp
pop ebp
ret
cmp dword [eax - 0xc], 0
je 0x4058e9
push ecx
mov ecx, esp
push edx
mov dword [ebp - 0x220], ecx
call fcn.00404f60
call fcn.004048c0
add esp, 4
push 0x208
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.004386a0
add esp, 0xc
lea eax, [ebp - 0x21c]
push 0
push 0x23
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push str.BIYOOChatPPT
lea ecx, [ebp - 0x234]
call fcn.00404db0
push eax
lea edx, [ebp - 0x21c]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x228]
call fcn.00405d80
add esp, 4
mov byte [ebp - 4], 3
or esi, 0xffffffff
mov edx, dword [ebp - 0x234]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40595f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x104
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.004386a0
add esp, 0xc
lea eax, [ebp - 0x21c]
push 0
push 0x1c
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push str.BIYOOChatPPT
lea ecx, [ebp - 0x220]
call fcn.00404db0
push eax
lea edx, [ebp - 0x21c]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x230]
call fcn.00405d80
add esp, 4
mov byte [ebp - 4], 6
mov eax, esi
mov edx, dword [ebp - 0x220]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4059d2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x228]
cmp dword [eax - 0xc], 0
je 0x405a24
push ecx
mov ecx, esp
lea eax, [ebp - 0x228]
push eax
mov dword [ebp - 0x224], ecx
call fcn.00404f60
call fcn.004048c0
mov eax, dword [ebp - 0x228]
add esp, 4
cmp dword [eax - 0xc], 0
je 0x405a24
push ecx
mov ecx, esp
lea eax, [ebp - 0x230]
push eax
mov dword [ebp - 0x224], ecx
call fcn.00404f60
call fcn.004048c0
add esp, 4
lea ecx, [ebp - 0x22c]
call fcn.00404590
mov byte [ebp - 4], 7
push dword [ebp - 0x22c]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x405a60
push ecx
mov ecx, esp
lea eax, [ebp - 0x22c]
push eax
mov dword [ebp - 0x224], ecx
call fcn.00404f60
call fcn.004048c0
add esp, 4
mov byte [ebp - 4], 6
mov eax, esi
mov edx, dword [ebp - 0x22c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x405a81
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 3
mov eax, esi
mov edx, dword [ebp - 0x230]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x405aa2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x228]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x4058b0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4058b0