Function at 0x10051e58
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x100520f1
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 4], eax
lea eax, [ebp - 8]
push eax
push 2
push 0
mov eax, esi
call fcn.10004a00
push eax
push ebx
call sub.advapi32.dll_RegOpenKeyExA_1
test eax, eax
jne 0x100520c0
xor eax, eax
push ebp
push 0x100520b9
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov al, byte [ebp + 8]
cmp eax, 7
ja case.0x10051ebf.0
jmp dword [eax*4 + 0x10051ec6]
mov eax, dword [ebp + 0xc]
call fcn.10004800
push eax
mov eax, dword [ebp + 0xc]
call fcn.10004a00
push eax
push 1
push 0
mov eax, edi
call fcn.10004a00
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegSetValueExA
test eax, eax
sete al
neg al
sbb eax, eax
mov dword [ebp - 4], eax
jmp case.0x10051ebf.0
mov eax, dword [ebp + 0xc]
call fcn.10004800
mov edx, dword [ebp + 0xc]
cmp byte [edx + eax - 1], 0x20
je 0x10051f40
lea eax, [ebp - 0xc]
mov ecx, 0x1005210c
mov edx, dword [ebp + 0xc]
call fcn.1000484c
xor eax, eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0xc]
call fcn.10004800
mov ecx, 3
cdq
idiv ecx
push eax
lea eax, [ebp - 0x10]
mov ecx, 1
mov edx, dword [0x10051e34]
call fcn.10005b5c
add esp, 4
jmp 0x10051fcd
lea eax, [ebp - 0x1c]
push eax
mov edx, dword [ebp - 0xc]
mov eax, 0x1005210c
call fcn.10004ae8
mov ecx, eax
dec ecx
xor edx, edx
mov eax, dword [ebp - 0xc]
call fcn.10004a60
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x18]
mov edx, 0x10052118
call fcn.1000484c
mov eax, dword [ebp - 0x18]
call fcn.1004b4f4
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov byte [edx + ecx], al
mov edx, dword [ebp - 0xc]
mov eax, 0x1005210c
call fcn.10004ae8
mov ecx, eax
inc ecx
lea eax, [ebp - 0xc]
mov edx, 1
call fcn.10004aa0
inc dword [ebp - 0x14]
cmp dword [ebp - 0xc], 0
jne 0x10051f6e
mov eax, dword [ebp - 0x10]
call fcn.10005980
push eax
mov eax, dword [ebp - 0x10]
push eax
push 3
push 0
mov eax, edi
call fcn.10004a00
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegSetValueExA
test eax, eax
sete al
neg al
sbb eax, eax
mov dword [ebp - 4], eax
jmp case.0x10051ebf.0
mov eax, dword [ebp + 0xc]
call fcn.1004b4f4
mov dword [ebp - 0x14], eax
push 4
lea eax, [ebp - 0x14]
push eax
push 4
push 0
mov eax, edi
call fcn.10004a00
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegSetValueExA
test eax, eax
sete al
neg al
sbb eax, eax
mov dword [ebp - 4], eax
jmp case.0x10051ebf.0
mov eax, dword [ebp + 0xc]
call fcn.10004800
push eax
mov eax, dword [ebp + 0xc]
call fcn.10004a00
push eax
push 7
push 0
mov eax, edi
call fcn.10004a00
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegSetValueExA
test eax, eax
sete al
neg al
sbb eax, eax
mov dword [ebp - 4], eax
jmp case.0x10051ebf.0
mov eax, dword [ebp + 0xc]
call fcn.10004800
push eax
mov eax, dword [ebp + 0xc]
call fcn.10004a00
push eax
push 2
push 0
mov eax, edi
call fcn.10004a00
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegSetValueExA
test eax, eax
sete al
neg al
sbb eax, eax
mov dword [ebp - 4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x100520c0
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey_1
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x100520f8
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.10004548
lea eax, [ebp - 0x10]
mov edx, dword [0x10051e34]
call fcn.10005b68
lea eax, [ebp - 0xc]
call fcn.10004524
ret