Function at 0x4c6810
Capabilities:
Check if file exists
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x565def
mov eax, dword fs:[0]
push eax
sub esp, 0x60
push ebx
push esi
push edi
mov eax, dword [0x5d8024]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x18], 0
xor edi, edi
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], edi
mov dword [ebp - 4], edi
lea eax, [ebp - 0x20]
push eax
push 0x23
push edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jns 0x4c68dd
push str.Shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
je 0x4c6953
push 0x598410
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x4c6953
push 0x20a
call fcn.00522670
add esp, 4
mov edi, eax
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x2c], 0x105
push 0
push 0x23
push edi
push 0
call esi
mov ebx, 0x5c
test eax, eax
je 0x4c68d8
xor edx, edx
mov ecx, edi
cmp word [edi], dx
je 0x4c68d8
nop
lea ecx, [ecx + 2]
inc edx
cmp word [ecx], 0
jne 0x4c68c0
test edx, edx
je 0x4c68d8
cmp word [edi + edx*2 - 2], bx
je 0x4c68d8
mov dword [edi + edx*2], ebx
cmp eax, 1
jmp 0x4c694c
push 0x20a
call fcn.00522670
add esp, 4
mov edi, eax
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x2c], 0x105
push edi
push dword [ebp - 0x20]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov esi, eax
mov ebx, 0x5c
test esi, esi
je 0x4c692c
xor edx, edx
mov ecx, edi
cmp word [edi], dx
je 0x4c692c
lea ecx, [ecx + 2]
inc edx
cmp word [ecx], 0
jne 0x4c6914
test edx, edx
je 0x4c692c
cmp word [edi + edx*2 - 2], bx
je 0x4c692c
mov dword [edi + edx*2], ebx
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
mov ecx, dword [ebp - 0x1c]
push dword [ebp - 0x20]
push ecx
mov eax, dword [ecx]
call dword [eax + 0x14]
cmp esi, 1
sete al
test al, al
jne 0x4c695a
xor bl, bl
jmp 0x4c6b60
push edi
lea ecx, [ebp - 0x14]
call fcn.004152f0
mov byte [ebp - 4], 1
push edi
call fcn.0052266b
add esp, 4
lea ecx, [ebp - 0x14]
xor edi, edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x2c], edi
push 0xc
push str.ADVINST_LOGS
call fcn.00418f60
push dword [ebp - 0x14]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4c6a30
mov dword [ebp - 0x68], edi
mov dword [ebp - 0x64], edi
mov dword [ebp - 0x60], edi
mov byte [ebp - 4], 2
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
mov byte [ebp - 4], 3
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov byte [ebp - 4], 4
push eax
push ecx
push str.Everyone
lea ecx, [ebp - 0x68]
call fcn.004d0e90
lea ecx, [ebp - 0x68]
call fcn.004d1410
test eax, eax
jne 0x4c69f6
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x68]
call fcn.004d0d40
xor bl, bl
jmp 0x4c6b41
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x14]
mov dword [ebp - 0x38], 0xc
mov dword [ebp - 0x30], 0
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov esi, eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x68]
call fcn.004d0d40
test esi, esi
jne 0x4c6a30
xor bl, bl
jmp 0x4c6b41
mov eax, dword [ebp - 0x14]
mov ebx, dword [eax - 0xc]
lea esi, [ebx + 1]
test esi, esi
js 0x4c6b94
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, esi
or ecx, edx
jge 0x4c6a5e
push esi
lea ecx, [ebp - 0x14]
call fcn.00408d50
mov eax, dword [ebp - 0x14]
mov ecx, 0x5c
mov word [eax + ebx*2], cx
mov eax, dword [ebp - 0x14]
cmp esi, dword [eax - 8]
jg 0x4c6b94
mov dword [eax - 0xc], esi
xor ecx, ecx
mov eax, dword [ebp - 0x14]
mov word [eax + esi*2], cx
mov ecx, dword [ebp - 0x24]
mov ecx, dword [ecx + 0x28]
cmp dword [ecx - 0xc], 0
jne 0x4c6aa6
lea ecx, [ebp - 0x20]
call fcn.004c6d60
mov byte [ebp - 4], 5
mov ebx, 1
mov dword [ebp - 0x18], ebx
mov eax, dword [eax]
mov esi, dword [ebp - 0x24]
jmp 0x4c6ac5
add ecx, 0xfffffff0
call fcn.00408b00
add eax, 0x10
mov esi, eax
mov dword [ebp - 0x24], esi
mov dword [ebp - 4], 7
mov ebx, 2
mov dword [ebp - 0x18], ebx
push dword [eax - 0xc]
lea ecx, [ebp - 0x14]
push eax
call fcn.00418f60
mov dword [ebp - 4], 5
test bl, 2
je 0x4c6b02
and ebx, 0xfffffffd
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], 5
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4c6b02
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 1
test bl, 1
je 0x4c6b33
and ebx, 0xfffffffe
mov dword [ebp - 0x18], ebx
mov byte [ebp - 4], 1
or eax, 0xffffffff
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4c6b33
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x14]
push eax
call fcn.00478300
mov bl, 1
mov byte [ebp - 4], 0
or eax, 0xffffffff
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4c6b60
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
push edi
call fcn.0052266b
add esp, 4
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x2c], 0
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x80070057
call fcn.00408fc0
int3