Function at 0x4017a0
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x413608
mov eax, dword fs:[0]
push eax
sub esp, 0x7c
mov eax, dword [0x41c004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x50], eax
test eax, eax
je 0x401afd
cmp word [eax], 0
je 0x401afd
mov dword [ebp - 0x24], 0xffffffff
lea eax, [ebp - 0x24]
mov dword [ebp - 4], 0
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x401ada
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 0
push eax
push 0
push 0
push 1
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x401ada
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0
push eax
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 1
call fcn.00401e70
mov edi, dword [ebp - 0x68]
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
push edi
push 1
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x40187b
lea ecx, [ebp - 0x68]
mov byte [ebp - 0x1d], al
call fcn.00401fc0
jmp 0x401ade
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 2
push eax
push 0
push 0
push 0x19
push dword [ebp - 0x24]
mov dword [ebp - 0x2c], 0
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x4018d8
push eax
lea ecx, [ebp - 0x3c]
call fcn.00401e70
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
mov eax, dword [ebp - 0x3c]
push eax
push 0x19
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x40190b
lea eax, [ebp - 0x30]
mov byte [ebp - 0x1c], 0
push eax
lea eax, [ebp - 0x1c]
mov word [ebp - 0x13], 0
push eax
push 0
xorps xmm0, xmm0
mov byte [ebp - 0x11], 0
push 0x16
movq qword [ebp - 0x1b], xmm0
mov dword [ebp - 0x30], 0xc
call dword [sym.imp.ADVAPI32.dll_CreateWellKnownSid]
test eax, eax
jne 0x401914
mov byte [ebp - 0x1d], 0
jmp 0x401ac8
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov esi, dword [ebp - 0x30]
mov ecx, eax
add esi, 0x1f
mov dword [ebp - 0x48], 0
add esi, ecx
mov dword [ebp - 0x44], 0
or esi, 3
mov dword [ebp - 0x40], 0
inc esi
push esi
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 3
call fcn.00401e70
push 2
push esi
mov esi, dword [ebp - 0x48]
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x401abc
lea eax, [ebp - 0x1c]
push eax
push 0x10000000
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x401abc
push dword [edi]
push 0x10000000
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x401abc
xor edi, edi
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x54], edi
mov byte [ebp - 4], 4
mov esi, dword [ebp - 0x3c]
cmp esi, dword [ebp - 0x38]
je 0x401a1a
push str.AddMandatoryAce
push str.advapi32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x4c], eax
test eax, eax
je 0x401aae
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
lea ecx, [ebp - 0x5c]
lea esi, [eax + 0xf]
or esi, 3
inc esi
push esi
call fcn.00401e70
mov edi, dword [ebp - 0x5c]
push 2
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x401aae
mov eax, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x4c]
mov ecx, esi
push dword [eax]
push 3
push 0
push 2
push edi
call dword [0x41416c]
call esi
test eax, eax
je 0x401aae
push 1
lea eax, [ebp - 0x88]
mov byte [ebp - 0x88], 0
xorps xmm0, xmm0
mov word [ebp - 0x77], 0
push eax
movups xmmword [ebp - 0x87], xmm0
mov byte [ebp - 0x75], 0
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x401aae
push 0
push dword [ebp - 0x48]
lea eax, [ebp - 0x88]
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x401aae
test edi, edi
je 0x401a7a
push 0
push edi
push 1
lea eax, [ebp - 0x88]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorSacl]
test eax, eax
je 0x401aae
xorps xmm0, xmm0
mov dword [ebp - 0x74], 0xc
movq qword [ebp - 0x70], xmm0
lea eax, [ebp - 0x88]
mov dword [ebp - 0x70], eax
lea eax, [ebp - 0x74]
push eax
push dword [ebp - 0x50]
mov dword [ebp - 0x6c], 0
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov byte [ebp - 0x1d], 1
test eax, eax
jne 0x401ab2
mov byte [ebp - 0x1d], 0
lea ecx, [ebp - 0x5c]
call fcn.00401fc0
jmp 0x401ac0
mov byte [ebp - 0x1d], 0
lea ecx, [ebp - 0x48]
call fcn.00401fc0
lea ecx, [ebp - 0x3c]
call fcn.00401fc0
lea ecx, [ebp - 0x68]
call fcn.00401fc0
jmp 0x401ade
mov byte [ebp - 0x1d], 0
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x401af8
cmp eax, 0xffffffff
je 0x401af8
push eax
mov dword [ebp - 0x24], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp - 0x1d]
jmp 0x401aff
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00402f6d
mov esp, ebp
pop ebp
ret