Function at 0x1021a1b
Capabilities:
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x80
mov eax, dword [0x103a02c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor ebx, ebx
mov edi, dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x28]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0x10], ebx
mov byte [ebp - 0xc], bl
mov byte [ebp - 0xb], bl
mov byte [ebp - 0xa], bl
mov byte [ebp - 9], bl
mov byte [ebp - 8], bl
mov byte [ebp - 7], 5
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x20], ebx
call edi
mov esi, dword [sym.imp.ADVAPI32.dll_CopySid]
test eax, eax
je 0x1021ad4
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov dword [ebp - 0x14], eax
add eax, 8
movzx eax, ax
mov dword [ebp - 0x20], eax
movzx eax, ax
push eax
call fcn.0100150d
pop ecx
mov dword [ebp - 0x3c], eax
cmp eax, ebx
je 0x1021ada
push dword [ebp - 0x28]
add eax, 8
push eax
push dword [ebp - 0x14]
call esi
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp + 0x10]
mov dword [eax + 4], ecx
mov cx, word [ebp - 0x20]
mov byte [eax], bl
mov byte [eax + 1], 3
mov word [eax + 2], cx
jmp 0x1021ae1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], 0x8007000e
lea eax, [ebp - 0x40]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 4
push 1
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x48], ebx
call edi
test eax, eax
je 0x1021b4e
push dword [ebp - 0x40]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov dword [ebp - 0x14], eax
add eax, 8
movzx eax, ax
mov dword [ebp - 0x48], eax
movzx eax, ax
push eax
call fcn.0100150d
pop ecx
mov dword [ebp - 0x34], eax
cmp eax, ebx
je 0x1021b54
push dword [ebp - 0x40]
add eax, 8
push eax
push dword [ebp - 0x14]
call esi
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp + 0x10]
mov dword [eax + 4], ecx
mov cx, word [ebp - 0x48]
mov byte [eax], bl
mov byte [eax + 1], 3
mov word [eax + 2], cx
jmp 0x1021b5b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], 0x8007000e
lea eax, [ebp - 0x24]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x12
push 1
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x54], ebx
call edi
test eax, eax
je 0x1021bc8
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov dword [ebp - 0x14], eax
add eax, 8
movzx eax, ax
mov dword [ebp - 0x54], eax
movzx eax, ax
push eax
call fcn.0100150d
pop ecx
mov dword [ebp - 0x2c], eax
cmp eax, ebx
je 0x1021bce
push dword [ebp - 0x24]
add eax, 8
push eax
push dword [ebp - 0x14]
call esi
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp + 0x10]
mov dword [eax + 4], ecx
mov cx, word [ebp - 0x54]
mov byte [eax], bl
mov byte [eax + 1], 3
mov word [eax + 2], cx
jmp 0x1021bd5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], 0x8007000e
lea eax, [ebp - 0x38]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x13
push 1
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x4c], ebx
call edi
test eax, eax
je 0x1021c42
push dword [ebp - 0x38]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov dword [ebp - 0x14], eax
add eax, 8
movzx eax, ax
mov dword [ebp - 0x4c], eax
movzx eax, ax
push eax
call fcn.0100150d
pop ecx
mov dword [ebp - 0x44], eax
cmp eax, ebx
je 0x1021c48
push dword [ebp - 0x38]
add eax, 8
push eax
push dword [ebp - 0x14]
call esi
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp + 0x10]
mov dword [eax + 4], ecx
mov cx, word [ebp - 0x4c]
mov byte [eax], bl
mov byte [eax + 1], 3
mov word [eax + 2], cx
jmp 0x1021c4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], 0x8007000e
lea eax, [ebp - 0x30]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x14
push 1
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x50], ebx
call edi
test eax, eax
je 0x1021cbb
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov dword [ebp - 0x1c], eax
add eax, 8
movzx eax, ax
mov dword [ebp - 0x50], eax
movzx eax, ax
push eax
call fcn.0100150d
mov edi, eax
pop ecx
mov dword [ebp - 0x14], edi
cmp edi, ebx
je 0x1021cc1
push dword [ebp - 0x30]
lea eax, [edi + 8]
push eax
push dword [ebp - 0x1c]
call esi
mov eax, dword [ebp + 0x10]
mov dword [edi + 4], eax
mov ax, word [ebp - 0x50]
mov byte [edi], bl
mov byte [edi + 1], 3
mov word [edi + 2], ax
jmp 0x1021cc8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], 0x8007000e
movzx eax, word [ebp - 0x50]
movzx edi, word [ebp - 0x4c]
movzx edx, word [ebp - 0x54]
movzx esi, word [ebp - 0x48]
movzx ecx, word [ebp - 0x20]
mov dword [ebp - 0x58], eax
add eax, edi
add eax, edx
add eax, esi
mov dword [ebp - 0x6c], esi
lea esi, [eax + ecx + 8]
push esi
mov dword [ebp - 0x68], edx
mov dword [ebp - 0x64], ecx
call fcn.0100150d
pop ecx
mov dword [ebp - 0x1c], eax
cmp eax, ebx
je 0x1021e68
push 2
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x1021e5d
mov esi, dword [sym.imp.ADVAPI32.dll_AddAce]
mov dword [ebp - 0x18], ebx
cmp word [ebp - 0x48], bx
je 0x1021d3e
push dword [ebp - 0x6c]
push dword [ebp - 0x34]
push ebx
push 2
push dword [ebp - 0x1c]
call esi
test eax, eax
je 0x1021d3e
mov dword [ebp - 0x18], 1
cmp word [ebp - 0x54], bx
je 0x1021d5b
push dword [ebp - 0x68]
push dword [ebp - 0x2c]
push dword [ebp - 0x18]
push 2
push dword [ebp - 0x1c]
call esi
test eax, eax
je 0x1021d5b
inc dword [ebp - 0x18]
cmp word [ebp - 0x4c], bx
je 0x1021d76
push edi
push dword [ebp - 0x44]
push dword [ebp - 0x18]
push 2
push dword [ebp - 0x1c]
call esi
test eax, eax
je 0x1021d76
inc dword [ebp - 0x18]
cmp word [ebp - 0x50], bx
je 0x1021d93
push dword [ebp - 0x58]
push dword [ebp - 0x14]
push dword [ebp - 0x18]
push 2
push dword [ebp - 0x1c]
call esi
test eax, eax
je 0x1021d93
inc dword [ebp - 0x18]
cmp word [ebp - 0x20], bx
je 0x1021da9
push dword [ebp - 0x64]
push dword [ebp - 0x3c]
push dword [ebp - 0x18]
push 2
push dword [ebp - 0x1c]
call esi
push 1
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x1021e56
push ebx
push dword [ebp - 0x1c]
lea eax, [ebp - 0x80]
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
cmp eax, ebx
je 0x1021e56
push ebx
push dword [ebp - 0x24]
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorOwner]
cmp eax, ebx
je 0x1021e56
push ebx
push dword [ebp - 0x28]
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorGroup]
cmp eax, ebx
je 0x1021e56
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorLength]
push eax
mov dword [ebp - 0x20], eax
call fcn.0100150d
mov esi, eax
pop ecx
cmp esi, ebx
je 0x1021e4d
lea eax, [ebp - 0x20]
push eax
push esi
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.ADVAPI32.dll_MakeSelfRelativeSD]
test eax, eax
je 0x1021e44
push dword [ebp - 0x20]
push esi
push 3
push ebx
push dword [ebp - 0x5c]
push dword [ebp - 0x60]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x1021e44
mov dword [ebp - 0x10], 0x80004005
push esi
call fcn.010014d6
pop ecx
jmp 0x1021e5d
mov dword [ebp - 0x10], 0x8007000e
jmp 0x1021e5d
mov dword [ebp - 0x10], 0x80004005
push dword [ebp - 0x1c]
call fcn.010014d6
pop ecx
jmp 0x1021e6f
mov dword [ebp - 0x10], 0x8007000e
cmp dword [ebp - 0x3c], ebx
je 0x1021e7d
push dword [ebp - 0x3c]
call fcn.010014d6
pop ecx
cmp dword [ebp - 0x34], ebx
je 0x1021e8b
push dword [ebp - 0x34]
call fcn.010014d6
pop ecx
cmp dword [ebp - 0x2c], ebx
je 0x1021e99
push dword [ebp - 0x2c]
call fcn.010014d6
pop ecx
cmp dword [ebp - 0x44], ebx
je 0x1021ea7
push dword [ebp - 0x44]
call fcn.010014d6
pop ecx
cmp dword [ebp - 0x14], ebx
je 0x1021eb5
push dword [ebp - 0x14]
call fcn.010014d6
pop ecx
mov esi, dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [ebp - 0x40], ebx
je 0x1021ec5
push dword [ebp - 0x40]
call esi
cmp dword [ebp - 0x24], ebx
je 0x1021ecf
push dword [ebp - 0x24]
call esi
cmp dword [ebp - 0x38], ebx
je 0x1021ed9
push dword [ebp - 0x38]
call esi
cmp dword [ebp - 0x30], ebx
je 0x1021ee3
push dword [ebp - 0x30]
call esi
cmp dword [ebp - 0x28], ebx
je 0x1021eed
push dword [ebp - 0x28]
call esi
mov esi, dword [ebp - 0x10]
cmp esi, ebx
jge 0x1021f01
push esi
call sub.wbemcomn.dll_class_CMemoryLog____stdcall_GetMemLogObject_void_
mov ecx, eax
call sub.wbemcomn.dll_public:_void___thiscall_CMemoryLog::Write_long_int_
mov eax, dword [section..data]
cmp eax, section..data
je 0x1021f2c
test byte [eax + 0x1c], 4
je 0x1021f2c
cmp byte [eax + 0x19], 2
jb 0x1021f2c
push esi
push 0x101fbf8
push 0xd
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01022f67
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.01006c81
leave
ret 0xc