Function at 0x4581d0
Capabilities:
Check os version
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d493b
mov eax, dword fs:[0]
push eax
sub esp, 0x27c
mov eax, dword [0x5254e0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
lea eax, [ebp - 0x168]
push eax
mov dword [ebp - 0x168], 0x114
call dword [sym.imp.KERNEL32.DLL_GetVersionExW]
test eax, eax
je 0x458909
cmp dword [ebp - 0x164], 5
jne 0x458909
mov ebx, 1
cmp dword [ebp - 0x160], ebx
jne 0x458909
push ebx
push 3
lea ecx, [ebp - 0x288]
call fcn.0041cae0
lea ecx, [ebp - 0x174]
push ecx
xor edi, edi
push 0x20019
push edi
push str.SYSTEMCurrentControlSetServicesTcpipLinkage
mov dword [ebp - 4], edi
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x174], edi
mov dword [ebp - 0x178], edi
mov byte [ebp - 4], bl
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
cmp esi, edi
je 0x4582f8
lea edx, [ebp - 0x278]
push str.Open_Registry_Key_failed__
push edx
call fcn.0040b990
add esp, 8
push esi
push eax
call fcn.004589c0
push 0x4faa0c
push eax
call fcn.0040b990
add esp, 8
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x288]
call fcn.0041cca0
mov byte [ebp - 4], 2
cmp dword [eax + 0x14], 0x10
jb 0x4582cf
mov ecx, dword [eax]
mov dword [ebp - 0x16c], ecx
jmp 0x4582d5
mov dword [ebp - 0x16c], eax
lea edx, [ebp - 0x16c]
push edx
lea ecx, [ebp - 0x1bc]
call fcn.004a936f
push 0x515244
lea eax, [ebp - 0x1bc]
push eax
call fcn.004aba66
push ebx
call fcn.0049842b
mov esi, eax
add esp, 4
mov dword [ebp - 0x178], esi
cmp esi, edi
jne 0x458391
lea ecx, [ebp - 0x278]
push str.PatchDNS
push ecx
call fcn.0040b990
add esp, 8
push 0x4e4b14
push eax
call fcn.0040b990
add esp, 8
push 0x467
mov ecx, eax
call fcn.004069e0
push str.:_Out_of_memory
push eax
call fcn.0040b990
add esp, 8
lea edx, [ebp - 0x30]
push edx
lea ecx, [ebp - 0x288]
call fcn.0041cca0
mov byte [ebp - 4], 3
cmp dword [eax + 0x14], 0x10
jb 0x458368
mov eax, dword [eax]
lea ecx, [ebp - 0x16c]
push ecx
lea ecx, [ebp - 0x1a4]
mov dword [ebp - 0x16c], eax
call fcn.004a936f
push 0x515244
lea edx, [ebp - 0x1a4]
push edx
call fcn.004aba66
mov edx, dword [ebp - 0x174]
lea eax, [ebp - 0x170]
push eax
push esi
lea ecx, [ebp - 0x17c]
push ecx
push edi
push str.Bind
mov dword [ebp - 0x170], ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push edx
call ebx
mov edi, eax
cmp edi, 0xea
jne 0x45848d
push esi
call fcn.004a9da3
mov eax, dword [ebp - 0x170]
add esp, 4
push eax
call fcn.0049842b
mov esi, eax
add esp, 4
mov dword [ebp - 0x178], esi
test esi, esi
jne 0x458471
lea ecx, [ebp - 0x278]
push str.PatchDNS
push ecx
call fcn.0040b990
add esp, 8
push 0x4e4b14
push eax
call fcn.0040b990
add esp, 8
push 0x477
mov ecx, eax
call fcn.004069e0
push str.:_Out_of_memory
push eax
call fcn.0040b990
add esp, 8
lea edx, [ebp - 0x30]
push edx
lea ecx, [ebp - 0x288]
call fcn.0041cca0
mov byte [ebp - 4], 4
cmp dword [eax + 0x14], 0x10
jb 0x458448
mov eax, dword [eax]
lea ecx, [ebp - 0x16c]
push ecx
lea ecx, [ebp - 0x18c]
mov dword [ebp - 0x16c], eax
call fcn.004a936f
push 0x515244
lea edx, [ebp - 0x18c]
push edx
call fcn.004aba66
mov ecx, dword [ebp - 0x174]
lea eax, [ebp - 0x170]
push eax
push esi
push 0
push 0
push str.Bind
push ecx
call ebx
mov edi, eax
test edi, edi
jne 0x45880f
cmp dword [ebp - 0x17c], 7
jne 0x45880f
mov ebx, dword [ebp - 0x170]
cmp byte [ebx + esi - 1], 0
je 0x4584bb
mov dword [ebp - 0x16c], 2
jmp 0x4584d0
cmp byte [ebx + esi - 2], 0
je 0x4585a7
mov dword [ebp - 0x16c], 1
mov edx, dword [ebp - 0x16c]
add edx, ebx
push edx
call fcn.0049842b
mov edi, eax
add esp, 4
test edi, edi
jne 0x458573
lea eax, [ebp - 0x278]
push str.PatchDNS
push eax
call fcn.0040b990
add esp, 8
push 0x4e4b14
push eax
call fcn.0040b990
add esp, 8
push 0x494
mov ecx, eax
call fcn.004069e0
push str.:_Out_of_memory
push eax
call fcn.0040b990
add esp, 8
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x288]
call fcn.0041cca0
mov byte [ebp - 4], 6
cmp dword [eax + 0x14], 0x10
jb 0x45854a
mov edx, dword [eax]
mov dword [ebp - 0x16c], edx
jmp 0x458550
mov dword [ebp - 0x16c], eax
lea eax, [ebp - 0x16c]
push eax
lea ecx, [ebp - 0x1d4]
call fcn.004a936f
push 0x515244
lea ecx, [ebp - 0x1d4]
push ecx
call fcn.004aba66
mov edx, dword [ebp - 0x170]
push edx
push esi
push edi
call fcn.004abff0
mov eax, dword [ebp - 0x16c]
add dword [ebp - 0x170], eax
add esp, 0xc
push esi
call fcn.004a9da3
mov ebx, dword [ebp - 0x170]
mov esi, edi
add esp, 4
mov dword [ebp - 0x178], esi
push 0x12
mov ecx, ebx
mov eax, esi
call fcn.00458140
mov edi, eax
add esp, 4
test edi, edi
je 0x4588dd
cmp edi, esi
je 0x4588dd
push ebx
call fcn.0049842b
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x45865a
lea ecx, [ebp - 0x278]
push str.PatchDNS
push ecx
call fcn.0040b990
add esp, 8
push 0x4e4b14
push eax
call fcn.0040b990
add esp, 8
push 0x4ac
mov ecx, eax
call fcn.004069e0
push str.:_Out_of_memory
push eax
call fcn.0040b990
add esp, 8
lea edx, [ebp - 0x30]
push edx
lea ecx, [ebp - 0x288]
call fcn.0041cca0
mov byte [ebp - 4], 7
cmp dword [eax + 0x14], 0x10
jb 0x458631
mov eax, dword [eax]
lea ecx, [ebp - 0x16c]
push ecx
lea ecx, [ebp - 0x1c8]
mov dword [ebp - 0x16c], eax
call fcn.004a936f
push 0x515244
lea edx, [ebp - 0x1c8]
push edx
call fcn.004aba66
mov eax, dword [edi]
mov dword [ebx], eax
mov ecx, dword [edi + 4]
mov dword [ebx + 4], ecx
mov edx, dword [edi + 8]
mov dword [ebx + 8], edx
mov eax, dword [edi + 0xc]
mov edx, edi
sub edx, esi
mov dword [ebx + 0xc], eax
mov cx, word [edi + 0x10]
push edx
lea eax, [ebx + 0x12]
push esi
push eax
mov word [ebx + 0x10], cx
call fcn.004abff0
mov ecx, dword [ebp - 0x170]
sub ecx, edi
lea edx, [ecx + esi - 0x12]
add esp, 0xc
push edx
mov ecx, ebx
lea eax, [edi + 0x12]
sub ecx, esi
push eax
lea edx, [ecx + edi + 0x12]
push edx
call fcn.004abff0
add esp, 0xc
push esi
call fcn.004a9da3
mov eax, dword [ebp - 0x174]
add esp, 4
mov esi, ebx
push eax
mov dword [ebp - 0x178], esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x174]
push ecx
push 0x20006
push 0
push str.SYSTEMCurrentControlSetServicesTcpipLinkage
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edi, eax
test edi, edi
je 0x45877a
cmp edi, 5
jne 0x458705
push str.insufficient_privileges__See_KB311218_
lea edx, [ebp - 0x278]
push edx
jmp 0x458726
lea eax, [ebp - 0x278]
push str.Open_Registry_Key_failed__
push eax
call fcn.0040b990
add esp, 8
push edi
push eax
call fcn.004589c0
push 0x4faa0c
push eax
call fcn.0040b990
add esp, 8
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x288]
call fcn.0041cca0
mov byte [ebp - 4], 8
cmp dword [eax + 0x14], 0x10
jb 0x458751
mov edx, dword [eax]
mov dword [ebp - 0x16c], edx
jmp 0x458757
mov dword [ebp - 0x16c], eax
lea eax, [ebp - 0x16c]
push eax
lea ecx, [ebp - 0x1b0]
call fcn.004a936f
push 0x515244
lea ecx, [ebp - 0x1b0]
push ecx
call fcn.004aba66
mov edx, dword [ebp - 0x170]
mov eax, dword [ebp - 0x174]
push edx
push ebx
push 7
push 0
push str.Bind
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edi, eax
test edi, edi
je 0x4588dd
lea ecx, [ebp - 0x278]
push str.Set_Registry_Value_failed__
push ecx
call fcn.0040b990
add esp, 8
push edi
push eax
call fcn.004589c0
push 0x4faa0c
push eax
call fcn.0040b990
add esp, 8
lea edx, [ebp - 0x30]
push edx
lea ecx, [ebp - 0x288]
call fcn.0041cca0
mov byte [ebp - 4], 9
cmp dword [eax + 0x14], 0x10
jb 0x4587e6
mov eax, dword [eax]
lea ecx, [ebp - 0x16c]
push ecx
lea ecx, [ebp - 0x1e0]
mov dword [ebp - 0x16c], eax
call fcn.004a936f
push 0x515244
lea edx, [ebp - 0x1e0]
push edx
call fcn.004aba66
lea eax, [ebp - 0x278]
push str.Query_Registry_Value_failed__
push eax
call fcn.0040b990
add esp, 8
push edi
push eax
call fcn.004589c0
push 0x4faa0c
push eax
call fcn.0040b990
add esp, 8
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x288]
call fcn.0041cca0
mov byte [ebp - 4], 5
cmp dword [eax + 0x14], 0x10
jb 0x45885b
mov edx, dword [eax]
mov dword [ebp - 0x16c], edx
jmp 0x458861
mov dword [ebp - 0x16c], eax
lea eax, [ebp - 0x16c]
push eax
lea ecx, [ebp - 0x198]
call fcn.004a936f
push 0x515244
lea ecx, [ebp - 0x198]
push ecx
call fcn.004aba66
push str.Fix_DNS_failed:
lea ecx, [ebp - 0x30]
call fcn.00406870
mov esi, eax
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x180]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
call eax
push eax
lea ecx, [ebp - 0x4c]
push esi
push ecx
call fcn.0040b870
add esp, 0xc
push eax
push 0
mov byte [ebp - 4], 0xc
call fcn.00432700
add esp, 8
lea ecx, [ebp - 0x4c]
call fcn.00406910
lea ecx, [ebp - 0x30]
call fcn.00406910
mov eax, 0x4588d7
ret
test esi, esi
je 0x4588ea
push esi
call fcn.004a9da3
add esp, 4
mov edx, dword [ebp - 0x174]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x288]
mov dword [ebp - 4], 0xffffffff
call fcn.00414d00
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004a91d2
mov esp, ebp
pop ebp
ret