joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405420
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 8
lea eax, [esp]
push eax
push ecx
lea edx, [esp + 0xc]
push edx
push str.szEnterpriseServerDir
push str.SOFTWAREBkavEnterprise
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x1c], 1
mov dword [esp + 0x18], 0x208
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
neg eax
sbb eax, eax
inc eax
add esp, 8
ret

Function at 0x405460
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x21c
mov eax, dword [0x48e050]
xor eax, esp
mov dword [esp + 0x214], eax
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x12]
push ecx
mov word [esp + 0x14], ax
call fcn.004416b0
add esp, 0xc
lea edx, [esp + 4]
push edx
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 8]
push ecx
push str.BkavVersion
push str.SOFTWAREBkav
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], 0x208
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
test eax, eax
je 0x4054dd
xor eax, eax
mov ecx, dword [esp + 0x214]
xor ecx, esp
call fcn.0043e4c7
add esp, 0x21c
ret
lea edx, [esp + 8]
push edx
push str.szBkavVersion:__ws_n
call fcn.00404c20
lea eax, [esp + 0x10]
push str.BkavEntx64
push eax
call fcn.0043ec25
add esp, 0x10
test eax, eax
je 0x405518
lea ecx, [esp + 8]
push str.BkavEnt
push ecx
call fcn.0043ec25
add esp, 8
test eax, eax
jne 0x4054c6
mov ecx, dword [esp + 0x214]
xor ecx, esp
mov eax, 1
call fcn.0043e4c7
add esp, 0x21c
ret

Function at 0x405540
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x674
mov eax, dword [0x48e050]
xor eax, esp
mov dword [esp + 0x670], eax
test esi, esi
jne 0x40556f
xor eax, eax
mov ecx, dword [esp + 0x670]
xor ecx, esp
call fcn.0043e4c7
add esp, 0x674
ret
lea eax, [esp]
push eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0xc]
push edx
push str.szBkavDir
push str.SOFTWAREBkav
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x1c], 1
mov dword [esp + 0x18], 0x208
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
test eax, eax
je 0x4055c0
mov eax, 1
mov ecx, dword [esp + 0x670]
xor ecx, esp
call fcn.0043e4c7
add esp, 0x674
ret
cmp dword [0x496704], 0
jne 0x40561d
push str.BkavScanDll0.dll
lea eax, [esp + 0x20]
push eax
push str._s_systemAK_s
lea ecx, [esp + 0x244]
push 0x104
push ecx
call fcn.0043ed50
add esp, 0x14
lea edx, [esp + 0x238]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
je 0x405610
push str.IsFileInWhiteListEx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x496704], eax
cmp dword [0x496704], 0
je 0x405558
push str.Corelib.dll
lea eax, [esp + 0x20]
push eax
push str._s_systemAK_s
lea ecx, [esp + 0x460]
push 0x104
push ecx
call fcn.0043ed50
xor eax, eax
add esp, 0x14
lea edx, [esp + 8]
push edx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
push esi
lea eax, [esp + 0x45c]
push eax
call dword [0x496704]
mov ecx, dword [esp + 0x670]
xor ecx, esp
call fcn.0043e4c7
add esp, 0x674
ret
Function at 0x405e80
Capabilities:
Check os version
Query or enumerate registry value

