Function at 0x5baf052d
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebx]
push edi
xor edi, edi
push esi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 8], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [eax + esi + 1], 0
jne 0x5baf0595
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 8]
push eax
push edi
push 0x5ba4f274
push esi
push dword [ebp + 8]
mov dword [ebp - 0x10], 4
call sub.SHLWAPI.dll_SHGetValueA
test eax, eax
jne 0x5baf0595
cmp dword [ebp - 8], 9
je 0x5baf06e5
cmp dword [ebp - 8], 8
je 0x5baf06e5
mov dword [ebp + 0xc], edi
push dword [ebp + 0xc]
lea eax, [ebp - 0x14]
push 0x5ba47830
push 4
push eax
call sub.SHLWAPI.dll_wnsprintfA
mov esi, dword [ebx]
add esp, 0x10
jmp 0x5baf05cc
lea eax, [ebp - 0x14]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x5baf05d1
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esi + eax + 1]
cmp byte [esi], 0
jne 0x5baf05b2
cmp byte [esi], 0
je 0x5baf05e2
inc dword [ebp + 0xc]
cmp dword [ebp + 0xc], 0x1000
jb 0x5baf0598
cmp dword [ebp + 0xc], 0x1000
jae 0x5baf06e5
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0xc]
push eax
push edi
push 0xf003f
push edi
push edi
push edi
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x5baf06e5
push 4
pop esi
push esi
lea eax, [ebp - 8]
push eax
push esi
push edi
push 0x5ba4f274
push dword [ebp - 0xc]
mov dword [ebp - 0x10], esi
mov dword [ebp - 8], 0xc
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x5baf06e5
push esi
lea eax, [ebp - 0x18]
push eax
push esi
push edi
push 0x5ba4f26c
push dword [ebp - 0xc]
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x10], esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x5baf06e5
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
add eax, esi
push eax
mov dword [ebp + 8], eax
lea eax, [ebp - 4]
push eax
call fcn.5baaee23
test eax, eax
jl 0x5baf06e5
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov esi, dword [ebx]
mov edi, dword [ebp - 4]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 0x10]
mov eax, dword [edi]
mov esi, dword [ebp + 8]
mov ecx, esi
sub ecx, eax
inc ecx
inc ecx
push ecx
lea ecx, [ebp - 0x14]
push ecx
mov ecx, dword [ebp - 4]
lea eax, [eax + ecx - 2]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov eax, dword [ebp - 4]
mov byte [eax + esi - 2], 0
mov eax, dword [ebp - 4]
mov byte [eax + esi - 1], 0
mov ecx, dword [ebx]
test ecx, ecx
je 0x5baf06d8
mov eax, dword [0x5bb73714]
mov edx, dword [eax]
push ecx
push eax
call dword [edx + 0x14]
and dword [ebx], 0
mov eax, dword [ebp - 4]
and dword [ebp - 4], 0
mov dword [ebx], eax
mov dword [edi], esi
xor edi, edi
cmp dword [ebp - 4], edi
je 0x5baf06fb
mov eax, dword [0x5bb73714]
push dword [ebp - 4]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov dword [ebp - 4], edi
cmp dword [ebp - 0xc], edi
pop edi
pop esi
pop ebx
je 0x5baf070c
push dword [ebp - 0xc]
call dword [entry0]
leave
ret 0xc