Function at 0x447240
Capabilities:
Get user security identifier

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4c4408
push eax
mov eax, 0x1650
mov dword fs:[0], esp
call fcn.00475160
push esi
mov esi, ecx
push edi
mov dword [esp + 0x2c], esi
mov al, byte [0x4ffc58]
xor edi, edi
test al, 1
mov dword [esp + 0x1660], edi
mov dword [esp + 0x20], 0xfa
mov dword [esp + 0x1c], 0x400
mov dword [esp + 0x24], 0x100
jne 0x4472b3
mov dl, al
mov eax, dword [0x4f5b3c]
or dl, 1
push 0x447590
mov byte [0x4ffc58], dl
mov dword [0x4ffc5c], eax
call fcn.00474d9c
add esp, 4
mov ecx, dword [0x4ffc5c]
cmp dword [ecx - 8], edi
jne 0x4472ec
lea edx, [esp + 0x24]
lea eax, [esp + 0x54]
push edx
push eax
push 0x220
call fcn.00448480
add esp, 0xc
lea ecx, [esp + 0x54]
push ecx
push 0x4f1fb0
push 0x4ffc5c
call fcn.004a768f
add esp, 0xc
lea edx, [esp + 0x658]
lea eax, [esp + 0x20]
push edx
lea ecx, [esp + 0xe5c]
push eax
lea edx, [esp + 0x24]
push ecx
mov ecx, dword [0x4ffc5c]
lea eax, [esp + 0x264]
push edx
push eax
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
test eax, eax
jne 0x44733e
lea ecx, [esp + 0x166c]
mov dword [esp + 0x1660], 0xffffffff
call fcn.004a9c1f
xor eax, eax
jmp 0x447577
push 1
push str.SeSecurityPrivilege
mov ecx, esi
call fcn.004475a0
mov eax, dword [esp + 0x166c]
mov ecx, dword [esp + 0x1668]
lea edx, [esp + 0xc]
push edx
push 0x1060000
push edi
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, edi
mov dword [esp + 8], eax
je 0x447393
lea ecx, [esp + 0x166c]
mov dword [esp + 0x1660], 0xffffffff
call fcn.004a9c1f
xor eax, eax
jmp 0x447577
mov eax, dword [0x4ffc60]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, edi
push ebp
mov dword [esp + 0x30], 0x1fa0
jne 0x4473ba
push 0x1fa0
push 0x40
call ebx
mov dword [0x4ffc60], eax
mov ebp, dword [esp + 0x1678]
test ebp, ebp
je 0x4473e4
lea edx, [esp + 0x30]
push edx
push eax
mov eax, dword [esp + 0x1c]
push 0xf
push eax
call dword [sym.imp.ADVAPI32.dll_RegGetKeySecurity]
test eax, eax
mov dword [esp + 0x10], eax
jne 0x447511
lea ecx, [esp + 0x48]
push 1
push ecx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x447511
lea edx, [esp + 0x44]
lea eax, [esp + 0x18]
push edx
mov edx, dword [0x4ffc60]
lea ecx, [esp + 0x24]
push eax
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
jne 0x447424
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x447511
mov ecx, dword [esp + 0x18]
push 2
lea eax, [esp + 0x3c]
push 0xc
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
je 0x447511
lea edx, [esp + 0x260]
push edx
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, dword [esp + 0x3c]
lea esi, [eax + ecx + 8]
push esi
push 0x40
call ebx
mov edi, eax
push 2
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x447511
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4474c9
mov eax, dword [esp + 0x38]
test eax, eax
je 0x4474c9
xor ebx, ebx
test eax, eax
jbe 0x4474c9
mov ebp, dword [sym.imp.ADVAPI32.dll_GetAce]
mov esi, dword [sym.imp.ADVAPI32.dll_AddAce]
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x1c]
push edx
push ebx
push eax
call ebp
test eax, eax
je 0x4474c2
mov eax, dword [esp + 0x1c]
xor ecx, ecx
mov cx, word [eax + 2]
push ecx
push eax
push 0xffffffffffffffff
push 2
push edi
call esi
test eax, eax
je 0x4474c2
mov eax, dword [esp + 0x38]
inc ebx
cmp ebx, eax
jb 0x447491
mov ebp, dword [esp + 0x1678]
test ebp, ebp
je 0x4474e7
lea edx, [esp + 0x260]
push edx
push 0xf003f
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x447511
push 0
push edi
lea eax, [esp + 0x50]
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x447511
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x48]
push ecx
push 4
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
mov dword [esp + 0x10], eax
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
test ebp, ebp
pop ebp
pop ebx
jne 0x44752f
mov eax, dword [0x4ffc60]
push eax
call esi
mov dword [0x4ffc60], 0
test edi, edi
je 0x447536
push edi
call esi
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x2c]
push 0
push str.SeSecurityPrivilege
call fcn.004475a0
mov eax, dword [esp + 8]
xor edx, edx
test eax, eax
sete dl
lea ecx, [esp + 0x166c]
mov esi, edx
mov dword [esp + 0x1660], 0xffffffff
call fcn.004a9c1f
mov eax, esi
mov ecx, dword [esp + 0x1658]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x165c
ret 0xc