Function at 0x4590c0
Capabilities:
Check os version
Delete registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 5
je 0x459101
cmp byte [0x597c60], 0
jne 0x459101
push str.Advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4590fa
push str.RegDeleteTreeW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x597c5c], eax
mov byte [0x597c60], 1
cmp dword [0x597c5c], 0
je 0x4592a4
mov eax, dword [0x599458]
mov edx, dword [eax + 0xc]
push ebx
push esi
mov ecx, 0x599458
mov dword [ebp - 4], 0
call edx
add eax, 0x10
mov dword [ebp - 0x10], eax
mov eax, dword [0x599458]
mov edx, dword [eax + 0xc]
mov ecx, 0x599458
call edx
mov ebx, dword [ebp + 8]
add eax, 0x10
mov dword [ebp - 0xc], eax
mov eax, dword [ebx + 4]
lea esi, [ebx + 4]
push 0x5c
push eax
call fcn.0051dd68
add esp, 8
test eax, eax
jne 0x45915e
or eax, 0xffffffff
jmp 0x459162
sub eax, dword [esi]
sar eax, 1
mov ecx, dword [esi]
mov edx, dword [ecx - 0xc]
inc eax
sub edx, eax
push edx
push eax
lea eax, [ebp - 8]
push eax
mov ecx, esi
call fcn.00449720
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp - 0xc]
call fcn.0044f5c0
mov eax, dword [ebp - 8]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4591a2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esi]
mov eax, dword [ecx - 0xc]
push edi
mov edi, dword [ebp - 0xc]
sub eax, dword [edi - 0xc]
lea edx, [ebp - 0xc]
dec eax
push eax
push 0
push edx
mov ecx, esi
call fcn.00449720
push eax
lea ecx, [ebp - 0x10]
call fcn.0044f5c0
mov eax, dword [ebp - 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4591e5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [ebx + 0xc]
mov eax, dword [ebp + 8]
mov ebx, dword [ebp - 0x10]
lea ecx, [ebp - 4]
push ecx
mov ecx, dword [eax]
or edx, 2
push edx
push 0
push ebx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x459263
mov edx, dword [ebp - 4]
push edi
push edx
call dword [0x597c5c]
mov esi, eax
mov eax, dword [ebp - 4]
neg esi
sbb esi, esi
push eax
inc esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [edi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x45923e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x45925a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [edi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x45927f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x45929b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
push ecx
mov ecx, dword [eax]
push ecx
call dword [sym.imp.SHLWAPI.dll_SHDeleteKeyW]
mov esp, ebp
pop ebp
ret