Function at 0x4207f0
Capabilities:
Copy file
Create service
Get common file path
Get program files directory
Modify service
Query service status
Start service

Disassembly:
sub esp, 0x444
mov eax, dword [0x48e050]
xor eax, esp
mov dword [esp + 0x43c], eax
push ebx
push ebp
xor eax, eax
push esi
push edi
xor ebx, ebx
xor edi, edi
mov ecx, str.BkavFwDrvService
mov dword [esp + 0x14], edi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
call fcn.004082f0
test eax, eax
je 0x420841
call fcn.004085f0
push ebx
push 0x26
push 0x496d90
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x42087d
push 0x4821c4
push 0x104
push 0x496d90
call fcn.0043f083
add esp, 0xc
push 0x496d90
push str.m_szBkavCorpDir:__s
call fcn.00404c20
add esp, 8
cmp dword [0x4971a0], ebx
je 0x420961
mov eax, dword [0x496710]
mov dword [esp + 0x10], ebx
cmp eax, ebx
je 0x42089d
lea ecx, [esp + 0x10]
push ecx
jmp 0x4208ce
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp eax, ebx
je 0x4209df
push str.Wow64DisableWow64FsRedirection
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x496710], eax
cmp eax, ebx
je 0x4209df
lea edx, [esp + 0x10]
push edx
call eax
cmp eax, ebx
je 0x4209df
push 0x103
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x420b97
push str.drivers_
lea ecx, [esp + 0x3c]
push 0x104
push ecx
call fcn.0043f083
add esp, 0xc
push str.BkavFwDrv.sys
lea edx, [esp + 0x3c]
push 0x104
push edx
call fcn.0043f083
add esp, 0xc
push str.BkavFwDrv.sys
push 0x496778
push 0x47903c
lea eax, [esp + 0x24c]
push 0x104
push eax
call fcn.0043ed50
add esp, 0x14
push ebx
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x248]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov esi, dword [esp + 0x10]
call fcn.00408bc0
jmp 0x4209df
push 0x103
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x420b97
push str.drivers_
lea ecx, [esp + 0x3c]
push 0x104
push ecx
call fcn.0043f083
add esp, 0xc
push str.BkavFwDrv.sys
lea edx, [esp + 0x3c]
push 0x104
push edx
call fcn.0043f083
add esp, 0xc
push str.BkavFwDrv.sys
push 0x496778
push 0x47903c
lea eax, [esp + 0x24c]
push 0x104
push eax
call fcn.0043ed50
add esp, 0x14
push ebx
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x248]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea eax, [esp + 0x38]
push eax
push str.szDriverPath:__s
call fcn.00404c20
add esp, 8
push 2
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebp, eax
mov dword [esp + 0x18], ebp
cmp ebp, ebx
je 0x420b97
push 0xf01ff
push str.BkavFwDrv
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
cmp esi, ebx
jne 0x420aa5
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
push eax
push str.OpenService_error:__d
call fcn.00404c20
add esp, 8
push ebx
push ebx
push ebx
push ebx
push ebx
lea ecx, [esp + 0x4c]
push ecx
mov ebx, 1
push ebx
push ebx
push ebx
push 0xf01ff
push str.BkavFwDrv
push str.BkavFwDrv
push ebp
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, eax
test esi, esi
je 0x420a90
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x420b79
call edi
push eax
push str.Start_Service_error:__d
call fcn.00404c20
add esp, 8
jmp 0x420b7d
call edi
push eax
push str.CreateService_error:__d
call fcn.00404c20
add esp, 8
jmp 0x420b7d
mov ebp, dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
lea edx, [esp + 0x10]
push edx
xor edi, edi
push edi
push edi
push esi
mov dword [esp + 0x20], ebx
call ebp
test eax, eax
jne 0x420adb
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x7a
jne 0x420aff
mov ebx, dword [esp + 0x10]
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
lea eax, [esp + 0x10]
push eax
push ebx
push edi
push esi
call ebp
test eax, eax
jne 0x420b11
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.QueryServiceConfig_failed__d
call fcn.00404c20
add esp, 8
jmp 0x420b7d
call edi
push eax
push str.QueryServiceConfig_failed__d
call fcn.00404c20
add esp, 8
jmp 0x420b7d
mov ebx, 1
cmp dword [edi + 4], ebx
je 0x420b36
push 0
push 0
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x50]
push ecx
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
lea edx, [esp + 0x1c]
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x420b7d
mov eax, dword [esp + 0x20]
cmp eax, 4
je 0x420b79
cmp eax, 2
je 0x420b79
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x420b79
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.StartService_failed__d
call fcn.00404c20
add esp, 8
jmp 0x420b7d
mov dword [esp + 0x14], ebx
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
je 0x420b8a
push esi
call edi
mov eax, dword [esp + 0x18]
push eax
call edi
mov eax, dword [esp + 0x14]
jmp 0x420b99
mov eax, edi
mov ecx, dword [esp + 0x44c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0043e4c7
add esp, 0x444
ret