Function at 0x4014f8
Capabilities:
Get common file path
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44c
mov eax, dword [0x403004]
xor eax, esp
mov dword [esp + 0x448], eax
mov eax, dword [ebp + 0x24]
push ebx
mov dword [esp + 0x34], eax
mov eax, dword [ebp + 0x18]
push esi
push edi
xor edi, edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x10], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x30], edi
cmp dword [eax], edi
je 0x401546
mov esi, edi
jmp 0x401b4b
lea eax, [esp + 0x20]
push eax
push 0x401060
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
mov ebx, 0x40300c
push 4
pop esi
test eax, eax
je 0x4015a4
mov dword [esp + 0x10], edi
mov eax, dword [0x40300c]
cmp eax, ebx
je 0x401640
test byte [eax + 0x1c], 1
je 0x401611
cmp byte [eax + 0x19], 2
jb 0x401611
push edi
push ecx
call fcn.00401c19
pop ecx
push eax
mov eax, dword [0x40300c]
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0xa
jmp 0x401606
lea eax, [esp + 0x34]
mov dword [esp + 0x34], esi
push eax
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x30]
push eax
push edi
push 0x4010e0
push dword [esp + 0x34]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4015d7
cmp dword [esp + 0x28], esi
jne 0x4015d7
cmp dword [esp + 0x34], esi
je 0x40160c
mov dword [esp + 0x10], edi
mov eax, dword [0x40300c]
cmp eax, ebx
je 0x401640
test byte [eax + 0x1c], 1
je 0x401611
cmp byte [eax + 0x19], 2
jb 0x401611
push edi
push ecx
call fcn.00401c19
pop ecx
push eax
mov eax, dword [0x40300c]
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0xb
pop ecx
call fcn.0040140b
mov eax, dword [0x40300c]
cmp eax, ebx
je 0x401640
test byte [eax + 0x1c], 1
je 0x401640
cmp byte [eax + 0x19], 5
jb 0x401640
push dword [esp + 0x10]
push ecx
call fcn.00401c19
pop ecx
push eax
mov eax, dword [0x40300c]
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0xc
pop ecx
call fcn.0040140b
call fcn.00401472
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4016a4
cmp dword [esp + 0x10], edi
je 0x4018d1
push ecx
call fcn.00401c8a
mov esi, eax
test esi, esi
je 0x4016a4
mov eax, dword [0x40300c]
cmp eax, 0x40300c
je 0x401b0d
test byte [eax + 0x1c], 1
je 0x401b0d
cmp byte [eax + 0x19], 2
jb 0x401b0d
push esi
push ecx
call fcn.00401c19
pop ecx
push eax
mov eax, dword [0x40300c]
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0xd
jmp 0x401b07
cmp dword [esp + 0x10], edi
je 0x4018d1
push 0x80000000
push 0x401144
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x401710
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, dword [0x40300c]
cmp ecx, 0x40300c
je 0x401b0d
test byte [ecx + 0x1c], 1
je 0x401b0d
cmp byte [ecx + 0x19], 2
jb 0x401b0d
push esi
push ecx
call fcn.00401c19
pop ecx
push eax
mov eax, dword [0x40300c]
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0xe
jmp 0x401b07
push 0x80000000
push 0x401164
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [esp + 0x24], eax
test eax, eax
jne 0x401772
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, dword [0x40300c]
cmp ecx, 0x40300c
je 0x401b0d
test byte [ecx + 0x1c], 1
je 0x401b0d
cmp byte [ecx + 0x19], 2
jb 0x401b0d
push esi
push ecx
call fcn.00401c19
pop ecx
push eax
mov eax, dword [0x40300c]
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0xf
jmp 0x401b07
lea ecx, [esp + 0x1c]
push ecx
push edi
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
push eax
call edi
test eax, eax
jne 0x40178c
call ebx
mov esi, eax
jmp 0x40178f
push 0x1f
pop esi
cmp esi, 0x7a
je 0x4017d0
mov eax, dword [0x40300c]
cmp eax, 0x40300c
je 0x401b0d
test byte [eax + 0x1c], 1
je 0x401b0d
cmp byte [eax + 0x19], 2
jb 0x401b0d
call fcn.00401c19
push eax
mov eax, dword [0x40300c]
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x10
jmp 0x4018c4
push dword [esp + 0x1c]
call dword [sym.imp.msvcrt.dll_void____cdecl_operator_new_unsigned_int_]
mov esi, eax
mov dword [esp + 0x34], esi
pop ecx
test esi, esi
jne 0x40182c
push 8
pop esi
mov ecx, dword [0x40300c]
cmp ecx, 0x40300c
je 0x401b0d
test byte [ecx + 0x1c], 1
je 0x401b0d
cmp byte [ecx + 0x19], 2
jb 0x401b0d
push dword [esp + 0x1c]
push ecx
call fcn.00401c19
pop ecx
push eax
mov eax, dword [0x40300c]
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x11
jmp 0x401b07
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x20]
mov eax, dword [esp + 0x2c]
push esi
push eax
call edi
test eax, eax
jne 0x401884
call ebx
mov esi, eax
mov eax, dword [0x40300c]
cmp eax, 0x40300c
je 0x401b0d
test byte [eax + 0x1c], 1
je 0x401b0d
cmp byte [eax + 0x19], 2
jb 0x401b0d
push esi
push ecx
call fcn.00401c19
pop ecx
push eax
mov eax, dword [0x40300c]
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x12
jmp 0x401b07
cmp dword [esi + 4], 4
jne 0x4018cf
push 0xd
pop esi
mov eax, dword [0x40300c]
cmp eax, 0x40300c
je 0x401b0d
test byte [eax + 0x1c], 1
je 0x401b0d
cmp byte [eax + 0x19], 2
jb 0x401b0d
call fcn.00401c19
push eax
mov eax, dword [0x40300c]
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x13
pop ecx
call fcn.00401bec
jmp 0x401b0d
xor edi, edi
mov esi, 0x104
lea eax, [esp + 0x40]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x401ad5
cmp eax, esi
ja 0x401ad5
cmp word [esp + eax*2 + 0x3e], 0x5c
jne 0x401913
lea eax, [eax*2 - 2]
cmp eax, 0x208
jae 0x401b75
xor ecx, ecx
mov word [esp + eax + 0x40], cx
cmp dword [esp + 0x10], 0
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x24c]
je 0x40192d
push 0x401178
jmp 0x401932
push 0x4011d8
push esi
push eax
call fcn.00401b80
add esp, 0x10
test eax, eax
jns 0x401982
movzx esi, ax
mov eax, dword [0x40300c]
cmp eax, 0x40300c
je 0x401b0d
test byte [eax + 0x1c], 1
je 0x401b0d
cmp byte [eax + 0x19], 2
jb 0x401b0d
push esi
push ecx
call fcn.00401c19
pop ecx
push eax
mov eax, dword [0x40300c]
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x15
jmp 0x401b07
push edi
lea eax, [esp + 0x24c]
push eax
push edi
push edi
call dword [sym.imp.SETUPAPI.dll_InstallHinfSectionW]
push edi
lea eax, [esp + 0x1c]
push eax
push edi
push 3
push edi
push edi
push edi
push 0x401238
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov esi, eax
test esi, esi
je 0x4019f7
mov eax, dword [0x40300c]
cmp eax, 0x40300c
je 0x401b0d
test byte [eax + 0x1c], 1
je 0x401b0d
cmp byte [eax + 0x19], 2
jb 0x401b0d
push dword [esp + 0x10]
push ecx
call fcn.00401c19
pop ecx
push eax
mov eax, dword [0x40300c]
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x16
jmp 0x401b07
push 4
pop ebx
lea eax, [esp + 0x38]
mov dword [esp + 0x38], ebx
push eax
lea eax, [esp + 0x18]
mov esi, 0x401294
push eax
lea eax, [esp + 0x30]
push eax
push edi
push esi
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x401a2e
cmp dword [esp + 0x28], ebx
jne 0x401a2e
cmp dword [esp + 0x38], ebx
je 0x401a6a
mov eax, edi
mov dword [esp + 0x14], eax
mov ecx, dword [0x40300c]
cmp ecx, 0x40300c
je 0x401a6e
test byte [ecx + 0x1c], 1
je 0x401a6e
cmp byte [ecx + 0x19], 2
jb 0x401a6e
push edi
push ecx
call fcn.00401c19
pop ecx
push eax
mov eax, dword [0x40300c]
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x17
pop ecx
call fcn.0040140b
mov eax, dword [esp + 0x14]
cmp dword [esp + 0x10], 0
je 0x401a7c
or eax, 0x80000000
jmp 0x401a81
and eax, 0x7fffffff
push ebx
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push eax
push ebx
push edi
push esi
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
test esi, esi
je 0x401ad1
mov eax, dword [0x40300c]
cmp eax, 0x40300c
je 0x401b0d
test byte [eax + 0x1c], 1
je 0x401b0d
cmp byte [eax + 0x19], 2
jb 0x401b0d
push esi
push ecx
call fcn.00401c19
pop ecx
push eax
mov eax, dword [0x40300c]
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0040143e
jmp 0x401b0d
mov esi, edi
jmp 0x401b0d
call ebx
mov esi, eax
mov eax, dword [0x40300c]
cmp eax, 0x40300c
je 0x401b0d
test byte [eax + 0x1c], 1
je 0x401b0d
cmp byte [eax + 0x19], 2
jb 0x401b0d
push esi
push ecx
call fcn.00401c19
pop ecx
push eax
mov eax, dword [0x40300c]
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x14
pop ecx
call fcn.0040140b
cmp dword [esp + 0x20], 0
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x401b20
push dword [esp + 0x20]
call edi
cmp dword [esp + 0x18], 0
je 0x401b2d
push dword [esp + 0x18]
call edi
mov eax, dword [esp + 0x24]
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
je 0x401b3e
push eax
call edi
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x401b49
push eax
call edi
xor edi, edi
push dword [esp + 0x30]
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
mov eax, dword [esp + 0x40]
pop ecx
mov ecx, dword [esp + 0x454]
mov dword [eax], edi
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00402028
mov esp, ebp
pop ebp
ret 0x20
call fcn.00402560
int3