Function at 0x4014c0
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40ae48
mov eax, dword fs:[0]
push eax
sub esp, 0x90
mov eax, dword [0x40f07c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x94], eax
cmp eax, ebx
je 0x401537
cmp word [eax], bx
je 0x401537
or edi, 0xffffffff
mov dword [ebp - 0x24], edi
lea eax, [ebp - 0x24]
push eax
push 8
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x401555
mov eax, dword [ebp - 0x24]
cmp eax, ebx
je 0x401537
cmp eax, edi
je 0x401537
push eax
mov dword [ebp - 0x24], edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00402819
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x24]
mov esi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea ecx, [ebp - 0x3c]
push ecx
push ebx
push ebx
push 1
push edx
mov dword [ebp - 0x3c], ebx
call esi
mov eax, dword [ebp - 0x3c]
cmp eax, ebx
je 0x401522
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 1
call fcn.00401c60
mov ecx, dword [ebp - 0x3c]
mov edi, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x24]
lea eax, [ebp - 0x3c]
push eax
push ecx
push edi
push 1
push edx
call esi
test eax, eax
je 0x4016d8
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
lea eax, [ebp - 0x38]
push eax
push ebx
push ebx
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x24]
push 0x19
push ecx
mov dword [ebp - 0x38], ebx
call esi
mov eax, dword [ebp - 0x38]
cmp eax, ebx
je 0x4015ed
lea ecx, [ebp - 0x34]
call fcn.00401c60
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x34]
lea edx, [ebp - 0x38]
push edx
mov edx, dword [ebp - 0x24]
push eax
push ecx
push 0x19
push edx
call esi
test eax, eax
je 0x4016d0
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x20]
push ecx
push ebx
push 0x16
mov byte [ebp - 0x20], bl
mov dword [ebp - 0x1f], ebx
mov dword [ebp - 0x1b], ebx
mov word [ebp - 0x17], bx
mov byte [ebp - 0x15], bl
mov dword [ebp - 0x70], 0xc
call dword [sym.imp.ADVAPI32.dll_CreateWellKnownSid]
test eax, eax
je 0x4016d0
mov edx, dword [edi]
push edx
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, dword [ebp - 0x70]
lea esi, [eax + ecx + 0x1f]
or esi, 3
inc esi
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], ebx
mov eax, esi
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 3
call fcn.00401c60
push 2
push esi
mov esi, dword [ebp - 0x5c]
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x4016c8
lea edx, [ebp - 0x20]
push edx
push 0x10000000
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x4016c8
mov eax, dword [edi]
push eax
push 0x10000000
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x4016c8
xor edi, edi
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x64], ebx
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x30]
cmp dword [ebp - 0x34], ecx
je 0x401734
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 - 0x98], eax
cmp eax, ebx
jne 0x4016ed
lea esi, [ebp - 0x6c]
call fcn.00401c30
lea esi, [ebp - 0x5c]
call fcn.00401c30
lea esi, [ebp - 0x34]
call fcn.00401c30
lea esi, [ebp - 0x4c]
call fcn.00401c30
lea ecx, [ebp - 0x24]
call fcn.00401040
jmp 0x401537
mov edx, dword [ebp - 0x34]
mov eax, dword [edx]
push eax
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
lea esi, [eax + 0xf]
or esi, 3
inc esi
mov eax, esi
lea ecx, [ebp - 0x6c]
call fcn.00401c60
mov edi, dword [ebp - 0x6c]
push 2
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x4016c0
mov ecx, dword [ebp - 0x34]
mov edx, dword [ecx]
push edx
push 3
push ebx
push 2
push edi
call dword [ebp - 0x98]
test eax, eax
je 0x4016c0
mov esi, dword [ebp - 0x5c]
push 1
lea eax, [ebp - 0x84]
push eax
mov byte [ebp - 0x84], bl
mov dword [ebp - 0x83], ebx
mov dword [ebp - 0x7f], ebx
mov dword [ebp - 0x7b], ebx
mov dword [ebp - 0x77], ebx
mov word [ebp - 0x73], bx
mov byte [ebp - 0x71], bl
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x4016c0
push ebx
push esi
push 1
lea ecx, [ebp - 0x84]
push ecx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x4016c0
cmp edi, ebx
je 0x40179d
push ebx
push edi
push 1
lea edx, [ebp - 0x84]
push edx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorSacl]
test eax, eax
je 0x4016c0
mov edx, dword [ebp - 0x94]
lea ecx, [ebp - 0x90]
push ecx
lea eax, [ebp - 0x84]
mov dword [ebp - 0x8c], ebx
mov dword [ebp - 0x88], ebx
push edx
mov dword [ebp - 0x90], 0xc
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x88], ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea esi, [ebp - 0x6c]
test eax, eax
je 0x4016c3
call fcn.00401c30
lea esi, [ebp - 0x5c]
call fcn.00401c30
lea esi, [ebp - 0x34]
call fcn.00401c30
lea esi, [ebp - 0x4c]
call fcn.00401c30
lea ecx, [ebp - 0x24]
call fcn.00401040
mov al, 1
jmp 0x401539