Function at 0x4cf890
Capabilities:
Create directory
Create process on windows
Get common file path
Move file
Persist via windows service
Read .ini file
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4fe7db
mov eax, dword fs:[0]
push eax
mov eax, 0x2f84
call fcn.004f23a0
mov eax, dword [0x5552b0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
push ebx
push str._install_pnp_
push str.Driver
xor edx, edx
xor ecx, ecx
call fcn.004a3520
xor eax, eax
add esp, 0xc
push 0x103
mov dword [ebp - 0x4f], eax
mov dword [ebp - 0x4b], eax
mov dword [ebp - 0x47], eax
mov dword [ebp - 0x43], eax
mov dword [ebp - 0x3f], eax
mov dword [ebp - 0x3b], eax
mov dword [ebp - 0x37], eax
mov word [ebp - 0x33], ax
mov byte [ebp - 0x31], al
lea eax, [ebp - 0x67f]
push ebx
push eax
mov byte [ebp - 0x50], bl
mov byte [ebp - 0x680], bl
call fcn.004e8ba0
add esp, 0xc
push 0x103
lea ecx, [ebp - 0x367]
push ebx
push ecx
mov byte [ebp - 0x368], bl
call fcn.004e8ba0
add esp, 0xc
push 0x103
lea edx, [ebp - 0x25f]
push ebx
push edx
mov byte [ebp - 0x260], bl
call fcn.004e8ba0
add esp, 0xc
push 0x104
lea eax, [ebp - 0x260]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x104
lea ecx, [ebp - 0x368]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x368]
dec eax
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x4cf978
mov edx, dword [str.DebugSMRHuService]
mov ecx, dword [0x54d0f4]
mov dword [eax], edx
mov edx, dword [0x54d0f8]
mov dword [eax + 4], ecx
mov ecx, dword [0x54d0fc]
mov dword [eax + 8], edx
mov edx, dword [0x54d100]
mov dword [eax + 0xc], ecx
mov cl, byte [0x54d104]
mov dword [eax + 0x10], edx
push 0x103
lea edx, [ebp - 0x157]
push ebx
push edx
mov byte [eax + 0x14], cl
mov byte [ebp - 0x158], bl
call fcn.004e8ba0
add esp, 0xc
xor eax, eax
jmp 0x4cf9e0
mov cl, byte [ebp + eax - 0x260]
mov byte [ebp + eax - 0x158], cl
inc eax
cmp cl, bl
jne 0x4cf9e0
lea eax, [ebp - 0x158]
dec eax
lea ebx, [ebx]
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x4cfa00
mov ecx, dword [str.drivers_]
mov edx, dword [0x54ccb4]
mov dword [eax], ecx
mov cx, word [0x54ccb8]
mov dword [eax + 4], edx
mov word [eax + 8], cx
mov eax, str.Smrf
mov edx, eax
jmp 0x4cfa30
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4cfa30
lea edi, [ebp - 0x158]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x4cfa40
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x158]
or edi, 0xffffffff
add eax, edi
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x4cfa63
mov edx, dword [str..inf]
mov cl, byte [0x54c97c]
mov dword [eax], edx
lea edx, [ebp - 0x158]
push edx
mov byte [eax + 4], cl
lea eax, [ebp - 0x680]
push str._c_PnPutil.exe__a__s___c:_tempPnPadd.tmp
push eax
call fcn.004e5b0c
add esp, 0xc
push ebx
push str.c:_temp
call fcn.004e6be2
add esp, 8
cmp eax, edi
jne 0x4cfabd
push ebx
push str.c:_temp
mov byte [ebp - 0x2e92], bl
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x4cfac4
mov byte [ebp - 0x2e92], 1
push ebx
push str._exec_pnp_cmd__and_export_log_
push str.Driver
xor edx, edx
xor ecx, ecx
call fcn.004a3520
add esp, 0xc
push 0x38
lea ecx, [ebp - 0x2ed4]
push ebx
push ecx
call fcn.004e8ba0
add esp, 0xc
lea ecx, [ebp - 0x2ed8]
lea edx, [ebp - 0x680]
lea eax, [ebp - 0x260]
push ecx
mov dword [ebp - 0x2ed8], 0x3c
mov dword [ebp - 0x2ed4], 0x40
mov dword [ebp - 0x2ed0], ebx
mov dword [ebp - 0x2ecc], ebx
mov dword [ebp - 0x2ec8], str.cmd.exe
mov dword [ebp - 0x2ec4], edx
mov dword [ebp - 0x2ec0], eax
mov dword [ebp - 0x2ebc], ebx
mov dword [ebp - 0x2eb8], ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
mov edx, dword [ebp - 0x2ea0]
push 0x7530
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebx
cmp eax, ebx
je 0x4cfbf1
xor edx, edx
xor ecx, ecx
cmp eax, 0x102
je 0x4cfb78
push str._unknow_exception_
jmp 0x4cff1e
push str._timeout_and_try_enum_pnp_
push str.Driver
call fcn.004a3520
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 0xc
xor esi, esi
xor eax, eax
mov byte [ebp - 0x30], bl
mov dword [ebp - 0x2f], eax
mov dword [ebp - 0x2b], eax
mov dword [ebp - 0x27], eax
mov dword [ebp - 0x23], eax
mov dword [ebp - 0x1f], eax
mov dword [ebp - 0x1b], eax
mov dword [ebp - 0x17], eax
mov word [ebp - 0x13], ax
mov byte [ebp - 0x11], al
lea eax, [ebp - 0x30]
push eax
call fcn.004cffc0
add esp, 4
test eax, eax
jne 0x4cfbdb
push 0x7d0
call edi
inc esi
cmp esi, 3
jne 0x4cfbb3
push ebx
push str._try_enum_pnp_fail_
jmp 0x4cff1a
push ebx
xor edx, edx
mov byte [ebp - 0x2e91], 1
push str._try_enum_pnp_success_
xor ecx, ecx
jmp 0x4cff24
push str.c:_tempPnPadd.tmp
call fcn.004e6b4b
add esp, 8
test eax, eax
jne 0x4cff14
lea ecx, [ebp - 0x2e90]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 0x27ff
lea edx, [ebp - 0x2e7f]
push ebx
push edx
mov byte [ebp - 0x2e91], 1
mov byte [ebp - 0x2e80], bl
call fcn.004e8ba0
add esp, 0xc
lea eax, [ebp - 0x2f90]
push eax
call fcn.004d0840
lea esi, [ebp - 0x2f90]
mov dword [ebp - 4], ebx
call fcn.004d0a10
mov ecx, dword [ebp - 0x2f90]
mov edx, dword [ecx + 4]
test byte [ebp + edx - 0x2f84], 6
je 0x4cfcab
push ebx
push str._open_log_fail_
push str.Driver
xor edx, edx
xor ecx, ecx
mov byte [ebp - 0x2e91], bl
call fcn.004a3520
add esp, 0xc
lea ecx, [ebp - 0x2f20]
mov dword [ebp - 4], edi
call fcn.004d0940
lea eax, [ebp - 0x2f20]
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.004f800a
add esp, 4
jmp 0x4cff31
lea ecx, [ebp - 0x2e80]
push ecx
lea edx, [ebp - 0x2f90]
push edx
call fcn.004d03c0
lea esi, [ebp - 0x2f90]
call fcn.004d0a60
push 0x103
lea eax, [ebp - 0x577]
push ebx
push eax
mov byte [ebp - 0x578], bl
call fcn.004e8ba0
movzx ecx, word [ebp - 0x2e86]
movzx edx, word [ebp - 0x2e88]
movzx eax, word [ebp - 0x2e8a]
add esp, 0xc
push ecx
movzx ecx, word [ebp - 0x2e8e]
push edx
movzx edx, word [ebp - 0x2e90]
push eax
push ecx
push edx
lea eax, [ebp - 0x368]
push eax
lea ecx, [ebp - 0x578]
push str._sPnPadd__04u__02u__02u__02u__02u.tmp
push ecx
call fcn.004e5b0c
add esp, 0x20
lea edx, [ebp - 0x578]
push edx
push str.c:_tempPnPadd.tmp
call dword [sym.imp.KERNEL32.dll_MoveFileA]
lea eax, [ebp - 0x2e80]
push 0x54d204
push eax
call fcn.004e67d0
add esp, 8
cmp eax, ebx
je 0x4cfece
push 0xa
push eax
lea ecx, [ebp - 0x50]
push ecx
call fcn.004e5040
lea eax, [ebp - 0x50]
add esp, 0xc
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4cfd70
sub eax, edx
je 0x4cfec6
mov al, 0x66
cmp byte [ebp - 0x49], al
jne 0x4cfea4
mov byte [ebp - 0x48], bl
lea eax, [ebp - 0x50]
mov dword [ebp - 0x2e9c], ebx
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4cfda0
sub eax, edx
lea edx, [ebp - 0x2e9c]
push edx
mov esi, eax
lea eax, [ebp - 0x2e98]
push eax
push ebx
push 0xf003f
push ebx
push ebx
push ebx
push str.SYSTEMCurrentControlSet_servicesSmrf
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp eax, ebx
jne 0x4cfe95
mov edx, dword [ebp - 0x2e98]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea ecx, [ebp - 0x50]
push ecx
push 1
push ebx
push str.PublicName
push edx
call esi
push 0x103
lea eax, [ebp - 0x46f]
push ebx
push eax
mov byte [ebp - 0x470], bl
call fcn.004e8ba0
add esp, 0xc
lea ecx, [ebp - 0x50]
push ecx
lea edx, [ebp - 0x470]
push str.C:WindowsInf_s
push edx
call fcn.004e5b0c
xor eax, eax
add esp, 0xc
mov dword [ebp - 0x2f], eax
mov dword [ebp - 0x2b], eax
mov dword [ebp - 0x27], eax
mov dword [ebp - 0x23], eax
mov dword [ebp - 0x1f], eax
mov dword [ebp - 0x1b], eax
mov dword [ebp - 0x17], eax
mov word [ebp - 0x13], ax
mov byte [ebp - 0x11], al
lea eax, [ebp - 0x470]
push eax
push 0x20
lea ecx, [ebp - 0x30]
push ecx
push 0x51862c
push str.DriverVer
push str.Version
mov byte [ebp - 0x30], bl
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x4cfe95
lea eax, [ebp - 0x30]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4cfe76
sub eax, edx
push eax
mov eax, dword [ebp - 0x2e98]
lea edx, [ebp - 0x30]
push edx
push 1
push ebx
push str.DriverVersion
push eax
call esi
mov ecx, dword [ebp - 0x2e98]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4cfeeb
cmp byte [ebp - 0x48], al
jne 0x4cfeb1
mov byte [ebp - 0x47], bl
jmp 0x4cfd8d
cmp byte [ebp - 0x47], al
jne 0x4cfebe
mov byte [ebp - 0x46], bl
jmp 0x4cfd8d
push ebx
push 0x54d208
jmp 0x4cfed4
push ebx
push str._log_fileSize_is_zeor_
jmp 0x4cfed4
push ebx
push str._cant_find_oem_
push str.Driver
xor edx, edx
xor ecx, ecx
mov byte [ebp - 0x2e91], bl
call fcn.004a3520
add esp, 0xc
lea ecx, [ebp - 0x2f20]
mov dword [ebp - 4], edi
call fcn.004d0940
lea edx, [ebp - 0x2f20]
push edx
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.004f800a
add esp, 4
jmp 0x4cff31
push ebx
push str._export_fail_
xor edx, edx
xor ecx, ecx
mov byte [ebp - 0x2e91], bl
push str.Driver
call fcn.004a3520
add esp, 0xc
cmp byte [ebp - 0x2e92], bl
jne 0x4cff45
push ebx
push str.rd_c:_temp__Q__S
call dword [sym.imp.KERNEL32.dll_WinExec]
xor edx, edx
xor ecx, ecx
cmp byte [ebp - 0x2e91], 1
push ebx
jne 0x4cff69
push str._install_pnp_success_
push str.Driver
call fcn.004a3520
add esp, 0xc
mov al, 1
jmp 0x4cff7d
push str._install_pnp_fail_
push str.Driver
call fcn.004a3520
add esp, 0xc
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004e4746
mov esp, ebp
pop ebp
ret