Disassembly:
sub esp, 0x12c
mov eax, dword [0x48e050]
xor eax, esp
mov dword [esp + 0x128], eax
lea eax, [esp + 4]
push eax
lea ecx, [esp + 4]
push ecx
lea edx, [esp + 0x10]
push edx
push str.CurrentMajorVersionNumber
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 4
mov dword [esp + 0x1c], 4
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
test eax, eax
jne 0x405ef4
cmp dword [esp], 0xa
jne 0x405ef4
mov eax, 8
mov ecx, dword [esp + 0x128]
xor ecx, esp
call fcn.0043e4c7
add esp, 0x12c
ret
lea eax, [esp + 0xc]
push eax
mov dword [esp + 0x10], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x40600a
mov eax, dword [esp + 0x10]
cmp eax, 5
jne 0x405f36
mov eax, dword [esp + 0x14]
cmp eax, 1
jne 0x405f9d
mov ecx, dword [esp + 0x128]
xor ecx, esp
call fcn.0043e4c7
add esp, 0x12c
ret
cmp eax, 6
jne 0x405ffa
mov eax, dword [esp + 0x14]
cmp eax, 1
jne 0x405f6e
xor eax, eax
cmp byte [esp + 0x126], 1
setne al
lea eax, [eax + eax + 3]
mov ecx, dword [esp + 0x128]
xor ecx, esp
call fcn.0043e4c7
add esp, 0x12c
ret
test eax, eax
jne 0x405fbc
mov cl, byte [esp + 0x126]
dec cl
movzx eax, cl
neg eax
sbb eax, eax
and eax, 3
add eax, 2
mov ecx, dword [esp + 0x128]
xor ecx, esp
call fcn.0043e4c7
add esp, 0x12c
ret
cmp eax, 2
jne 0x40600a
mov eax, 4
mov ecx, dword [esp + 0x128]
xor ecx, esp
call fcn.0043e4c7
add esp, 0x12c
ret
cmp eax, 2
jne 0x405fdb
mov eax, 6
mov ecx, dword [esp + 0x128]
xor ecx, esp
call fcn.0043e4c7
add esp, 0x12c
ret
cmp eax, 3
jne 0x40600a
mov eax, 7
mov ecx, dword [esp + 0x128]
xor ecx, esp
call fcn.0043e4c7
add esp, 0x12c
ret
cmp eax, 0xa
jne 0x40600a
cmp dword [esp + 0x14], 0
je 0x405eda
mov ecx, dword [esp + 0x128]
xor ecx, esp
or eax, 0xffffffff
call fcn.0043e4c7
add esp, 0x12c
ret

Function at 0x406030
Capabilities:
Get common file path

Disassembly:
sub esp, 0x220
mov eax, dword [0x48e050]
xor eax, esp
mov dword [esp + 0x21c], eax
push edi
push 0x104
lea eax, [esp + 8]
push eax
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x406071
pop edi
mov ecx, dword [esp + 0x21c]
xor ecx, esp
call fcn.0043e4c7
add esp, 0x220
ret
push str._rundll32.exe
lea ecx, [esp + 8]
push 0x104
push ecx
call fcn.0043f083
lea edx, [esp + 0x10]
push edx
push esi
call fcn.0043ec25
add esp, 0x14
test eax, eax
jne 0x40609c
mov edi, 1
mov ecx, dword [esp + 0x220]
mov eax, edi
pop edi
xor ecx, esp
call fcn.0043e4c7
add esp, 0x220
ret
Function at 0x406500
Capabilities:
Enumerate processes
Enumerate processes on remote desktop session host

Disassembly:
sub esp, 0x250
mov eax, dword [0x48e050]
xor eax, esp
mov dword [esp + 0x24c], eax
push ebx
push esi
push edi
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x18]
push ecx
xor ebx, ebx
push 1
push ebx
push ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], ebx
call sub.WTSAPI32.dll_WTSEnumerateSessionsW
test eax, eax
je 0x40656e
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
xor eax, eax
test edx, edx
jbe 0x406568
lea ecx, [esi + 8]
lea esp, [esp]
cmp dword [ecx], ebx
je 0x40655e
inc eax
add ecx, 0xc
cmp eax, edx
jb 0x406550
jmp 0x406568
lea edx, [eax + eax*2]
mov eax, dword [esi + edx*4]
mov dword [esp + 0x1c], eax
push esi
call sub.WTSAPI32.dll_WTSFreeMemory
push 0
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
cmp esi, 0xffffffff
je 0x406690
lea ecx, [esp + 0x24]
push ecx
push esi
mov dword [esp + 0x2c], 0x22c
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
jne 0x4065a5
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x406690
mov edi, dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
jmp 0x4065b0
lea edx, [esp + 0x48]
push 0x478fa0
push edx
call fcn.0043ec25
add esp, 8
test eax, eax
jne 0x4065e0
mov ecx, dword [esp + 0x2c]
lea eax, [esp + 0x20]
push eax
push ecx
call edi
test eax, eax
je 0x4065e0
mov edx, dword [esp + 0x1c]
cmp edx, dword [esp + 0x20]
je 0x4065f1
lea eax, [esp + 0x24]
push eax
push esi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x4065b0
jmp 0x4065f5
mov ebx, dword [esp + 0x2c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call edi
push ebx
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x406690
lea ecx, [esp + 0x10]
push ecx
push 0xe
push esi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
push esi
mov ebx, eax
call edi
test ebx, ebx
je 0x40667c
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40667c
push eax
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
mov esi, eax
test esi, esi
jne 0x40665b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ImpersonateLoggedOnUser_error:__d
call fcn.00404c20
mov edx, dword [esp + 0x18]
add esp, 8
push edx
call edi
jmp 0x406690
mov eax, dword [esp + 0x10]
push eax
call edi
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x24c]
xor ecx, esp
call fcn.0043e4c7
add esp, 0x250
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenProcessToken_error:__d
call fcn.00404c20
add esp, 8
mov ecx, dword [esp + 0x258]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0043e4c7
add esp, 0x250
ret
Function at 0x4066b0
Capabilities:
Get disk information

