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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push esi
call fcn.01004a87
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 4]
push eax
xor esi, esi
push esi
push 0xf003f
push esi
push 0x1001c68
push esi
push 0x1001888
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x1004e8e
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push edi
mov edi, dword [ebp + 8]
cmp edi, esi
je 0x1004e1f
cmp edi, 1
je 0x1004dfb
jle 0x1004e64
cmp edi, 9
jg 0x1004e64
lea eax, [ebp - 0xc]
push eax
push 0x1001910
push 0x80000002
mov dword [ebp - 0x10], 2
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
je 0x1004cfc
lea eax, [ebp - 0xc]
push eax
push 0x10018d0
push 0x80000001
mov dword [ebp - 0x10], 1
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x1004e8c
lea eax, [edi - 2]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
imul eax, eax, 0xc8
lea ecx, [ebp - 8]
push ecx
push esi
lea ecx, [ebp - 0x20]
push ecx
lea eax, [eax + 0x10124b8]
push esi
push eax
push dword [ebp - 0xc]
mov dword [ebp - 8], esi
mov dword [ebp - 0x18], eax
call edi
cmp eax, esi
mov dword [ebp + 8], eax
je 0x1004d35
mov dword [ebp - 8], 1
push dword [ebp - 8]
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
cmp dword [ebp + 8], esi
pop ecx
mov dword [ebp - 0x14], eax
mov word [eax], si
jne 0x1004d5e
lea ecx, [ebp - 8]
push ecx
push eax
lea eax, [ebp - 0x20]
push eax
push esi
push dword [ebp - 0x18]
push dword [ebp - 0xc]
call edi
mov eax, dword [ebp - 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
mov edi, eax
call esi
mov ecx, dword [ebp - 0x14]
and dword [ebp + 8], 0
lea eax, [ecx + eax*2]
mov dword [ebp - 0x1c], eax
cmp dword [ebp + 8], 0xf
jne 0x1004d95
mov edi, dword [ebp - 0x18]
push edi
call esi
lea eax, [eax + eax + 2]
push eax
push edi
push 1
push 0
push 0
push dword [ebp - 4]
call ebx
jmp 0x1004ddc
push 0x2c
push edi
call dword [sym.imp.msvcrt.dll_wcschr]
test eax, eax
pop ecx
pop ecx
je 0x1004da8
and word [eax], 0
push edi
call esi
lea eax, [eax + eax + 2]
push eax
mov eax, dword [ebp + 8]
push edi
push 1
push 0
push dword [eax*4 + 0x100d060]
push dword [ebp - 4]
call ebx
push edi
call esi
lea eax, [edi + eax*2 + 2]
cmp dword [ebp - 0x1c], eax
jae 0x1004dd5
mov edi, dword [ebp - 0x1c]
jmp 0x1004ddc
push edi
call esi
lea edi, [edi + eax*2 + 2]
inc dword [ebp + 8]
cmp dword [ebp + 8], 0x10
jb 0x1004d76
push dword [ebp - 0x14]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor esi, esi
jmp 0x1004e64
mov dword [ebp - 0x10], esi
xor edi, edi
push 2
push 0x1001c66
push 1
push esi
push dword [edi + 0x100d060]
push dword [ebp - 4]
call ebx
add edi, 4
cmp edi, 0x40
jb 0x1004e00
jmp 0x1004e64
mov eax, dword [0x1014b7c]
mov dword [ebp - 0x10], eax
mov edi, 0x100d060
mov dword [ebp + 8], 0x1012af8
mov dword [ebp - 0x1c], 0x10
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push dword [ebp + 8]
push 1
push esi
push dword [edi]
push dword [ebp - 4]
call ebx
add dword [ebp + 8], 0x208
add edi, 4
dec dword [ebp - 0x1c]
jne 0x1004e3a
push 4
lea eax, [ebp - 0x10]
push eax
push 4
push esi
push 0x10018b4
push dword [ebp - 4]
call ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 2
push esi
push esi
push 0x57
call dword [sym.imp.USER32.dll_SystemParametersInfoW]
pop edi
pop ebx
pop esi
leave
ret 4