Function at 0x413710
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x468
mov eax, dword [0x440068]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, edx
mov dword [ebp - 0x448], eax
mov eax, dword [ebp + 0x10]
xor ebx, ebx
mov dword [ebp - 0x434], edi
mov dword [ebp - 0x430], ecx
mov dword [ebp - 0x444], eax
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
jae 0x4139f4
push 0x20a
lea eax, [ebp - 0x218]
push ebx
push eax
call fcn.00417b20
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0x428]
add esp, 0xc
mov dword [ebp - 0x428], ebx
push eax
push 0x20019
push ebx
push edi
push dword [ebp - 0x430]
call esi
test eax, eax
jne 0x4137a6
push dword [ebp - 0x428]
mov eax, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call eax
jmp 0x4139f4
test edi, edi
je 0x4137de
cmp word [edi], bx
je 0x4137de
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4137b4
sub ecx, edx
mov eax, 0x104
sar ecx, 1
cmp ecx, eax
cmovb eax, ecx
push eax
lea eax, [ebp - 0x218]
push edi
push eax
call fcn.0041b898
add esp, 0xc
xor eax, eax
mov edi, 2
push 0x208
push eax
mov dword [ebp - 0xc], eax
mov word [ebp - 8], ax
lea eax, [ebp - 0x420]
push eax
call fcn.00417b20
add esp, 0xc
push 0
push 0
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.0041b5a1
push 0
push 0
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.0041b784
add esp, 0x28
mov dword [ebp - 0x424], ebx
lea eax, [ebp - 0x424]
push eax
push 0x20019
push 0
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x430]
call esi
test eax, eax
je 0x4138a2
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, edi
test ax, ax
jne 0x413870
sub ecx, edx
sar ecx, 1
cmp word [ebp + ecx*2 - 0x21a], 0x5c
jne 0x413893
xor eax, eax
mov word [ebp + ecx*2 - 0x21a], ax
cmp word [ebp - 0x218], bx
jne 0x413801
jmp 0x4138b4
push dword [ebp - 0x424]
mov eax, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call eax
mov edi, 1
cmp edi, 1
jne 0x4139ee
lea eax, [ebp - 0x428]
mov dword [ebp - 0x428], ebx
push eax
push 0x20019
push 0
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x430]
call esi
test eax, eax
jne 0x4139ee
mov esi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push 4
push eax
call esi
mov dword [ebp - 0xc], eax
test eax, eax
je 0x4139e2
lea eax, [ebp - 0xc]
mov dword [ebp - 0x42c], ebx
push eax
push 0
lea eax, [ebp - 0x42c]
push eax
push 0
push 0
push 4
push 4
push dword [ebp - 0x428]
call dword [sym.imp.ADVAPI32.dll_GetSecurityInfo]
test eax, eax
jne 0x4139d9
mov eax, dword [ebp - 0x42c]
test eax, eax
je 0x4139d9
movzx eax, word [eax + 2]
push eax
push 0x40
call esi
mov ebx, eax
mov dword [ebp - 0x424], ebx
test ebx, ebx
je 0x4139d9
mov ecx, dword [ebp - 0x42c]
push 2
movzx ecx, word [ecx + 2]
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
mov ecx, dword [ebp - 0x42c]
test eax, eax
mov dword [ebp - 0x43c], 0
setne bl
xor eax, eax
xor esi, esi
cmp ax, word [ecx + 4]
jae 0x4139d3
mov edi, dword [sym.imp.ADVAPI32.dll_GetAce]
nop dword [eax]
test bl, bl
je 0x4139d3
lea eax, [ebp - 0x43c]
push eax
push esi
push ecx
call edi
test eax, eax
je 0x4139c4
mov ecx, dword [ebp - 0x43c]
movzx eax, word [ecx + 2]
push eax
push ecx
push 0xffffffffffffffff
push 2
push dword [ebp - 0x424]
call dword [sym.imp.ADVAPI32.dll_AddAce]
test eax, eax
setne bl
mov ecx, dword [ebp - 0x42c]
inc esi
movzx eax, word [ecx + 4]
cmp esi, eax
jl 0x413990
mov ebx, dword [ebp - 0x424]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push dword [ebp - 0x428]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x434]
push 1
lea eax, [ebp - 0x468]
mov dword [ebp - 0x458], 0
xorps xmm0, xmm0
push eax
movups xmmword [ebp - 0x468], xmm0
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 0
push ebx
push 1
lea eax, [ebp - 0x468]
mov dword [ebp - 0x450], 0
push eax
mov dword [ebp - 0x454], 0xc
mov dword [ebp - 0x44c], 0
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
mov dword [ebp - 0x438], 0
lea eax, [ebp - 0x440]
mov dword [ebp - 0x440], 0
push eax
lea eax, [ebp - 0x438]
push eax
lea eax, [ebp - 0x454]
push eax
push 0x20006
push 0
push 0
push 0
push edi
push dword [ebp - 0x430]
lea ecx, [ebp - 0x468]
cmove ecx, dword [ebp - 0x450]
mov dword [ebp - 0x450], ecx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov esi, eax
test esi, esi
jne 0x413ad0
push dword [ebp + 0x14]
push dword [ebp - 0x444]
push dword [ebp + 0xc]
push eax
push dword [ebp - 0x448]
push dword [ebp - 0x438]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x438]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x413adb
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00415024
mov esp, ebp
pop ebp
ret