Function at 0x404510
Capabilities:
Create directory
Delete directory

Disassembly:
push ebp
lea ebp, [esp - 0x108]
sub esp, 0x108
push 0xfffffffffffffffe
push 0x4278f0
push 0x40e2d0
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x42a0d0]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp + 0x104], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov eax, dword [ebp + 0x110]
mov dword [ebp - 0x24], eax
mov edi, dword [ebp + 0x114]
xor esi, esi
mov dword [ebp - 4], esi
mov byte [ebp - 0x19], 0
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], esi
xor eax, eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov byte [ebp], al
push 0x103
push esi
lea ecx, [ebp + 1]
push ecx
call fcn.0040d990
push 0x21c
call fcn.0040cf44
add esp, 0x10
mov ebx, eax
cmp ebx, esi
je 0x404724
push 0x21c
push esi
push ebx
call fcn.0040d990
add esp, 0xc
lea eax, [ebp]
dec eax
lea esp, [esp]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4045c0
mov edx, dword [0x424aec]
mov dword [eax], edx
mov cl, byte [0x424af0]
mov byte [eax + 4], cl
mov eax, edi
mov esi, edi
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4045e0
sub eax, esi
lea edi, [ebp]
dec edi
lea ecx, [ecx]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4045f0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp]
dec edi
lea ebx, [ebx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404610
mov dx, word [0x4243c8]
mov word [edi], dx
push 0
mov edi, dword [ebp - 0x24]
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x40471b
lea eax, [ebp - 0x20]
push eax
push 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
lea ecx, [ebp - 0x30]
push ecx
push str.SeRestorePrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov dword [ebp - 0x34], 1
mov dword [ebp - 0x28], 2
push 0
push 0
push 0x10
lea edx, [ebp - 0x34]
push edx
push 0
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40468c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0x2200000
push 3
push 0
push 0
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40471b
mov dword [ebx], 0xa0000003
push 0x104
lea ecx, [ebx + 0x10]
push ecx
push 0xffffffffffffffff
lea edx, [ebp]
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea ecx, [eax + eax]
mov word [ebx + 0xc], cx
dec eax
add eax, eax
mov word [ebx + 0xa], ax
movzx eax, ax
add eax, 0xc
mov dword [ebx + 4], eax
push 0
lea edx, [ebp - 0x38]
push edx
push 0
push 0
add eax, 8
push eax
push ebx
push 0x900a4
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push esi
test eax, eax
je 0x40470e
mov byte [ebp - 0x19], 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40471b
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
push ebx
call fcn.0040e5af
add esp, 4
mov dword [ebp - 4], 0xfffffffe
mov al, byte [ebp - 0x19]
jmp 0x404742
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x104]
xor ecx, ebp
call fcn.0040d609
add ebp, 0x108
mov esp, ebp
pop ebp
ret