Function at 0x4013f0
Capabilities:
Get common file path
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x1c
mov eax, dword [0x5f0fbc]
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push 0x104
mov dword [esp + 0x24], 1
mov dword [esp + 0x28], 3
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x2c], eax
call fcn.00402110
mov edi, eax
add esp, 4
cmp edi, ebx
jne 0x40143a
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x14], ebx
jmp 0x40162c
push 0x104
call fcn.00402110
mov ebp, eax
add esp, 4
cmp ebp, ebx
jne 0x401456
mov dword [esp + 0x14], ebx
jmp 0x40162c
push 0x104
call fcn.00402110
mov esi, eax
add esp, 4
mov dword [esp + 0x18], esi
cmp esi, ebx
jne 0x401476
mov dword [esp + 0x14], ebx
jmp 0x401630
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x40148f
mov dword [esp + 0x14], ebx
jmp 0x401630
mov ecx, dword [esp + 0x30]
push ecx
push str.System32Drivers_s.sys
push 0x104
push ebp
call fcn.00402440
mov edx, dword [esp + 0x44]
push edx
push str.SYSTEMCurrentControlSetServices_s
push 0x104
push edi
call fcn.00402440
add esp, 0x20
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x14]
push ecx
push ebx
push 0xf003f
push ebx
push ebx
push ebx
push edi
push 0x80000002
mov dword [esp + 0x40], ebx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x401501
mov edx, dword [0x8e3e64]
push edi
push str.RegCreateKeyExA_:__s_error__n
push edx
call fcn.00402140
add esp, 0xc
mov dword [esp + 0x14], ebx
jmp 0x401630
mov ecx, dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 4
lea eax, [esp + 0x24]
push eax
push 4
push ebx
push str.Type
push ecx
call esi
test eax, eax
je 0x40153a
mov edx, dword [0x8e3e64]
push str.RegSetValueExA_:_Type_error__n
push edx
call fcn.00402140
add esp, 8
jmp 0x40162c
mov ecx, dword [esp + 0x10]
push 4
lea eax, [esp + 0x28]
push eax
push 4
push ebx
push str.ErrorControl
push ecx
call esi
test eax, eax
je 0x40156d
mov edx, dword [0x8e3e64]
push str.RegSetValueExA_:_ErrorControl_error__n
push edx
call fcn.00402140
add esp, 8
jmp 0x40162c
mov ecx, dword [esp + 0x10]
push 4
lea eax, [esp + 0x3c]
push eax
push 4
push ebx
push 0x4297d8
push ecx
call esi
test eax, eax
je 0x4015a0
mov edx, dword [0x8e3e64]
push str.RegSetValueExA_:_Start_error__n
push edx
call fcn.00402140
add esp, 8
jmp 0x40162c
mov eax, dword [esp + 0x10]
push 4
push 0x5f0fb8
push 4
push ebx
push 0x429800
push eax
call esi
test eax, eax
jne 0x40162c
mov edx, dword [esp + 0x10]
push 4
lea ecx, [esp + 0x2c]
push ecx
push 4
push ebx
push str.State
push edx
call esi
test eax, eax
je 0x4015e9
mov eax, dword [0x8e3e64]
push str.RegSetValueExA_:_State_error__n
push eax
call fcn.00402140
add esp, 8
jmp 0x40162c
mov eax, ebp
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4015f0
mov ecx, dword [esp + 0x10]
sub eax, edx
push eax
push ebp
push 2
push ebx
push 0x429834
push ecx
call esi
test eax, eax
je 0x401624
mov edx, dword [0x8e3e64]
push str.RegSetValueExA_:_ImagePath_error__n
push edx
call fcn.00402140
add esp, 8
jmp 0x40162c
mov dword [esp + 0x14], 1
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x40164a
push eax
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, ebx
je 0x401657
push edi
call fcn.004024a0
add esp, 4
cmp ebp, ebx
je 0x401664
push ebp
call fcn.004024a0
add esp, 4
cmp esi, ebx
je 0x401671
push esi
call fcn.004024a0
add esp, 4
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret