joyce8/EMBER2024-capa huggingface dataset:
Function at 0x3434c0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc
mov eax, dword [ecx + 4]
mov edx, dword [ecx]
xor eax, edx
push ebx
push esi
lea esi, [ecx + 4]
mov dword [esp + 8], edx
lea ebx, [eax + 1]
mov dword [esp + 0x10], eax
add esi, 4
push edi
test bl, 3
je 0x3434e9
and ebx, 0xfffffffc
add ebx, 4
mov eax, dword [0x34e494]
test eax, eax
jne 0x34350d
mov ecx, 0x9bab0b12
call fcn.00343f00
mov edx, 0x7facde30
mov ecx, eax
call fcn.00343e60
mov dword [0x34e494], eax
call eax
mov edi, eax
mov eax, dword [0x34dd18]
test eax, eax
jne 0x343535
mov ecx, 0x9bab0b12
call fcn.00343f00
mov edx, 0x9ff0609c
mov ecx, eax
call fcn.00343e60
mov dword [0x34dd18], eax
lea ecx, [ebx + ebx]
push ecx
push 8
push edi
call eax
mov edi, eax
mov dword [esp + 0x10], edi
test edi, edi
je 0x3435b5
shr ebx, 2
xor eax, eax
push ebp
xor ebp, ebp
mov edx, edi
lea ecx, [esi + ebx*4]
mov ebx, ecx
sub ebx, esi
add ebx, 3
shr ebx, 2
cmp esi, ecx
cmova ebx, eax
test ebx, ebx
je 0x3435aa
mov edi, dword [esp + 0x10]
lea esp, [esp]
mov ecx, dword [esi]
lea edx, [edx + 8]
xor ecx, edi
lea esi, [esi + 4]
movzx eax, cl
inc ebp
mov word [edx - 8], ax
mov eax, ecx
shr eax, 8
movzx eax, al
mov word [edx - 6], ax
shr ecx, 0x10
movzx eax, cl
mov word [edx - 4], ax
shr ecx, 8
movzx eax, cl
mov word [edx - 2], ax
cmp ebp, ebx
jb 0x343570
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
xor ecx, ecx
pop ebp
mov word [edi + eax*2], cx
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0xc
ret

