Function at 0x406c60
Capabilities:
Create directory
Get user security identifier

Disassembly:
push 0xffffffffffffffff
push 0x427d58
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push ebp
push esi
push edi
mov eax, dword [0x433a70]
xor eax, esp
push eax
lea eax, [esp + 0x34]
mov dword fs:[0], eax
mov dword [esp + 0x24], ecx
push str.ModifyPermissions
lea ecx, [esp + 0x30]
call fcn.00401130
mov esi, dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
xor ebx, ebx
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x1c]
push ecx
push ebx
lea edx, [esp + 0x2c]
push edx
push ebx
push str.Administrators
push ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], ebx
call esi
mov eax, dword [esp + 0x20]
cmp eax, ebx
jne 0x406ce5
lea eax, [esp + 0x2c]
push str.Unable_to_get_SID_for_Administrators
push eax
call fcn.00401460
add esp, 8
jmp 0x406fbb
push eax
call fcn.00409b95
mov ebp, eax
add esp, 4
cmp ebp, ebx
mov dword [esp + 0x14], ebp
je 0x406fbb
mov eax, dword [esp + 0x18]
cmp eax, ebx
jbe 0x406f94
push eax
call fcn.00409b95
add esp, 4
cmp eax, ebx
mov dword [esp + 0x1c], eax
je 0x406f94
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x1c]
push edx
push eax
lea ecx, [esp + 0x2c]
push ecx
push ebp
push str.Administrators
push ebx
call esi
mov edi, dword [esp + 0x48]
push edi
lea edx, [esp + 0x30]
push str.Object_to_modify:__s
push edx
call fcn.00401460
mov eax, dword [esp + 0x50]
add esp, 0xc
cmp eax, 1
jne 0x406e28
cmp dword [esp + 0x4c], ebx
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x2000000
jne 0x406d71
push 4
jmp 0x406d73
push 3
push 0
push 0
push 0xe0000
push edi
call ebp
mov esi, eax
cmp esi, 0xffffffff
jne 0x406dfc
cmp dword [esp + 0x4c], 1
jne 0x406dbd
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x406dbd
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x34]
push str.Error:__d_when_opening_file__s
push eax
call fcn.00401460
mov ebp, dword [esp + 0x24]
add esp, 0x10
jmp 0x406f94
push 0
push 0x2000000
push 3
push 0
push 0
push 0xe0000
push edi
call ebp
mov esi, eax
cmp esi, 0xffffffff
jne 0x406dfc
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x34]
push str.Error:__d_when_opening_file__s
push ecx
call fcn.00401460
mov ebp, dword [esp + 0x24]
add esp, 0x10
jmp 0x406f94
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x24]
push 3
push 2
push 0x1fffff
push 0
push edx
push 1
push esi
call fcn.00403ef0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebp, dword [esp + 0x14]
jmp 0x406f94
cmp eax, 4
jne 0x406f94
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x406e36
sub eax, edx
add eax, 1
push eax
call fcn.00409b95
mov ebx, eax
mov edx, ebx
add esp, 4
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x406e55
push 0x429658
push ebx
call fcn.00412936
mov esi, eax
add esp, 8
test esi, esi
jne 0x406e85
push ebx
push str.Invalid_Registry_Key_format:__s
lea eax, [esp + 0x34]
push eax
jmp 0x406f8c
push str.HKLM
mov byte [esi], 0
push ebx
add esi, 1
call fcn.00413cf2
add esp, 8
test eax, eax
jne 0x406ea4
mov eax, 0x80000002
jmp 0x406f1f
push str.HKEY_LOCAL_MACHINE
push ebx
call fcn.00413cf2
add esp, 8
test eax, eax
jne 0x406ebd
mov eax, 0x80000002
jmp 0x406f1f
push str.HKEY_CLASSES_ROOT
push ebx
call fcn.00413cf2
add esp, 8
test eax, eax
jne 0x406ed6
mov eax, 0x80000000
jmp 0x406f1f
push str.HKEY_CURRENT_USER
push ebx
call fcn.00413cf2
add esp, 8
test eax, eax
jne 0x406eef
mov eax, 0x80000001
jmp 0x406f1f
push str.HKEY_USERS
push ebx
call fcn.00413cf2
add esp, 8
test eax, eax
jne 0x406f08
mov eax, 0x80000003
jmp 0x406f1f
push str.HKEY_CURRENT_CONFIG
push ebx
call fcn.00413cf2
add esp, 8
test eax, eax
jne 0x406f81
mov eax, VariantClear
push 0
lea ecx, [esp + 0x50]
push ecx
push 0
push 0xe0000
push 0
push 0x42967e
push 0
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x406f58
push esi
push ebx
lea edx, [esp + 0x34]
push str.Error_opening_key:__s_subkey__s
push edx
call fcn.00401460
add esp, 0x10
jmp 0x406f94
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x24]
push 3
push 2
push 0x1fffff
push 0
push ebp
push 4
push eax
call fcn.00403ef0
mov ecx, dword [esp + 0x4c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x406f94
push ebx
push str.Unknown_registry_key:__s
lea edx, [esp + 0x34]
push edx
call fcn.00401460
add esp, 0xc
push ebp
call fcn.00409b90
mov eax, dword [esp + 0x20]
add esp, 4
test eax, eax
je 0x406fae
push eax
call fcn.00409b90
add esp, 4
test ebx, ebx
je 0x406fbb
push ebx
call fcn.00409b90
add esp, 4
lea ecx, [esp + 0x2c]
mov dword [esp + 0x3c], 0xffffffff
call fcn.004012e0
xor eax, eax
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret 0xc