Disassembly:
sub esp, 0x448
mov eax, dword [0x48e050]
xor eax, esp
mov dword [esp + 0x444], eax
push ebp
mov ebp, dword [esp + 0x450]
push edi
xor edi, edi
cmp ebp, edi
jne 0x4066ec
pop edi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x444]
xor ecx, esp
call fcn.0043e4c7
add esp, 0x448
ret
push 0x21c
lea eax, [esp + 0x18]
push edi
push eax
call fcn.004416b0
add esp, 0xc
lea ecx, [esp + 0x14]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
cmp eax, edi
je 0x4066d3
inc eax
push ebx
xor ebx, ebx
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], eax
cmp eax, edi
jbe 0x406824
push esi
lea esi, [esp + 0x1c]
mov eax, 4
lea edx, [esp + 0x1c]
sub esi, 2
sub eax, edx
mov dword [esp + 0x18], eax
mov edi, edi
cmp word [esi + 2], 0
jne 0x4067d5
cmp word [esi], 0x5c
jne 0x406756
xor eax, eax
mov word [esi], ax
push 0x104
lea ecx, [esp + 0x23c]
push ecx
lea edx, [esp + edi + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
test eax, eax
je 0x4067d5
lea eax, [esp + 0x238]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406780
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x23c]
push ebp
push eax
call fcn.0043f6d2
add esp, 0xc
test eax, eax
jne 0x4067c7
lea eax, [esp + 0x238]
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4067b0
sub eax, edx
sar eax, 1
cmp word [ebp + eax*2], 0x5c
je 0x4067e5
mov edx, dword [esp + 0x18]
lea ecx, [ebx + 1]
mov dword [esp + 0x10], ecx
lea edi, [edx + esi]
inc ebx
add esi, 2
cmp ebx, dword [esp + 0x14]
jb 0x406740
jmp 0x406823
lea eax, [esp + 0x238]
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4067f0
mov ecx, dword [esp + 0x10]
sub eax, edx
sar eax, 1
lea eax, [ebp + eax*2 + 2]
push eax
mov eax, dword [esp + 0x464]
lea edx, [esp + ecx*2 + 0x20]
push edx
push 0x47903c
push eax
push ebp
call fcn.0043ed50
add esp, 0x14
pop esi
mov ecx, dword [esp + 0x450]
pop ebx
pop edi
pop ebp
xor ecx, esp
mov eax, 1
call fcn.0043e4c7
add esp, 0x448
ret
Function at 0x406850
Capabilities:
Check if file exists