Function at 0x3435c0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc
mov eax, dword [ecx + 4]
mov edx, dword [ecx]
xor eax, edx
push ebx
push ebp
push esi
lea esi, [ecx + 4]
mov dword [esp + 0xc], edx
lea ebx, [eax + 1]
mov dword [esp + 0x14], eax
add esi, 4
push edi
test bl, 3
je 0x3435ea
and ebx, 0xfffffffc
add ebx, 4
mov eax, dword [0x34e494]
test eax, eax
jne 0x34360e
mov ecx, 0x9bab0b12
call fcn.00343f00
mov edx, 0x7facde30
mov ecx, eax
call fcn.00343e60
mov dword [0x34e494], eax
call eax
mov edi, eax
mov eax, dword [0x34dd18]
test eax, eax
jne 0x343636
mov ecx, 0x9bab0b12
call fcn.00343f00
mov edx, 0x9ff0609c
mov ecx, eax
call fcn.00343e60
mov dword [0x34dd18], eax
push ebx
push 8
push edi
call eax
mov ebp, eax
mov dword [esp + 0x14], ebp
test ebp, ebp
je 0x3436a2
shr ebx, 2
xor eax, eax
xor edi, edi
mov ecx, ebp
lea edx, [esi + ebx*4]
mov ebx, edx
sub ebx, esi
add ebx, 3
shr ebx, 2
cmp esi, edx
cmova ebx, eax
test ebx, ebx
je 0x34369a
mov ebp, dword [esp + 0x10]
lea esp, [esp]
mov edx, dword [esi]
lea ecx, [ecx + 4]
xor edx, ebp
lea esi, [esi + 4]
mov byte [ecx - 4], dl
mov eax, edx
shr eax, 8
inc edi
shr edx, 0x10
mov byte [ecx - 3], al
mov byte [ecx - 2], dl
shr edx, 8
mov byte [ecx - 1], dl
cmp edi, ebx
jb 0x343670
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov byte [eax + ebp], 0
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0xc
ret
Function at 0x343bb0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 8
mov dword [esp], 0x4090
or dword [esp], 0x31656b5b
imul eax, dword [esp], 0x51
push ebx
mov ebx, ecx
mov dword [esp + 4], eax
mov eax, 0xb02c0b03
mov edx, dword [esp + 4]
mul edx
shr edx, 6
mov dword [esp + 4], edx
shl dword [esp + 4], 0x10
or dword [esp + 4], 0xecb0ddf8
add dword [esp + 4], 0x637e
xor dword [esp + 4], 0xeef54176
mov dword [esp + 8], 0x5ef
add dword [esp + 8], 0x6fab
or dword [esp + 8], 0x1ac9183b
shl dword [esp + 8], 8
shr dword [esp + 8], 2
xor dword [esp + 8], 0x325f6ec6
mov dword [esp + 8], 0xc1f4
add dword [esp + 8], 0x1c7b
or dword [esp + 8], 0x28c630b6
add dword [esp + 8], 0xffff17a2
shl dword [esp + 8], 0xb
xor dword [esp + 8], 0x30b50810
cmp byte [ebx], 0
je 0x343cf3
push esi
push edi
lea ecx, [ecx]
mov edi, dword [esp + 0xc]
lea ebx, [ebx + 1]
mov dword [esp + 0x10], 0x5ef
add dword [esp + 0x10], 0x6fab
or dword [esp + 0x10], 0x1ac9183b
shl dword [esp + 0x10], 8
shr dword [esp + 0x10], 2
xor dword [esp + 0x10], 0x325f6ec6
movzx ecx, byte [esp + 0x10]
mov esi, dword [esp + 0xc]
mov dword [esp + 0x10], 0xc1f4
add dword [esp + 0x10], 0x1c7b
or dword [esp + 0x10], 0x28c630b6
add dword [esp + 0x10], 0xffff17a2
shl dword [esp + 0x10], 0xb
xor dword [esp + 0x10], 0x30b50810
shl esi, cl
movzx ecx, byte [esp + 0x10]
mov edx, dword [esp + 0xc]
movsx eax, byte [ebx - 1]
mov dword [esp + 0xc], eax
add dword [esp + 0xc], esi
shl edx, cl
add dword [esp + 0xc], edx
sub dword [esp + 0xc], edi
cmp byte [ebx], 0
jne 0x343c60
pop edi
pop esi
mov eax, dword [esp + 4]
pop ebx
add esp, 8
ret
Function at 0x343e60
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x10
push ebx
mov ebx, ecx
mov dword [esp + 4], edx
push ebp
push esi
push edi
mov eax, dword [ebx + 0x3c]
xor esi, esi
add eax, 0x78
add eax, ebx
mov dword [esp + 0x1c], eax
mov edi, dword [eax]
mov eax, dword [edi + ebx + 0x1c]
add edi, ebx
add eax, ebx
mov dword [esp + 0x18], eax
mov ebp, dword [edi + 0x20]
mov eax, dword [edi + 0x24]
add ebp, ebx
add eax, ebx
mov dword [esp + 0x14], eax
cmp dword [edi + 0x18], esi
jbe 0x343ebc
lea esp, [esp]
mov ecx, dword [ebp + esi*4]
add ecx, ebx
call fcn.00343bb0
xor eax, 0x3b993195
cmp eax, dword [esp + 0x10]
je 0x343ec6
inc esi
cmp esi, dword [edi + 0x18]
jb 0x343ea0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
movzx eax, word [eax + esi*2]
mov ecx, dword [ecx + eax*4]
add ecx, ebx
cmp ecx, edi
jb 0x343ef4
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 4]
add eax, edi
cmp ecx, eax
jae 0x343ef4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
jmp 0x3440b0
pop edi
pop esi
pop ebp
mov eax, ecx
pop ebx
add esp, 0x10
ret
sub esp, 0x104
lea edx, [esp]
push esi
mov esi, ecx
push edi
mov al, byte [esi]
test al, al
je 0x3440d6
cmp al, 0x2e
je 0x3440d3
inc esi
mov byte [edx], al
inc edx
mov al, byte [esi]
test al, al
jne 0x3440c3
jmp 0x3440d6
mov byte [edx], 0
mov eax, dword [0x34e470]
test eax, eax
jne 0x3440fa
mov ecx, 0x9bab0b12
call fcn.00343f00
mov edx, 0xcca18ea2
mov ecx, eax
call fcn.00343e60
mov dword [0x34e470], eax
lea ecx, [esp + 8]
push ecx
call eax
mov edi, eax
test edi, edi
jne 0x344141
mov eax, dword [0x34e2f4]
test eax, eax
jne 0x34412b
mov ecx, 0x9bab0b12
call fcn.00343f00
mov edx, 0xe4b28a79
mov ecx, eax
call fcn.00343e60
mov dword [0x34e2f4], eax
lea ecx, [esp + 8]
push ecx
call eax
mov edi, eax
test edi, edi
jne 0x344141
pop edi
pop esi
add esp, 0x104
ret
lea ecx, [esi + 1]
call fcn.00343bb0
xor eax, 0x3b993195
mov ecx, edi
mov edx, eax
call fcn.00343e60
pop edi
pop esi
add esp, 0x104
ret
Function at 0x343f00
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
sub esp, 0x10
mov eax, dword fs:[0x30]
push ebx
push ebp
push esi
mov ebx, dword [eax + 0xc]
add ebx, 0xc
mov dword [esp + 0x18], ecx
push edi
mov dword [esp + 0x18], ebx
mov ebp, dword [ebx]
cmp ebp, ebx
je 0x34408d
mov esi, dword [ebp + 0x30]
mov dword [esp + 0x10], 0x4090
or dword [esp + 0x10], 0x31656b5b
imul eax, dword [esp + 0x10], 0x51
mov dword [esp + 0x10], eax
mov eax, 0xb02c0b03
mov ecx, dword [esp + 0x10]
mul ecx
shr edx, 6
mov dword [esp + 0x10], edx
shl dword [esp + 0x10], 0x10
or dword [esp + 0x10], 0xecb0ddf8
add dword [esp + 0x10], 0x637e
xor dword [esp + 0x10], 0xeef54176
mov dword [esp + 0x14], 0x5ef
add dword [esp + 0x14], 0x6fab
or dword [esp + 0x14], 0x1ac9183b
shl dword [esp + 0x14], 8
shr dword [esp + 0x14], 2
xor dword [esp + 0x14], 0x325f6ec6
mov dword [esp + 0x14], 0xc1f4
add dword [esp + 0x14], 0x1c7b
or dword [esp + 0x14], 0x28c630b6
add dword [esp + 0x14], 0xffff17a2
shl dword [esp + 0x14], 0xb
xor dword [esp + 0x14], 0x30b50810
cmp word [esi], 0
je 0x344073
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x14], 0x5ef
add dword [esp + 0x14], 0x6fab
or dword [esp + 0x14], 0x1ac9183b
shl dword [esp + 0x14], 8
shr dword [esp + 0x14], 2
xor dword [esp + 0x14], 0x325f6ec6
movzx ecx, byte [esp + 0x14]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x14], 0xc1f4
add dword [esp + 0x14], 0x1c7b
or dword [esp + 0x14], 0x28c630b6
add dword [esp + 0x14], 0xffff17a2
shl dword [esp + 0x14], 0xb
xor dword [esp + 0x14], 0x30b50810
shl edx, cl
movzx ecx, byte [esp + 0x14]
mov edi, dword [esp + 0x10]
movzx eax, word [esi]
shl edi, cl
cmp eax, 0x41
jb 0x344052
cmp eax, 0x5a
ja 0x344052
add eax, 0x20
mov dword [esp + 0x10], eax
add esi, 2
add dword [esp + 0x10], edx
add dword [esp + 0x10], edi
sub dword [esp + 0x10], ebx
cmp word [esi], 0
jne 0x343fd1
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
xor eax, 0x14d5ed60
cmp eax, dword [esp + 0x1c]
je 0x344097
mov ebp, dword [ebp]
cmp ebp, ebx
jne 0x343f25
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret
mov eax, dword [ebp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
Function at 0x344370
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
sub esp, 0x14
push ebp
mov ebp, ecx
mov dword [esp + 0x10], ebp
push edi
cmp edx, 0x40
jb 0x34450e
mov eax, 0x5a4d
cmp word [ebp], ax
jne 0x34450e
mov edi, dword [ebp + 0x3c]
add edi, ebp
mov dword [esp + 0x18], edi
cmp dword [edi], 0x4550
jne 0x34450e
mov eax, 0x10b
cmp word [edi + 0x18], ax
jne 0x34450e
mov eax, dword [0x34e2a4]
test eax, eax
jne 0x3443db
mov ecx, 0x9bab0b12
call fcn.00343f00
mov edx, 0x24897df
mov ecx, eax
call fcn.00343e60
mov dword [0x34e2a4], eax
push ebx
push 0x40
push 0x3000
push dword [edi + 0x50]
push 0
call eax
mov ebx, eax
test ebx, ebx
je 0x344505
movzx ecx, word [edi + 0x14]
push esi
lea esi, [edi + 0x18]
add esi, ecx
movzx ecx, word [edi + 6]
mov dword [esp + 0x18], esi
lea ecx, [ecx + ecx*4]
lea eax, [esi + ecx*8]
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0x54]
mov dword [esp + 0x10], eax
mov eax, dword [0x34e1e0]
test eax, eax
jne 0x34443b
mov ecx, 0xc6fbcd74
call fcn.00343f00
mov edx, 0x624eee2
mov ecx, eax
call fcn.00343e60
mov dword [0x34e1e0], eax
push dword [esp + 0x10]
push ebp
push ebx
call eax
mov ecx, dword [esp + 0x20]
add esp, 0xc
cmp esi, ecx
jae 0x3444be
sub ecx, dword [esp + 0x18]
mov eax, 0xcccccccd
dec ecx
add esi, 0x10
mul ecx
mov ecx, edx
shr ecx, 5
inc ecx
mov edi, ecx
mov ebp, dword [esi]
cmp dword [esi - 8], ebp
mov eax, dword [esi + 4]
cmovb ebp, dword [esi - 8]
add eax, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
mov eax, dword [esi - 4]
add eax, ebx
mov dword [esp + 0x14], eax
mov eax, dword [0x34e1e0]
test eax, eax
jne 0x3444a6
mov ecx, 0xc6fbcd74
call fcn.00343f00
mov edx, 0x624eee2
mov ecx, eax
call fcn.00343e60
mov dword [0x34e1e0], eax
push ebp
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call eax
add esp, 0xc
add esi, 0x28
dec edi
jne 0x344465
mov edi, dword [esp + 0x20]
mov edx, edi
mov ecx, ebx
call fcn.00344640
mov edx, edi
mov ecx, ebx
call fcn.00344550
pop esi
test eax, eax
jne 0x344505
mov eax, dword [0x34e3cc]
test eax, eax
jne 0x3444f9
mov ecx, 0x9bab0b12
call fcn.00343f00
mov edx, 0xc16beec2
mov ecx, eax
call fcn.00343e60
mov dword [0x34e3cc], eax
push 0x8000
push 0
push ebx
call eax
xor ebx, ebx
mov eax, ebx
pop ebx
pop edi
pop ebp
add esp, 0x14
ret
pop edi
xor eax, eax
pop ebp
add esp, 0x14
ret
Function at 0x4014f0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x40d00c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
lea eax, [ebp - 0x10]
xor esi, esi
push eax
push 0x20019
push esi
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40159e
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], esi
push eax
push esi
lea eax, [ebp - 8]
push eax
push esi
push str.CurrentBuildNumber
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40159e
mov eax, dword [ebp - 0xc]
xor ecx, ecx
inc eax
mov edx, 2
mul edx
push edi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00406302
mov edi, eax
mov eax, dword [ebp - 0xc]
inc eax
push eax
push esi
push edi
call sub.VCRUNTIME140.dll_memset
add esp, 0x10
lea eax, [ebp - 0xc]
push eax
push edi
lea eax, [ebp - 8]
push eax
push esi
push str.CurrentBuildNumber
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x401594
push edi
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi]
add esp, 4
mov esi, eax
push edi
call fcn.004062fd
add esp, 4
pop edi
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4015ac
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, 0x64
jle 0x4015c7
mov eax, 0x66666667
imul esi
sar edx, 2
mov esi, edx
shr esi, 0x1f
add esi, edx
cmp esi, 0x64
jg 0x4015b1
mov ecx, dword [ebp - 4]
cmp esi, 0x15
pop esi
setge al
xor ecx, ebp
call fcn.00406283
mov esp, ebp
pop ebp
ret
Function at 0x4016f0
Capabilities:
Check if file exists
Delete file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x201c
call fcn.00407280
mov eax, dword [0x40d00c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
cmp byte [edi + 0x1c], 0
je 0x40183e
push 0x4084f8
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40183e
push 0x1000
lea eax, [ebp - 0x1008]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp + 0x10]
lea ecx, [ebp - 0x1008]
push eax
push dword [ebp + 0xc]
call fcn.00401090
lea eax, [ebp - 0x2018]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 0x1000
lea eax, [ebp - 0x2008]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x1008]
push eax
movzx eax, word [ebp - 0x200a]
push eax
movzx eax, word [ebp - 0x200c]
push eax
movzx eax, word [ebp - 0x200e]
push eax
movzx eax, word [ebp - 0x2010]
push eax
movzx eax, word [ebp - 0x2012]
push eax
movzx eax, word [ebp - 0x2016]
push eax
movzx eax, word [ebp - 0x2018]
push eax
push str._04d__02d__02d__02d:_02d:_02d._03d___s_n
lea eax, [ebp - 0x2008]
push 0x800
push eax
call fcn.00401100
lea esi, [edi + 4]
add esp, 0x2c
cmp dword [esi + 0x14], 8
jb 0x4017da
mov eax, dword [esi]
jmp 0x4017dc
mov eax, esi
push 0x40
push 0x408558
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfsopen]
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x40183e
lea eax, [ebp - 0x2008]
push eax
push 0x408560
push ebx
call fcn.00405850
add esp, 0xc
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
add esp, 4
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
inc dword [edi + 0x20]
add esp, 4
cmp dword [edi + 0x20], 0x1400
jl 0x40183e
mov dword [edi + 0x20], 0
cmp dword [esi + 0x14], 8
jb 0x401837
mov esi, dword [esi]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406283
mov esp, ebp
pop ebp
ret
Function at 0x401850
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x40d00c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
lea eax, [ebp - 0x10]
xor bl, bl
push eax
push 0x20019
push 0
push str.SOFTWAREWOW6432NodeLenovoVantageserviceFileLogger
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40190f
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
push 0
lea eax, [ebp - 8]
push eax
push 0
push str.LenovoBatteryGaugeAddin
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40190f
mov eax, dword [ebp - 0xc]
xor ecx, ecx
inc eax
mov edx, 2
mul edx
push esi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00406302
mov esi, eax
mov eax, dword [ebp - 0xc]
inc eax
push eax
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0x10
lea eax, [ebp - 0xc]
push eax
push esi
lea eax, [ebp - 8]
push eax
push 0
push str.LenovoBatteryGaugeAddin
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x401905
push str.Trace
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
add esp, 8
test eax, eax
sete bl
push esi
call fcn.004062fd
add esp, 4
pop esi
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40191d
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
mov al, bl
xor ecx, ebp
pop ebx
call fcn.00406283
mov esp, ebp
pop ebp
ret
Function at 0x401d60
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x407360
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x40d00c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push str.ProcessMaintenance_1
push 0x40d028
mov dword [ebp - 4], 0
call fcn.004016f0
add esp, 8
push str.BGMaintenanceInstance
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x401f1b
call fcn.004044a0
test al, al
jne 0x401e54
call fcn.00404750
test al, al
jne 0x401e54
sub esp, 0x18
xor eax, eax
mov ecx, esp
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [ebp + 8]
push eax
call fcn.00404cf0
call fcn.00403f00
add esp, 0x18
test al, al
jne 0x401e4a
push str.maintenance:_Only_handle_when_there_is_no_update_folder_
push 0x40d028
call fcn.004016f0
sub esp, 0x10
xor eax, eax
mov ecx, esp
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [ebp + 8]
push eax
call fcn.00404cf0
call fcn.00402180
add esp, 0x18
jmp 0x401f2d
push str.maintenance:_no_need_to_handle_Maintenance_task
jmp 0x401f20
push str.maintenance:_need_to_uninstall_BG_because_conflict_with_PCM_or_LE_____UninstallBatteryGauge
push 0x40d028
call fcn.004016f0
add esp, 8
mov dword [ebp - 0x14], 7
xor eax, eax
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
lea ecx, [ebp - 0x28]
push 0xffffffffffffffff
push eax
lea eax, [ebp + 8]
push eax
call fcn.00404cf0
sub esp, 0x18
mov byte [ebp - 4], 1
mov ecx, esp
xor eax, eax
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [ebp + 8]
push eax
call fcn.00404cf0
lea ecx, [ebp - 0x28]
call fcn.004047d0
xor ecx, ecx
add esp, 0x18
cmp word [str.Uninstall.ps1], cx
mov eax, 0xd
cmove eax, ecx
lea ecx, [ebp - 0x28]
push eax
push str.Uninstall.ps1
call fcn.00405050
sub esp, 0x18
xor eax, eax
mov ecx, esp
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [ebp - 0x28]
push eax
call fcn.00404cf0
call fcn.004031e0
mov eax, dword [ebp - 0x14]
add esp, 0x18
cmp eax, 8
jb 0x401f2d
inc eax
push eax
push dword [ebp - 0x28]
call fcn.00404e80
jmp 0x401f2d
push str.maintenance_error:__a_BGMaintenanceInstance_is_running_for_Maintenance__
push 0x40d028
call fcn.004016f0
add esp, 8
push 0x7530
call dword [sym.imp.KERNEL32.dll_Sleep]
test esi, esi
je 0x401f43
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0x1c]
cmp eax, 8
jb 0x401f55
inc eax
push eax
push dword [ebp + 8]
call fcn.00404e80
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00406283
mov esp, ebp
pop ebp
ret
Function at 0x402600
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x814
mov eax, dword [0x40d00c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
lea eax, [ebp - 0x810]
xor bl, bl
push eax
push 0x20119
push 0
push str.CLSIDE303DE81_073F_438A_B0D3_11C27526F607
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40265e
lea eax, [ebp - 0x810]
push eax
push 0x20019
push 0
push str.CLSIDE303DE81_073F_438A_B0D3_11C27526F607
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4026e5
push 0x800
lea eax, [ebp - 0x808]
mov dword [ebp - 0x80c], 0x400
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x80c]
push eax
lea eax, [ebp - 0x808]
push eax
push 0
push 0x20000002
push str.IsAddin
push 0
push dword [ebp - 0x810]
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
test eax, eax
jne 0x4026c6
lea eax, [ebp - 0x808]
push str.true
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
add esp, 8
test eax, eax
sete bl
jmp 0x4026c8
xor bl, bl
lea eax, [ebp - 0x808]
push eax
movzx eax, bl
push eax
push str.Is_Installed_BG:_install_d__IsAddin___s
push 0x40d028
call fcn.004016f0
add esp, 0x10
mov eax, dword [ebp - 0x810]
test eax, eax
je 0x402700
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x810], 0
movzx ecx, bl
push ecx
push str.Is_Installed_BG:_install_d
push 0x40d028
call fcn.004016f0
mov ecx, dword [ebp - 4]
add esp, 0xc
mov al, bl
xor ecx, ebp
pop ebx
call fcn.00406283
mov esp, ebp
pop ebp
ret

