Function at 0x4c7c8ae0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
xor eax, eax
push ebx
xor ebx, ebx
mov dword [ebp - 0x23], eax
mov dword [ebp - 0x1f], eax
mov dword [ebp - 0x1b], eax
mov dword [ebp - 0x17], eax
mov word [ebp - 0x13], ax
mov byte [ebp - 0x11], al
mov byte [ebp - 0x10], al
mov byte [ebp - 0xf], al
mov byte [ebp - 0xe], al
mov byte [ebp - 0xd], al
mov byte [ebp - 0xc], al
lea eax, [ebp - 4]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 1
lea ecx, [ebp - 0x10]
push ecx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov byte [ebp - 0x24], bl
mov byte [ebp - 0xb], 1
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x4c7c8b5c
push 0x7b
push 0x4c785a14
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4c78142c
call fcn.4c7c02b0
add esp, 0x10
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4
push esi
push edi
push 1
lea edx, [ebp - 0x24]
push edx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x4c7c8c98
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
lea edi, [eax + eax + 0x18]
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
cmp esi, ebx
je 0x4c7c8c98
push 2
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x4c7c8c91
mov ecx, dword [ebp - 4]
mov edi, dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
push ecx
push 0x1f01ff
push 2
push esi
call edi
test eax, eax
je 0x4c7c8c91
lea edx, [ebp - 8]
push edx
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_GetAce]
push esi
call ebx
test eax, eax
je 0x4c7c8c91
mov eax, dword [ebp - 8]
mov byte [eax + 1], 2
mov ecx, dword [ebp - 4]
push ecx
push 0x1f01ff
push 2
push esi
call edi
test eax, eax
je 0x4c7c8c91
lea edx, [ebp - 8]
push edx
push 1
push esi
call ebx
test eax, eax
je 0x4c7c8c91
mov eax, dword [ebp - 8]
push 0
push esi
push 1
lea ecx, [ebp - 0x24]
push ecx
mov byte [eax + 1], 1
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x4c7c8c91
mov edi, dword [ebp + 8]
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push edi
call ebx
cmp eax, 0xffffffff
jne 0x4c7c8c3d
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4c7c8c91
mov eax, edi
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x4c7c8c42
mov edx, dword [0x4c785a00]
mov dword [eax], edx
mov ecx, dword [0x4c785a04]
mov dword [eax + 4], ecx
mov edx, dword [0x4c785a08]
mov dword [eax + 8], edx
mov ecx, dword [0x4c785a0c]
mov dword [eax + 0xc], ecx
mov dx, word [0x4c785a10]
push edi
mov word [eax + 0x10], dx
call ebx
cmp eax, 0xffffffff
jne 0x4c7c8cb1
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4c7c8cb1
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 4]
test eax, eax
je 0x4c7c8ca6
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 4]
test eax, eax
je 0x4c7c8cbf
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 4