Function at 0x495d50
Capabilities:
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58ae00
mov eax, dword fs:[0]
push eax
sub esp, 0x878
mov eax, dword [0x61b000]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x85c], esp
lea eax, [ebp + 8]
push eax
call fcn.00408070
mov dword [ebp - 0x86c], eax
lea ecx, [ebp - 0x34]
push ecx
call fcn.004159d0
add esp, 0x20
mov dword [ebp - 0x870], eax
mov byte [ebp - 4], 1
push 0x59c748
lea edx, [ebp - 0x34]
push edx
call fcn.00407ad0
add esp, 8
movzx eax, al
test eax, eax
jne 0x495dee
push 0x59c74c
lea ecx, [ebp - 0x34]
push ecx
call fcn.00407ad0
add esp, 8
movzx edx, al
test edx, edx
jne 0x495dee
mov dword [ebp - 0x874], 0
jmp 0x495df8
mov dword [ebp - 0x874], 1
mov al, byte [ebp - 0x874]
mov byte [ebp - 0x3d], al
push 0
push 0
lea ecx, [ebp - 0x34]
call fcn.004061b0
push eax
lea ecx, [ebp - 0x34]
call fcn.00406190
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
add eax, 1
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.005557f3
add esp, 4
mov dword [ebp - 0x860], eax
mov eax, dword [ebp - 0x860]
mov dword [ebp - 0x4c], eax
mov ecx, dword [ebp - 0x44]
push ecx
mov edx, dword [ebp - 0x4c]
push edx
lea ecx, [ebp - 0x34]
call fcn.004061b0
push eax
lea ecx, [ebp - 0x34]
call fcn.00406190
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x14], 0x59c750
mov dword [ebp - 0x48], 0
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x18]
push ecx
push 0
push 0x20006
mov edx, dword [ebp - 0x48]
push edx
push 0
push 0
mov eax, dword [ebp - 0x14]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
je 0x495f0f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x59c7a8
push 0x59c84c
call fcn.0040c230
add esp, 0xc
mov dword [ebp - 0x864], 3
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x34]
call fcn.004060d0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.00406270
mov eax, dword [ebp - 0x864]
jmp 0x496063
mov dword [ebp - 0x858], 3
movzx ecx, byte [ebp - 0x3d]
test ecx, ecx
je 0x495f2d
mov dword [ebp - 0x858], 4
jmp 0x495f37
mov dword [ebp - 0x858], 3
xor edx, edx
mov word [ebp - 0x854], dx
push 0x7fe
push 0
lea eax, [ebp - 0x852]
push eax
call fcn.00568440
add esp, 0xc
push 0x800
push 0
lea ecx, [ebp - 0x854]
push ecx
call fcn.00568440
add esp, 0xc
mov dword [ebp - 0x878], str.Start
mov edx, dword [ebp - 0x878]
add edx, 1
mov dword [ebp - 0x87c], edx
mov eax, dword [ebp - 0x878]
mov cl, byte [eax]
mov byte [ebp - 0x87d], cl
add dword [ebp - 0x878], 1
cmp byte [ebp - 0x87d], 0
jne 0x495f85
mov edx, dword [ebp - 0x878]
sub edx, dword [ebp - 0x87c]
mov dword [ebp - 0x884], edx
push 0x400
lea eax, [ebp - 0x854]
push eax
mov ecx, dword [ebp - 0x884]
add ecx, 1
push ecx
push str.Start
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 4
lea edx, [ebp - 0x858]
push edx
push 4
push 0
lea eax, [ebp - 0x854]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
je 0x49601c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._HostProtect_set_SYSTEMCurrentControlSetServicesUSBSTORStart_failed_error:_d_n
push 0x59c918
call fcn.0040c230
add esp, 0xc
jmp 0x49602e
push str._HostProtect_set_SYSTEMCurrentControlSetServicesUSBSTORStart_success_n
push str.HostProtect::SaveUSBStatusXP
call fcn.0040c230
add esp, 8
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x868], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x34]
call fcn.004060d0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.00406270
mov eax, dword [ebp - 0x868]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00560c61
mov esp, ebp
pop ebp
ret