Disassembly:
sub esp, 0x224
mov eax, dword [0x48e050]
xor eax, esp
mov dword [esp + 0x21c], eax
test edi, edi
je 0x4068b9
test esi, esi
je 0x4068b9
push 0x104
push esi
push 0
push edi
call sub.PSAPI.DLL_GetModuleFileNameExW
test eax, eax
je 0x40688d
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x406994
mov eax, dword [0x496708]
test eax, eax
jne 0x406910
push 0x479048
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x4068d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Get_handle_ntdll_error:__d
call fcn.00404c20
add esp, 8
xor eax, eax
mov ecx, dword [esp + 0x21c]
xor ecx, esp
call fcn.0043e4c7
add esp, 0x224
ret
push str.NtQueryInformationProcess
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x496708], eax
test eax, eax
jne 0x406910
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetProcAddress_error:__d
call fcn.00404c20
add esp, 8
xor eax, eax
mov ecx, dword [esp + 0x21c]
xor ecx, esp
call fcn.0043e4c7
add esp, 0x224
ret
mov edx, 0x208
lea ecx, [esp + 0x10]
mov dword [esp + 0xc], ecx
mov word [esp + 0xa], dx
xor ecx, ecx
lea edx, [esp + 4]
push edx
push 0x210
mov word [esp + 0x10], cx
lea ecx, [esp + 0x10]
push ecx
push 0x1b
push edi
call eax
test eax, eax
jge 0x406971
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Query_error:__d____d
call fcn.00404c20
add esp, 0xc
xor eax, eax
mov ecx, dword [esp + 0x21c]
xor ecx, esp
call fcn.0043e4c7
add esp, 0x224
ret
mov eax, dword [esp + 0xc]
push eax
push 0x479110
push 0x104
push esi
call fcn.0043ed50
push 0x104
push esi
call fcn.004066b0
add esp, 0x18
mov ecx, dword [esp + 0x21c]
xor ecx, esp
mov eax, 1
call fcn.0043e4c7
add esp, 0x224
ret
Function at 0x406a00
Capabilities:
Accept command line arguments
Check if file exists

Disassembly:
mov eax, 0x2244
call fcn.0044e2b0
mov eax, dword [0x48e050]
xor eax, esp
mov dword [esp + 0x2240], eax
push ebx
push esi
mov esi, ecx
push edi
test esi, esi
jne 0x406a3b
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2240]
xor ecx, esp
call fcn.0043e4c7
add esp, 0x2244
ret
call fcn.00406030
test eax, eax
je 0x406a21
mov ecx, dword [esp + 0x2254]
lea eax, [esp + 0x230]
push eax
push ecx
call fcn.00407a50
add esp, 8
test eax, eax
je 0x406b15
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x234]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov ebx, eax
test ebx, ebx
je 0x406b15
cmp dword [esp + 0xc], 2
jl 0x406b0e
mov edi, dword [ebx + 4]
call fcn.00405e30
mov ecx, dword [ebx + 4]
push ecx
push str.szArgList_1_:__s
call fcn.00404c20
mov eax, dword [ebx + 4]
add esp, 8
cmp word [eax + 2], 0x3a
push eax
je 0x406ac9
push str.C:Windows_system32_s
lea edx, [esp + 0x18]
push 0x104
push edx
call fcn.0043ed50
add esp, 0x10
jmp 0x406adb
lea eax, [esp + 0x14]
push 0x104
push eax
call fcn.0043efc3
add esp, 0xc
lea ecx, [esp + 0x10]
push ecx
push str.szDllPath:__s
call fcn.00404c20
mov edx, dword [ebx + 4]
add esp, 8
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x406b0e
lea eax, [esp + 0x10]
push eax
push 0x104
push esi
call fcn.0043efc3
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [esp + 0x224c]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.0043e4c7
add esp, 0x2244
ret
Function at 0x407a50
Capabilities:
Patch process command line

