Function at 0x10410d5
Capabilities:
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
xor ecx, ecx
mov edi, 0x8000
mov dword [ebp - 8], ecx
mov dword [ebp - 4], ecx
mov dword [ebp - 0x10], edi
mov eax, dword [0x1075004]
mov esi, 0x1075004
mov ebx, 0x1002eb4
cmp eax, esi
je 0x104111f
test byte [eax + 0x1c], 4
je 0x104111f
cmp byte [eax + 0x19], 5
jb 0x104111f
push ebx
push 0x16
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010090c5
xor ecx, ecx
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 4]
push eax
push ecx
push 0x20006
push ecx
push 0x1001768
push ecx
push 0x1002ef0
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x1041179
mov eax, dword [0x1075004]
cmp eax, esi
je 0x1041171
test byte [eax + 0x1c], 4
je 0x1041171
cmp byte [eax + 0x19], 2
jb 0x1041171
push dword [ebp - 0xc]
push ebx
push 0x17
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101463a
mov eax, dword [ebp - 0xc]
jmp 0x104132c
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_IsValidSecurityDescriptor]
test eax, eax
jne 0x10411b4
mov edi, 0x53a
mov eax, dword [0x1075004]
cmp eax, esi
je 0x104130d
test byte [eax + 0x1c], 4
je 0x104130d
cmp byte [eax + 0x19], 2
jb 0x104130d
push ebx
push 0x18
jmp 0x1041289
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
jne 0x10411fb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x1075004]
cmp eax, esi
je 0x104130d
test byte [eax + 0x1c], 4
je 0x104130d
cmp byte [eax + 0x19], 2
jb 0x104130d
push edi
push ebx
push 0x19
jmp 0x1041302
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorLength]
mov dword [ebp - 0x14], eax
push eax
test dword [ebp - 0x10], edi
je 0x1041256
push dword [ebp + 8]
push 3
push 0
push 0x1002ed4
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
test edi, edi
je 0x104130d
mov eax, dword [0x1075004]
cmp eax, esi
je 0x104130d
test byte [eax + 0x1c], 4
je 0x104130d
cmp byte [eax + 0x19], 2
jb 0x104130d
push edi
push ebx
push 0x1a
jmp 0x1041302
call fcn.0105c184
mov dword [ebp - 8], eax
test eax, eax
jne 0x1041296
push 8
pop edi
mov eax, dword [0x1075004]
cmp eax, esi
je 0x104130d
test byte [eax + 0x1c], 4
je 0x104130d
cmp byte [eax + 0x19], 2
jb 0x104130d
push ebx
push 0x1b
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010090c5
jmp 0x104130d
lea ecx, [ebp - 0x14]
push ecx
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_MakeSelfRelativeSD]
test eax, eax
jne 0x10412cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x1075004]
cmp eax, esi
je 0x104130d
test byte [eax + 0x1c], 4
je 0x104130d
cmp byte [eax + 0x19], 2
jb 0x104130d
push edi
push ebx
push 0x1c
jmp 0x1041302
push dword [ebp - 0x14]
push dword [ebp - 8]
push 3
push 0
push 0x1002ed4
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
test edi, edi
je 0x104130d
mov eax, dword [0x1075004]
cmp eax, esi
je 0x104130d
test byte [eax + 0x1c], 4
je 0x104130d
cmp byte [eax + 0x19], 2
jb 0x104130d
push edi
push ebx
push 0x1d
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101463a
cmp dword [ebp - 4], 0
je 0x104131c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 8], 0
je 0x104132a
push dword [ebp - 8]
call fcn.0105c21c
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 4