Function at 0x4a6760
Capabilities:
Delete registry key
Query or enumerate registry key
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a3deb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x524
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
xor edi, edi
mov dword [ebp - 4], edi
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
mov bl, 2
push eax
push ecx
mov byte [ebp - 4], bl
call fcn.0056b6f5
add esp, 8
test eax, eax
je 0x4a67b2
mov edx, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
jmp 0x4a67b5
mov esi, dword [ebp + 8]
mov al, byte [ebp + 0x20]
test al, al
jne 0x4a67c7
mov eax, dword [ebp + 0x14]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
lea ecx, [ebp - 0x120]
push 0x104
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4a6818
lea ecx, [ebp - 0x32c]
call fcn.00477f00
push 1
push str.Error_bi200001_r_n
lea ecx, [ebp - 0x32c]
mov byte [ebp - 4], 3
call fcn.00478010
lea ecx, [ebp - 0x32c]
mov byte [ebp - 4], bl
call fcn.00478000
jmp 0x4a69e6
lea edx, [ebp - 0x42c]
lea eax, [ebp - 0x220]
push edx
lea ecx, [ebp - 0x530]
push eax
lea edx, [ebp + 8]
push ecx
lea eax, [ebp - 0x120]
push edx
push eax
call fcn.0056b52c
mov ecx, dword [ebp + 0x1c]
add esp, 0x14
lea edx, [ebp - 0x530]
lea eax, [ebp + 8]
push ecx
push edx
push eax
lea ecx, [ebp - 0x120]
push 0x6379c4
push ecx
call fcn.0056b4da
add esp, 0x14
lea edx, [ebp - 0x1c]
lea eax, [ebp + 0x1c]
push edi
push edi
push edi
push edi
push edi
push edi
push edx
push eax
push edi
push edi
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
jne 0x4a694d
cmp dword [ebp + 0x1c], edi
je 0x4a694d
xor ebx, ebx
test edi, edi
jne 0x4a694d
lea ecx, [ebp - 0x224]
push 0x104
push ecx
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edi, eax
test edi, edi
jne 0x4a6947
lea edx, [ebp - 0x18]
lea eax, [ebp + 8]
push edx
push eax
push edi
push 0xf003f
push edi
push 0x660ff8
lea ecx, [ebp - 0x224]
push edi
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x4a6947
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x430]
push edx
push eax
push edi
push edi
push edi
push ecx
mov dword [ebp - 0x14], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4a693d
lea edx, [ebp - 0x430]
lea eax, [ebp - 0x120]
push edx
push eax
call fcn.00573ec0
add esp, 8
test eax, eax
jne 0x4a693d
mov edx, dword [ebp + 0x14]
lea ecx, [ebp - 0x224]
push ecx
push edx
call fcn.0056b6f5
add esp, 8
test eax, eax
je 0x4a693d
lea eax, [ebp - 0x224]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc ebx
jmp 0x4a688e
mov al, byte [ebp + 0x20]
test al, al
je 0x4a69e6
mov eax, dword [ebp + 0x14]
lea edx, [ebp + 0x20]
push 0
push edx
push 0
push 0xf003f
push 0
push 0
push 0
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x4a69e6
lea edi, [ebp - 0x120]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov edx, dword [ebp + 0x20]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
not ecx
push ecx
lea ecx, [ebp - 0x120]
push ecx
push 1
push eax
push eax
push edx
call esi
mov ecx, dword [ebp + 0x20]
lea eax, [ebp + 8]
push 4
push eax
push 4
push 0
push str.contexts
push ecx
mov dword [ebp + 8], 0xf3
call esi
mov edx, dword [ebp + 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x4a69e6
mov ebx, dword [ebp + 0x14]
or ecx, 0xffffffff
mov edi, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push ebx
push 1
push eax
mov eax, dword [ebp + 0x18]
push eax
push edx
call esi
lea ecx, [ebp + 0x10]
mov dword [ebp - 4], 0
call fcn.00586b33
lea ecx, [ebp + 0x14]
mov dword [ebp - 4], 0xffffffff
call fcn.00586b33
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x1c