Disassembly:
sub esp, 0x2c
cmp dword [esp + 0x34], 0
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x14], 0
jne 0x407a70
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret
cmp dword [0x496708], 0
jne 0x407a99
push str.NtQueryInformationProcess
push 0x479048
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x496708], eax
test eax, eax
je 0x407a66
mov eax, dword [esp + 0x40]
push eax
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
test ebx, ebx
je 0x407bc5
lea ecx, [esp + 0x1c]
push ecx
push 0x18
lea edx, [esp + 0x28]
push edx
push 0
push ebx
call dword [0x496708]
test eax, eax
jl 0x407bbe
cmp dword [esp + 0x24], 0
je 0x407bbe
push 0x1e2
call fcn.0043e793
mov edi, eax
add esp, 4
mov dword [esp + 0x18], edi
test edi, edi
je 0x407bbe
mov ecx, dword [esp + 0x24]
mov ebp, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
lea eax, [esp + 0x10]
push eax
push 0x1d8
push edi
push ecx
push ebx
call ebp
test eax, eax
je 0x407bbe
push 0x52
call fcn.0043e793
mov esi, eax
add esp, 4
test esi, esi
je 0x407bb5
mov eax, dword [edi + 0x10]
lea edx, [esp + 0x10]
push edx
push 0x48
push esi
push eax
push ebx
call ebp
test eax, eax
je 0x407bb5
movzx eax, word [esi + 0x40]
cmp eax, 0x2000
jae 0x407bac
add eax, 0xa
push eax
call fcn.0043e793
movzx ecx, word [esi + 0x40]
add ecx, 0xa
push ecx
mov edi, eax
push 0
push edi
call fcn.004416b0
movzx eax, word [esi + 0x40]
mov ecx, dword [esi + 0x44]
add esp, 0x10
lea edx, [esp + 0x10]
push edx
push eax
push edi
push ecx
push ebx
call ebp
test eax, eax
je 0x407b9f
movzx edx, word [esi + 0x40]
mov eax, dword [esp + 0x44]
push edx
push edi
push 0x2000
push eax
call fcn.0043e615
add esp, 0x10
mov dword [esp + 0x14], 1
push edi
call fcn.0043e85d
mov edi, dword [esp + 0x1c]
add esp, 4
push esi
call fcn.0043e85d
add esp, 4
push edi
call fcn.0043e85d
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret
Function at 0x407c40
Capabilities:
Get common file path
Query or enumerate registry value

Disassembly:
sub esp, 0x890
mov eax, dword [0x48e050]
xor eax, esp
mov dword [esp + 0x88c], eax
push esi
lea eax, [esp + 4]
push eax
lea ecx, [esp + 0x450]
push ecx
lea edx, [esp + 0x10]
push edx
push str.szBkavDir
push str.SOFTWAREBkav
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x20], 1
mov dword [esp + 0x1c], 0x208
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
test eax, eax
jne 0x407cd2
lea eax, [esp + 0x44c]
push 0x104
push eax
call fcn.0043f855
mov esi, eax
add esp, 8
test esi, esi
je 0x407d76
push esi
lea ecx, [esp + 0x450]
push edi
push ecx
call fcn.0043f6d2
add esp, 0xc
test eax, eax
jne 0x407ced
push str.In_bkav_dir
call fcn.00404c20
add esp, 4
mov eax, 1
pop esi
mov ecx, dword [esp + 0x88c]
xor ecx, esp
call fcn.0043e4c7
add esp, 0x890
ret
mov eax, esi
test esi, esi
jl 0x407d0f
mov ecx, 0x5c
jmp 0x407d00
cmp word [esp + eax*2 + 0x44c], cx
je 0x407d0f
sub eax, 1
jns 0x407d00
test eax, eax
jle 0x407d76
push eax
lea edx, [esp + 0x450]
push edx
lea eax, [esp + 0x14]
push 0x104
push eax
call fcn.0043e9ba
push str.BluPro
lea ecx, [esp + 0x20]
push 0x104
push ecx
call fcn.0043f083
lea eax, [esp + 0x28]
add esp, 0x1c
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x407d50
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x10]
push edi
push edx
call fcn.0043f6d2
add esp, 0xc
test eax, eax
je 0x407cd2
push 0x104
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x407cd2
lea ecx, [esp + 0xc]
push ecx
push str._sBkavService.exe
lea edx, [esp + 0x234]
call fcn.004047d0
lea edx, [esp + 0x234]
push edi
push edx
call fcn.0043ec25
add esp, 0x10
test eax, eax
je 0x407cd2
lea eax, [esp + 0xc]
push eax
push str._sBluProService.exe
lea edx, [esp + 0x234]
call fcn.004047d0
lea ecx, [esp + 0x234]
push edi
push ecx
call fcn.0043ec25
add esp, 0x10
test eax, eax
je 0x407cd2
push 0x104
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x407cd2
lea eax, [esp + 0xc]
push eax
push str._sSysWOW64BkavService.exe
lea edx, [esp + 0x234]
call fcn.004047d0
lea ecx, [esp + 0x234]
push edi
push ecx
call fcn.0043ec25
add esp, 0x10
test eax, eax
je 0x407cd2
lea edx, [esp + 0xc]
push edx
push str._sSysWOW64BluProService.exe
lea edx, [esp + 0x234]
call fcn.004047d0
lea eax, [esp + 0x234]
push edi
push eax
call fcn.0043ec25
add esp, 0x10
test eax, eax
je 0x407cd2
lea ecx, [esp + 0x66c]
call fcn.00405420
test eax, eax
je 0x407ed6
lea ecx, [esp + 0x66c]
push 0x104
push ecx
call fcn.0043f855
add esp, 8
test eax, eax
je 0x407ec9
push eax
lea edx, [esp + 0x670]
push edi
push edx
call fcn.0043f6d2
add esp, 0xc
test eax, eax
jne 0x407ec9
push str.In_bkav_Ep_dir
call fcn.00404c20
add esp, 4
mov eax, 1
pop esi
mov ecx, dword [esp + 0x88c]
xor ecx, esp
call fcn.0043e4c7
add esp, 0x890
ret
push str.Is_not_bkav_process
call fcn.00404c20
add esp, 4
mov ecx, dword [esp + 0x890]
pop esi
xor ecx, esp
xor eax, eax
call fcn.0043e4c7
add esp, 0x890
ret
Function at 0x408240
Capabilities:
Create service
Modify service

