Function at 0x10013c80
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
xor eax, eax
push ebx
push esi
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 8]
push edi
push eax
mov byte [ebp - 1], 0
call sym.vmtools.dll_Unicode_Duplicate
mov ebx, dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov esi, eax
lea esp, [esp]
push esi
call sym.vmtools.dll_Unicode_LengthInCodePoints
push 0x10061674
mov edi, eax
call sym.vmtools.dll_Unicode_LengthInCodePoints
add esp, 8
cmp eax, edi
jg 0x10013d41
push 0
push eax
push 0
push 0x10061674
push eax
sub edi, eax
push edi
push esi
call sym.vmtools.dll_Unicode_CompareRange
add esp, 0x1c
test eax, eax
sete al
test al, al
je 0x10013d41
push esi
call sym.vmtools.dll_Unicode_LengthInCodePoints
push 0x1005d980
mov edi, eax
call sym.vmtools.dll_Unicode_LengthInCodePoints
add esp, 8
cmp eax, edi
jg 0x10013d41
push 0
push eax
push 0
push 0x1005d980
push eax
sub edi, eax
push edi
push esi
call sym.vmtools.dll_Unicode_CompareRange
add esp, 0x1c
test eax, eax
sete al
test al, al
je 0x10013d41
push esi
call sym.vmtools.dll_Unicode_LengthInCodePoints
dec eax
push eax
push 0
push esi
call sym.vmtools.dll_Unicode_Substr
push esi
mov edi, eax
call ebx
add esp, 0x14
mov esi, edi
jmp 0x10013cb0
push 1
push esi
call sym.vmtools.dll_Unicode_GetAllocBytes
lea ecx, [ebp - 0x10]
push ecx
mov dword [ebp - 0x14], eax
call fcn.100137a0
add esp, 0xc
test al, al
je 0x10013f2d
lea edx, [ebp - 8]
push edx
call fcn.10013680
add esp, 4
test al, al
je 0x10013f2d
mov eax, dword [ebp - 8]
mov edi, dword [sym.imp.ADVAPI32.dll_GetLengthSid]
push eax
call edi
mov ecx, dword [ebp - 0x10]
push ecx
mov dword [ebp - 0xc], eax
call edi
mov ecx, dword [ebp - 0xc]
lea edi, [ecx + eax + 0x18]
push edi
call sym.vmtools.dll_UtilSafeMalloc0
add esp, 4
push 2
push edi
push eax
mov dword [ebp - 0xc], eax
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x10013db9
push str.W32Util_MakeSafeDirectory
push str._s:_Couldnt_init_ACL_n
jmp 0x10013f37
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov edi, dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
push edx
push 0x101f0000
push 2
push eax
call edi
test eax, eax
je 0x10013f21
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
push ecx
push 0x101f0000
push 2
push edx
call edi
test eax, eax
je 0x10013f21
push 1
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x10013e1f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.W32Util_MakeSafeDirectory
push str._s:_InitializeSecurityDescriptor_failed:__d_n
call sym.vmtools.dll_Log
add esp, 0xc
jmp 0x10013f3f
mov ecx, dword [ebp - 0xc]
push 0
push ecx
push 1
lea edx, [ebp - 0x34]
push edx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x10013e53
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.W32Util_MakeSafeDirectory
push str._s:_SetSecurityDescriptorOwner_failed:__d_n
call sym.vmtools.dll_Log
add esp, 0xc
jmp 0x10013f3f
mov eax, dword [ebp - 8]
push 0
push eax
lea ecx, [ebp - 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorOwner]
test eax, eax
je 0x10013e35
mov eax, dword [0x1008cecc]
test eax, eax
jne 0x10013e84
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x1008cecc], eax
test eax, eax
je 0x10013e9e
cmp dword [0x1008ced0], 0
jne 0x10013ea7
push 0x10063c28
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x1008ced0], eax
cmp dword [0x1008ced0], 0
je 0x10013eda
push 0x1000
push 0x1000
lea edx, [ebp - 0x34]
push edx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorControl]
test eax, eax
jne 0x10013eda
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.W32Util_MakeSafeDirectory
push str._s:_SetSecurityDescriptorControl_failed:__d_n
call sym.vmtools.dll_Log
add esp, 0xc
jmp 0x10013f3f
mov edx, dword [ebp - 0x14]
lea ecx, [ebp - 0x20]
push ecx
lea eax, [ebp - 0x34]
push edx
mov dword [ebp - 0x20], 0xc
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x10013f1b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.W32Util_MakeSafeDirectory
push str._s:_CreateDirectoryW_failed:__d_n
call sym.vmtools.dll_Log
add esp, 0xc
jmp 0x10013f3f
mov byte [ebp - 1], 1
jmp 0x10013f3f
push str.W32Util_MakeSafeDirectory
push str._s:_Couldnt_add_SID_to_DACL_n
jmp 0x10013f37
push str.W32Util_MakeSafeDirectory
push str._s:_Couldnt_get_local_admin_or_user_SID_n
call sym.vmtools.dll_Log
add esp, 8
push esi
call ebx
mov eax, dword [ebp - 0x14]
push eax
call ebx
mov ecx, dword [ebp - 0x10]
push ecx
call ebx
mov edx, dword [ebp - 8]
push edx
call ebx
mov eax, dword [ebp - 0xc]
push eax
call ebx
mov al, byte [ebp - 1]
add esp, 0x14
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret