Function at 0x10158f9
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x102b4aa
mov eax, dword fs:[0]
push eax
mov eax, 0x222c
call fcn.010171f0
mov eax, dword [0x102e1b0]
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 [ebp + 8]
mov edi, ecx
lea esi, [edi + 8]
xor ebx, ebx
cmp dword [esi], ebx
mov dword [ebp - 0x221c], edi
mov dword [ebp - 0x2238], eax
jne 0x10159a4
push 0x18
call fcn.010161d8
mov edx, eax
cmp edx, ebx
pop ecx
je 0x1015966
push 6
pop ecx
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 0x221c]
jmp 0x1015968
xor edx, edx
cmp edx, ebx
mov dword [esi], edx
je 0x1015998
push 6
pop ecx
xor eax, eax
mov edi, edx
push 0xfa0
rep stosd dword es:[edi], eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
jne 0x1015992
push dword [esi]
call fcn.01016242
pop ecx
mov dword [esi], ebx
mov edi, dword [ebp - 0x221c]
cmp dword [esi], ebx
jne 0x10159a4
push 0xe
pop eax
jmp 0x1015b7d
push esi
lea ecx, [ebp - 0x2224]
call fcn.010155f4
lea eax, [ebp - 0x218]
push eax
push ebx
push ebx
push 0x24
push ebx
mov dword [ebp - 4], ebx
mov word [ebp - 0x218], bx
mov dword [ebp - 0x2220], 0x80004005
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jl 0x1015b61
push 0x100541c
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
test eax, eax
je 0x1015b61
push ebx
push 0x20
push 4
push ebx
push 1
push 0x40000000
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 4], eax
jne 0x1015a33
mov dword [edi + 4], ebx
call esi
cmp eax, ebx
mov dword [ebp - 0x2220], eax
jne 0x1015b61
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 2
push ebx
push ebx
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
call esi
cmp eax, ebx
mov dword [ebp - 0x2220], eax
jne 0x1015b61
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi], eax
xor eax, eax
mov word [ebp - 0x2234], bx
lea edi, [ebp - 0x2232]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x2234]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov edi, dword [ebp - 0x221c]
push 0x1006930
mov ecx, edi
call fcn.0101573e
cmp byte [ebp + 0xc], bl
je 0x1015b52
push 0x10068c8
push ebx
push edi
call fcn.01015821
movzx eax, word [ebp - 0x2226]
push eax
movzx eax, word [ebp - 0x2228]
push eax
movzx eax, word [ebp - 0x222a]
push eax
movzx eax, word [ebp - 0x222c]
push eax
movzx eax, word [ebp - 0x222e]
push eax
movzx eax, word [ebp - 0x2232]
push eax
movzx eax, word [ebp - 0x2234]
push eax
push 0x1006850
mov esi, 0x1000
lea eax, [ebp - 0x2218]
push esi
push eax
mov word [ebp - 0x2218], bx
call fcn.01014aea
add esp, 0x34
test eax, eax
jl 0x1015b12
lea eax, [ebp - 0x2218]
push eax
mov ecx, edi
call fcn.0101573e
mov eax, dword [ebp - 0x2238]
cmp eax, ebx
mov word [ebp - 0x2218], bx
jne 0x1015b28
mov eax, 0x10049c8
push eax
push 0x1006828
lea eax, [ebp - 0x2218]
push esi
push eax
call fcn.01014aea
add esp, 0x10
test eax, eax
jl 0x1015b61
lea eax, [ebp - 0x2218]
push eax
mov ecx, edi
call fcn.0101573e
jmp 0x1015b61
push 0x1006790
push ebx
push edi
call fcn.01015821
add esp, 0xc
lea ecx, [ebp - 0x2224]
call fcn.0101561e
lea ecx, [ebp - 0x2224]
call fcn.0101561e
mov eax, dword [ebp - 0x2220]
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.010171cf
leave
ret 8