Disassembly:
push ecx
push ebx
push esi
push edi
push 0xf003f
push 0
push 0
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x408276
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_open_Service_Control_manager__error_code___d
call fcn.00404c20
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
pop ecx
ret
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
push 0
push 0
push 0
push 0
push eax
mov eax, dword [esp + 0x34]
push ecx
push 1
push edx
push eax
push 0xf01ff
push esi
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
jne 0x4082cc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_create_service__error_code___d
call fcn.00404c20
add esp, 8
push edi
call ebx
xor eax, eax
pop edi
pop esi
pop ebx
pop ecx
ret
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0xc]
push edx
push 1
push esi
mov dword [esp + 0x18], ecx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
push esi
call ebx
push edi
call ebx
pop edi
pop esi
xor eax, eax
pop ebx
pop ecx
ret
Function at 0x4085f0
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x48a598
push 0x441f50
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x48e050]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
xor esi, esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], esi
xor ebx, ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 4], esi
push 0xf003f
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
mov dword [ebp - 0x1c], edi
test edi, edi
jne 0x40865c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_service_failed:__d
call fcn.00404c20
add esp, 8
jmp 0x408697
push 0xf01ff
push str.BkavFwDrvService
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x20], esi
test esi, esi
je 0x408697
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov ebx, eax
mov dword [ebp - 0x24], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push str.DeleteService:__d_error:__d
call fcn.00404c20
add esp, 0xc
mov dword [ebp - 4], 0xfffffffe
call fcn.004086c0
mov eax, ebx
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4086e0
Capabilities:
Query service status
Start service
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x48a578
push 0x441f50
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x48e050]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
xor eax, eax
mov dword [ebp - 0x24], eax
xor esi, esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
xor edi, edi
mov dword [ebp - 4], eax
push str.BkavService
push str.RestartService:__s
call fcn.00404c20
add esp, 8
push 0xf003f
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x24], eax
test eax, eax
jne 0x408770
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_service_failed:__d
jmp 0x4087f4
push 0xf01ff
push str.BkavService
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x20], esi
test esi, esi
je 0x4087fc
lea eax, [ebp - 0x44]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov ebx, eax
mov dword [ebp - 0x1c], ebx
push ebx
push str.Stop_service:__d
call fcn.00404c20
add esp, 8
test ebx, ebx
je 0x4087fc
mov edi, edi
lea ecx, [ebp - 0x44]
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x4087d9
cmp dword [ebp - 0x40], 1
je 0x4087d9
inc edi
mov dword [ebp - 0x28], edi
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp edi, 0xa
jl 0x4087b0
cmp edi, 0xa
jge 0x4087fc
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
mov ebx, eax
mov dword [ebp - 0x1c], ebx
push ebx
push str.Start_service:__d
call fcn.00404c20
add esp, 8
mov dword [ebp - 4], 0xfffffffe
call fcn.00408822
mov eax, ebx
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret