Function at 0x4059b8
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
mov eax, 0x428b6a
call fcn.00410ccc
sub esp, 0x38
mov eax, dword [ebp + 8]
cmp eax, 0x80000000
jne 0x4059d8
mov dword [ebp - 0x10], str.HKEY_CLASSES_ROOT_
jmp 0x405a3d
cmp eax, 0x80000001
jne 0x4059e8
mov dword [ebp - 0x10], str.HKEY_CURRENT_USER_
jmp 0x405a3d
cmp eax, 0x80000002
jne 0x4059f8
mov dword [ebp - 0x10], str.HKEY_LOCAL_MACHINE_
jmp 0x405a3d
cmp eax, 0x80000003
jne 0x405a08
mov dword [ebp - 0x10], str.HKEY_USERS_
jmp 0x405a3d
cmp eax, 0x80000004
jne 0x405a18
mov dword [ebp - 0x10], str.HKEY_PERFORMANCE_DATA_
jmp 0x405a3d
cmp eax, 0x80000005
jne 0x405a28
mov dword [ebp - 0x10], str.HKEY_CURRENT_CONFIG_
jmp 0x405a3d
cmp eax, 0x80000006
mov dword [ebp - 0x10], str.HKEY_DYN_DATA_
je 0x405a3d
mov dword [ebp - 0x10], 0x4347e8
push ebx
push esi
lea ecx, [ebp - 0x20]
push edi
push ecx
xor ebx, ebx
push 0xf003f
push ebx
push dword [ebp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
cmp esi, 2
je 0x405ebb
cmp esi, ebx
je 0x405ae3
push str.RegOpenKeyEx_
lea ecx, [ebp - 0x1c]
call fcn.0041ee56
push dword [ebp - 0x10]
mov dword [ebp - 4], ebx
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.0041eff0
push dword [ebp + 0xc]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.0041eff0
push 0x4342a8
push eax
lea eax, [ebp + 8]
mov byte [ebp - 4], 2
push eax
call fcn.0041eff0
push dword [eax]
mov byte [ebp - 4], 3
push esi
call fcn.0040bc53
pop ecx
mov byte [ebp - 4], 2
pop ecx
lea ecx, [ebp + 8]
call fcn.0041ede8
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call fcn.0041ede8
and byte [ebp - 4], bl
lea ecx, [ebp - 0x24]
call fcn.0041ede8
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
jmp 0x405eb2
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x28]
push ebx
push eax
lea eax, [ebp - 0x14]
push eax
push ebx
push ebx
push ebx
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov esi, eax
cmp esi, ebx
je 0x405b93
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str.RegQueryInfoKey_
lea ecx, [ebp - 0x1c]
call fcn.0041ee56
push dword [ebp - 0x10]
mov dword [ebp - 4], 4
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.0041eff0
push dword [ebp + 0xc]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.0041eff0
push 0x4342a8
push eax
lea eax, [ebp + 8]
mov byte [ebp - 4], 6
push eax
call fcn.0041eff0
push dword [eax]
mov byte [ebp - 4], 7
push esi
call fcn.0040bc53
pop ecx
mov byte [ebp - 4], 6
pop ecx
lea ecx, [ebp + 8]
call fcn.0041ede8
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 5
call fcn.0041ede8
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.0041ede8
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
jmp 0x405eb2
cmp dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
jbe 0x405bee
mov eax, dword [ebp - 0x28]
inc eax
push eax
call fcn.0041f286
mov edi, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
lea eax, [edi*4 + 4]
push eax
call fcn.0041f286
pop ecx
mov dword [ebp - 0x44], eax
pop ecx
cmp eax, ebx
mov dword [ebp - 4], 8
je 0x405be5
push fcn.0041ede8
push 0x4061a1
lea esi, [eax + 4]
push edi
push 4
push esi
mov dword [eax], edi
call fcn.004112db
jmp 0x405be7
xor esi, esi
or dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x1c], esi
xor esi, esi
cmp dword [ebp - 0x14], ebx
mov dword [ebp - 0x2c], ebx
mov edi, 0x4342a8
jbe 0x405ccf
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x24], eax
jmp 0x405c0b
xor ebx, ebx
mov eax, dword [ebp - 0x28]
push ebx
inc eax
push ebx
mov dword [ebp - 0x30], eax
push ebx
lea eax, [ebp - 0x30]
push ebx
push eax
push dword [ebp - 0x18]
push esi
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov ebx, eax
test ebx, ebx
jne 0x405c47
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x24]
call fcn.0041ef25
add dword [ebp - 0x24], 4
inc esi
cmp esi, dword [ebp - 0x14]
jb 0x405c09
jmp 0x405ccd
push str.RegEnumKeyEx_
lea ecx, [ebp - 0x38]
call fcn.0041ee56
push dword [ebp - 0x10]
mov dword [ebp - 4], 9
push eax
lea eax, [ebp - 0x34]
push eax
call fcn.0041eff0
push dword [ebp + 0xc]
mov byte [ebp - 4], 0xa
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.0041eff0
push edi
push eax
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 0xb
push eax
call fcn.0041eff0
push dword [eax]
mov byte [ebp - 4], 0xc
push ebx
call fcn.0040bc53
pop ecx
mov byte [ebp - 4], 0xb
pop ecx
lea ecx, [ebp - 0x2c]
call fcn.0041ede8
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 0xa
call fcn.0041ede8
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 9
call fcn.0041ede8
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x38]
call fcn.0041ede8
mov dword [ebp - 0x2c], 1
xor ebx, ebx
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x2c], ebx
je 0x405cfd
push dword [ebp - 0x18]
call fcn.0041f2af
pop ecx
mov ecx, dword [ebp - 0x1c]
cmp ecx, ebx
je 0x405eb7
push 3
call fcn.00405ecd
jmp 0x405eb7
cmp dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
jbe 0x405d8c
mov esi, dword [ebp - 0x1c]
push dword [ebp + 0xc]
lea ecx, [ebp - 0x2c]
call fcn.0041ee56
push 0x434124
push eax
lea eax, [ebp - 0x34]
mov dword [ebp - 4], 0xd
push eax
call fcn.0041eff0
push esi
push eax
lea eax, [ebp - 0x38]
mov byte [ebp - 4], 0xe
push eax
call fcn.0041ef8a
push dword [eax]
mov byte [ebp - 4], 0xf
push dword [ebp + 8]
call fcn.004059b8
mov ebx, eax
pop ecx
neg ebx
pop ecx
mov byte [ebp - 4], 0xe
sbb bl, bl
lea ecx, [ebp - 0x38]
inc bl
call fcn.0041ede8
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 0xd
call fcn.0041ede8
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.0041ede8
test bl, bl
jne 0x405d8a
inc dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
add esi, 4
cmp eax, dword [ebp - 0x14]
jb 0x405d0c
xor ebx, ebx
cmp dword [ebp - 0x18], ebx
je 0x405d9a
push dword [ebp - 0x18]
call fcn.0041f2af
pop ecx
mov ecx, dword [ebp - 0x1c]
cmp ecx, ebx
je 0x405da8
push 3
call fcn.00405ecd
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x10], eax
jb 0x405eb7
push dword [ebp + 0xc]
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x405ebb
cmp esi, 0x80000000
jne 0x405ddb
mov esi, str.HKEY_CLASSES_ROOT_
jmp 0x405e38
cmp esi, 0x80000001
jne 0x405dea
mov esi, str.HKEY_CURRENT_USER_
jmp 0x405e38
cmp esi, 0x80000002
jne 0x405df9
mov esi, str.HKEY_LOCAL_MACHINE_
jmp 0x405e38
cmp esi, 0x80000003
jne 0x405e08
mov esi, str.HKEY_USERS_
jmp 0x405e38
cmp esi, 0x80000004
jne 0x405e17
mov esi, str.HKEY_PERFORMANCE_DATA_
jmp 0x405e38
cmp esi, 0x80000005
jne 0x405e26
mov esi, str.HKEY_CURRENT_CONFIG_
jmp 0x405e38
cmp esi, 0x80000006
mov esi, str.HKEY_DYN_DATA_
je 0x405e38
mov esi, 0x4347e8
push str.RegDeleteKey_
lea ecx, [ebp - 0x44]
call fcn.0041ee56
push esi
push eax
lea eax, [ebp - 0x40]
mov dword [ebp - 4], 0x10
push eax
call fcn.0041eff0
push dword [ebp + 0xc]
mov byte [ebp - 4], 0x11
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.0041eff0
push edi
push eax
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 0x12
push eax
call fcn.0041eff0
push dword [eax]
mov byte [ebp - 4], 0x13
push dword [ebp + 8]
call fcn.0040bc53
pop ecx
mov byte [ebp - 4], 0x12
pop ecx
lea ecx, [ebp - 0x10]
call fcn.0041ede8
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0x11
call fcn.0041ede8
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0x10
call fcn.0041ede8
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x44]
call fcn.0041ede8
xor eax, eax
jmp 0x405ebe
push 1
pop eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret