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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
jmp 0x5f342fe6
lea eax, [ebp - 4]
push eax
push 0x2001f
push 0
push dword [ebx + 4]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x5f342fe4
and dword [ebp + 0xc], eax
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp + 0xc]
push eax
push 0
lea eax, [ebp - 0x10]
push eax
push 0
push 0x5f341ef8
push dword [ebp - 4]
call esi
test eax, eax
jne 0x5f342ff8
mov edi, dword [ebp + 0xc]
lea ecx, [ebp + 0xc]
push ecx
push eax
lea ecx, [ebp - 0x10]
push ecx
push eax
push 0x5f341eec
push dword [ebp - 4]
mov dword [ebp + 0xc], eax
call esi
test eax, eax
jne 0x5f342ff8
add edi, dword [ebx + 0x14]
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x18], edi
call dword [sym.imp.msvcrt.dll_malloc]
add esi, dword [ebx + 0x18]
mov dword [ebp - 8], eax
push esi
mov dword [ebp - 0x1c], esi
call dword [sym.imp.msvcrt.dll_malloc]
cmp dword [ebp - 8], 0
pop ecx
pop ecx
mov dword [ebp - 0xc], eax
je 0x5f34300d
test eax, eax
je 0x5f343003
lea eax, [ebp + 0xc]
push eax
push dword [ebp - 8]
lea eax, [ebp - 0x10]
push eax
push 0
push 0x5f341ef8
push dword [ebp - 4]
mov dword [ebp + 0xc], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
test edi, edi
jne 0x5f342fbe
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
lea eax, [eax + ecx - 2]
mov dword [ebp - 0x14], eax
lea eax, [ebp + 0xc]
push eax
push dword [ebp - 0xc]
lea eax, [ebp - 0x10]
push eax
push edi
push 0x5f341eec
push dword [ebp - 4]
mov dword [ebp + 0xc], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
test edi, edi
jne 0x5f342fbe
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebx + 0x18]
mov edx, dword [ebp - 0xc]
mov esi, dword [ebx + 0x20]
lea edi, [eax + edx - 2]
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 ecx, dword [ebx + 0x14]
mov esi, dword [ebx + 0x1c]
mov edi, dword [ebp - 0x14]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp - 0x18]
add eax, 0xfffffffe
push eax
push dword [ebp - 8]
and ecx, 3
push 7
push 0
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 0x5f341ef8
push dword [ebp - 4]
call esi
mov edi, eax
test edi, edi
jne 0x5f342fbe
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffffe
push eax
push dword [ebp - 0xc]
push 7
push edi
push 0x5f341eec
push dword [ebp - 4]
call esi
mov edi, eax
test edi, edi
je 0x5f342fc5
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp - 8]
mov esi, dword [sym.imp.msvcrt.dll_free]
call esi
push dword [ebp - 0xc]
call esi
pop ecx
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x5f342fff
mov ebx, dword [ebx]
test ebx, ebx
jne 0x5f342e51
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 8
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x5f342ff1
push dword [ebp - 8]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
cmp dword [ebp - 0xc], 0
je 0x5f34301d
push dword [ebp - 0xc]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
push 0xe
jmp 0x5f342ff9