Function at 0x402730
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x40d00c]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x14]
mov dword [ebp - 8], 0
push eax
push 0x20019
push 0
push str.SOFTWARELenovoBatteryGauge
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40279e
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
mov dword [ebp - 0xc], 4
push eax
lea eax, [ebp - 0x10]
push eax
push 0
push str.ShowInTaskbar
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x4027b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.IsShowInRegistry_failed_to_read_ShowInTaskbar_value__Error_d
jmp 0x4027aa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.IsShowInRegistry_failed_to_open_registry__Error_d
push 0x40d028
call fcn.004016f0
add esp, 0xc
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4027cc
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x14], 0
push dword [ebp - 8]
push str.IsShowInRegistry_show_d
push 0x40d028
call fcn.004016f0
mov ecx, dword [ebp - 4]
xor eax, eax
add esp, 0xc
cmp dword [ebp - 8], 1
sete al
xor ecx, ebp
call fcn.00406283
mov esp, ebp
pop ebp
ret
Function at 0x402800
Capabilities:
Find taskbar

Disassembly:
push esi
call fcn.004014f0
test al, al
je 0x402835
push str.LenovoVantageToolbar
push 0
call dword [sym.imp.USER32.dll_FindWindowW]
mov esi, eax
push esi
push str.ShowInTaskbar_new_OS_TrayWnd___0x_X_
push 0x40d028
call fcn.004016f0
xor eax, eax
add esp, 0xc
test esi, esi
setne al
pop esi
ret
push 0
push str.Shell_TrayWnd
call dword [sym.imp.USER32.dll_FindWindowW]
mov esi, eax
push esi
push str.ShowInTaskbar_Win10_Parent___0x_X_
push 0x40d028
call fcn.004016f0
add esp, 0xc
test esi, esi
je 0x4028b2
push 0
push str.ReBarWindow32
push 0
push esi
call dword [sym.imp.USER32.dll_FindWindowExW]
mov esi, eax
push esi
push str.ShowInTaskbar_Win10_Rebar___0x_X_
push 0x40d028
call fcn.004016f0
add esp, 0xc
test esi, esi
je 0x4028b2
push 0
push str.Lenovo_Hardware_Settings_Battery_Gauge
push 0
push esi
call dword [sym.imp.USER32.dll_FindWindowExW]
mov esi, eax
push esi
push str.ShowInTaskbar_showtrue__Battery___0x_X_
push 0x40d028
call fcn.004016f0
xor eax, eax
add esp, 0xc
test esi, esi
setne al
pop esi
ret
push str.ShowInTaskbar_showfalse
push 0x40d028
call fcn.004016f0
add esp, 8
xor al, al
pop esi
ret

Function at 0x4028d0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x40d00c]
xor eax, ebp
mov dword [ebp - 4], eax
call fcn.004014f0
test al, al
je 0x402959
lea eax, [ebp - 0x14]
mov dword [ebp - 8], 0
push eax
push 0x20019
push 0
push str.SOFTWARELenovoBatteryGaugeToast
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x402935
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
mov dword [ebp - 0xc], 4
push eax
lea eax, [ebp - 0x10]
push eax
push 0
push str.NewOsDisplayTimes
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x402943
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 8], 3
sbb eax, eax
neg eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406283
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor al, al
xor ecx, ebp
call fcn.00406283
mov esp, ebp
pop ebp
ret