Function at 0x10049970
Capabilities:
Check if file exists
Create directory
Get common file path
Get startup folder

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10157bc7
mov eax, dword fs:[0]
push eax
sub esp, 0x450
mov eax, dword [0x101c0618]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov esi, 0x10172dc0
test eax, eax
mov dword [0x101c65a0], 1
cmovne esi, eax
call fcn.1000c0e0
mov ecx, eax
test ecx, ecx
je 0x10049c0e
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x458], eax
push esi
lea ecx, [ebp - 0x458]
mov dword [ebp - 4], 0
call fcn.1001aad0
test al, al
jne 0x100499f3
push esi
lea ecx, [ebp - 0x458]
call fcn.1000a3c0
mov eax, dword [ebp - 0x458]
mov dword [ebp - 4], 1
cmp dword [eax - 0xc], 0
jne 0x10049b4c
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.100ec480
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0x1a
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push dword [0x101c022c]
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x218]
push eax
call esi
push 0x1017a274
lea eax, [ebp - 0x218]
push eax
call esi
push 0
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push 0x20a
lea eax, [ebp - 0x424]
push 0
push eax
call fcn.100ec480
add esp, 0xc
lea eax, [ebp - 0x424]
push 0x104
push eax
push 0x10000000
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
mov dword [ebp - 0x42c], 0
lea ecx, [ebp - 0x424]
mov dword [ebp - 0x428], 7
mov word [ebp - 0x43c], ax
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10049ac0
sub ecx, edx
lea eax, [ebp - 0x424]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x43c]
call fcn.10011620
push 0
lea eax, [ebp - 0x43c]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x454]
push eax
call fcn.10052460
add esp, 0xc
lea ecx, [ebp - 0x43c]
mov byte [ebp - 4], 4
call fcn.1000dfa0
cmp dword [ebp - 0x440], 8
lea eax, [ebp - 0x454]
cmovae eax, dword [ebp - 0x454]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x458]
push str._s_s.log
push eax
call fcn.10012500
add esp, 0x10
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x454]
call fcn.1000dfa0
push 0x1017a290
lea eax, [ebp - 0x458]
push eax
lea eax, [ebp - 0x45c]
push eax
call fcn.10019d90
add esp, 0xc
push dword [ebp - 0x45c]
mov byte [ebp - 4], 5
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ecx, dword [0x101c659c]
test eax, eax
push dword [0x101c0228]
mov edx, 0xf
cmovne ecx, edx
mov dword [0x101c659c], ecx
mov ecx, 0x101c65a4
call fcn.1005c560
lea eax, [ebp - 0x458]
mov ecx, 0x101c65a4
push eax
call fcn.1005c440
mov edx, dword [ebp - 0x45c]
or esi, 0xffffffff
mov byte [ebp - 4], 1
add edx, 0xfffffff0
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10049bd2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x458]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x10049bf4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100b4568
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.10007270
int3