joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401940
Capabilities:
Modify service
Persist via windows service
Set registry value

Disassembly:
mov eax, 0x1810
call fcn.0046c720
mov eax, dword [0x4c2b20]
xor eax, esp
mov dword [esp + 0x180c], eax
push esi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
mov dword [esp + 4], esi
test esi, esi
je 0x401ac8
push ebx
push 0xf003f
push 0x4a6a84
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
je 0x401ac0
push 0xfff
lea eax, [esp + 0x819]
push 0
push eax
mov byte [esp + 0x820], 0
call fcn.0046a930
add esp, 0xc
lea ecx, [esp + 0x10]
push ecx
push 0x1000
lea edx, [esp + 0x81c]
push edx
push ebx
mov dword [esp + 0x20], 0
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x401ab9
push ebp
push edi
push str.SystemCurrentControlSetServices_
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x4a6a84
lea ecx, [esp + 0x20]
push ecx
call esi
push str.Instances
lea edx, [esp + 0x20]
push edx
call esi
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0x4a6b40
call ebp
mov edi, dword [sym.imp.SHLWAPI.dll_SHSetValueW]
add eax, eax
push eax
push 0x4a6b40
push 1
push str.DefaultInstance
lea eax, [esp + 0x2c]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call edi
push str.Top
lea ecx, [esp + 0x20]
push ecx
call esi
push str.586333
call ebp
add eax, eax
push eax
push str.586333
push 1
push str.Altitude
lea edx, [esp + 0x2c]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call edi
push 4
lea eax, [esp + 0x18]
push eax
push 4
push str.Flags
lea ecx, [esp + 0x2c]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x2c], 1
call edi
cmp dword [esp + 0x81c], 2
pop edi
pop ebp
je 0x401ab5
push 0
push 0
push 0
push str.FltMgr
push 0
push str.FSFilter_Activity_Monitor
push 0
push 1
push 1
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
mov esi, dword [esp + 8]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop ebx
mov ecx, dword [esp + 0x1810]
pop esi
xor ecx, esp
call fcn.0046b5b0
add esp, 0x1810
ret
Function at 0x401ae0
Capabilities:
Copy file

Disassembly:
push 0xffffffffffffffff
push 0x492ce0
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4c2b20]
xor eax, esp
push eax
lea eax, [esp + 0x24]
mov dword fs:[0], eax
mov eax, dword [esp + 0x34]
xor ebp, ebp
push eax
lea ecx, [esp + 0x18]
mov dword [esp + 0x20], ebp
call fcn.00401020
mov dword [esp + 0x2c], ebp
mov edi, dword [eax]
cmp edi, ebp
je 0x401b3a
cmp dword [edi + 4], ebp
jne 0x401b35
mov ecx, dword [edi]
push ecx
call fcn.0048c810
mov dword [edi + 4], eax
mov edi, dword [edi + 4]
jmp 0x401b3c
xor edi, edi
mov esi, dword [sym.imp.imagehlp.dll_ImageLoad]
push ebp
push edi
call esi
mov dword [esp + 0x2c], 0xffffffff
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x14]
cmp eax, ebp
je 0x401b9a
mov edi, eax
add eax, 8
push eax
call ebx
cmp eax, ebp
jne 0x401b96
cmp edi, ebp
je 0x401b96
mov eax, dword [edi]
cmp eax, ebp
je 0x401b7d
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [edi + 4]
cmp eax, ebp
je 0x401b8d
push eax
call fcn.00447e1e
add esp, 4
push edi
call fcn.00447e1e
add esp, 4
mov dword [esp + 0x14], ebp
mov edx, dword [esp + 0x38]
push edx
lea ecx, [esp + 0x1c]
call fcn.00401020
mov dword [esp + 0x2c], 1
mov edi, dword [eax]
cmp edi, ebp
je 0x401bcb
cmp dword [edi + 4], ebp
jne 0x401bc6
mov eax, dword [edi]
push eax
call fcn.0048c810
mov dword [edi + 4], eax
mov edi, dword [edi + 4]
jmp 0x401bcd
xor edi, edi
push ebp
push edi
call esi
mov esi, eax
mov eax, dword [esp + 0x18]
cmp eax, ebp
je 0x401c15
mov edi, eax
add eax, 8
push eax
call ebx
test eax, eax
jne 0x401c11
cmp edi, ebp
je 0x401c11
mov eax, dword [edi]
cmp eax, ebp
je 0x401bf8
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [edi + 4]
cmp eax, ebp
je 0x401c08
push eax
call fcn.00447e1e
add esp, 4
push edi
call fcn.00447e1e
add esp, 4
mov dword [esp + 0x18], ebp
mov eax, dword [esp + 0x20]
mov edi, dword [sym.imp.imagehlp.dll_ImageUnload]
cmp eax, ebp
je 0x401c42
cmp esi, ebp
je 0x401c3f
mov edx, dword [eax + 0xc]
mov ecx, dword [esi + 0xc]
mov dx, word [edx + 4]
cmp dx, word [ecx + 4]
jne 0x401c3f
mov dword [esp + 0x1c], 1
push eax
call edi
cmp esi, ebp
je 0x401c49
push esi
call edi
cmp dword [esp + 0x1c], ebp
je 0x401c82
mov esi, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
call fcn.00401fb0
test eax, eax
je 0x401c82
push ebp
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov eax, 1
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
xor eax, eax
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
Function at 0x401ca0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x80c
mov eax, dword [0x4c2b20]
xor eax, esp
mov dword [esp + 0x804], eax
push esi
push edi
push 0
call fcn.00401180
add esp, 4
cmp eax, 0xffffffff
jne 0x401cde
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x804]
xor ecx, esp
call fcn.0046b5b0
add esp, 0x80c
ret
push eax
call dword [sym.imp.ntdll.dll_NtClose]
push 0x200
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push str.Drivers_
lea ecx, [esp + 0xc]
push ecx
call esi
push str.Estdlock.SYS
lea edx, [esp + 0xc]
push edx
call esi
push 0x200
lea eax, [esp + 0x40c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x408]
push 0x5c
push ecx
call fcn.0046b5ec
add esp, 8
test eax, eax
je 0x401d8e
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea esi, [eax + 2]
push 0x4a6bd4
push esi
call edi
lea edx, [esp + 8]
push edx
lea eax, [esp + 0x40c]
push eax
call fcn.00401ae0
add esp, 8
test eax, eax
jne 0x401d89
push 0x4a6bf0
push esi
call edi
lea ecx, [esp + 8]
push ecx
lea edx, [esp + 0x40c]
push edx
call fcn.00401ae0
add esp, 8
test eax, eax
je 0x401d8e
call fcn.00401940
mov ecx, dword [esp + 0x80c]
pop edi
pop esi
xor ecx, esp
mov eax, 1
call fcn.0046b5b0
add esp, 0x80c
ret

Function at 0x401fb0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub esp, 0x414
mov eax, dword [0x4c2b20]
xor eax, esp
mov dword [esp + 0x410], eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
call edi
cmp eax, 0xffffffff
je 0x401fdd
push esi
call edi
test eax, 0x10000
je 0x402003
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x402003
mov eax, 1
pop edi
mov ecx, dword [esp + 0x410]
xor ecx, esp
call fcn.0046b5b0
add esp, 0x414
ret
lea eax, [esp + 4]
push eax
mov ecx, esi
call fcn.00405370
add esp, 4
test eax, eax
je 0x401fe8
lea ecx, [esp + 0x20c]
push ecx
mov ecx, ebx
call fcn.00405370
add esp, 4
test eax, eax
je 0x401fe8
lea edx, [esp + 4]
push edx
lea ecx, [esp + 0x210]
call fcn.004054f0
mov ecx, dword [esp + 0x418]
dec eax
add esp, 4
neg eax
sbb eax, eax
pop edi
xor ecx, esp
inc eax
call fcn.0046b5b0
add esp, 0x414
ret
Function at 0x402060
Capabilities:
Persist via windows service
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x492c7b
mov eax, dword fs:[0]
push eax
sub esp, 0x830
mov eax, dword [0x4c2b20]
xor eax, esp
mov dword [esp + 0x828], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4c2b20]
xor eax, esp
push eax
lea eax, [esp + 0x844]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x854]
push str.SystemCurrentControlSetServices_
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push ebp
lea ecx, [esp + 0x40]
push ecx
call esi
push str.Instances
lea edx, [esp + 0x40]
push edx
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0x4a6b40
call ebx
mov edi, dword [sym.imp.SHLWAPI.dll_SHSetValueW]
add eax, eax
push eax
push 0x4a6b40
push 1
push str.DefaultInstance
lea eax, [esp + 0x4c]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call edi
push str.Top
lea ecx, [esp + 0x40]
push ecx
call esi
push str.586333
call ebx
add eax, eax
push eax
push str.586333
mov esi, 1
push esi
push str.Altitude
lea edx, [esp + 0x4c]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call edi
push 4
lea eax, [esp + 0x24]
push eax
push 4
push str.Flags
lea ecx, [esp + 0x4c]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x38], esi
call edi
lea edx, [esp + 0x1c]
push edx
push 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4021ac
lea eax, [esp + 0x24]
push eax
push str.SeLoadDriverPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x4021ac
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
push 0
push 0
push 0x10
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x2c]
push 0
push ecx
mov dword [esp + 0x44], esi
mov dword [esp + 0x50], 2
mov dword [esp + 0x4c], edx
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push str.FltLib
mov esi, 0x45a
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x402219
push str.FilterLoad
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x402212
push ebp
lea ecx, [esp + 0x1c]
call fcn.00401020
mov dword [esp + 0x84c], 0
mov eax, dword [eax]
test eax, eax
je 0x4021f3
mov eax, dword [eax]
jmp 0x4021f5
xor eax, eax
push eax
call edi
test eax, eax
jg 0x402200
mov esi, eax
jmp 0x402209
movzx esi, ax
or esi, 0x80070000
lea ecx, [esp + 0x18]
call fcn.004010d0
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
je 0x402238
cmp esi, 0xb7
je 0x402238
cmp esi, 0x420
je 0x402238
xor eax, eax
jmp 0x402242
call fcn.00402860
mov eax, 1
mov ecx, dword [esp + 0x844]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x828]
xor ecx, esp
call fcn.0046b5b0
add esp, 0x83c
ret
Function at 0x402270
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x21c
mov eax, dword [0x4c2b20]
xor eax, esp
mov dword [esp + 0x218], eax
push esi
push edi
mov ecx, 0x11
mov esi, str.SYSTEMCurrentControlSetServices_
lea edi, [esp + 0x18]
rep movsd dword es:[edi], dword [esi]
push 0x1c2
lea eax, [esp + 0x62]
push 0
push eax
movsw word es:[edi], word [esi]
call fcn.0046a930
add esp, 0xc
test ebx, ebx
je 0x402340
push ebx
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea edx, [esp + 8]
push edx
push 1
push 0
lea eax, [esp + 0x24]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x402340
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x10]
push edx
mov dword [esp + 0x14], eax
lea eax, [esp + 0x1c]
push eax
push 0
push str.Start
mov edi, 4
push ecx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x28], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edx, dword [esp + 8]
push edx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x402340
cmp dword [esp + 0xc], edi
jne 0x402340
lea eax, [edi - 3]
pop edi
pop esi
mov ecx, dword [esp + 0x218]
xor ecx, esp
call fcn.0046b5b0
add esp, 0x21c
ret
mov ecx, dword [esp + 0x220]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.0046b5b0
add esp, 0x21c
ret

Function at 0x402360
Capabilities:
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x214
mov eax, dword [0x4c2b20]
xor eax, esp
mov dword [esp + 0x210], eax
push esi
push edi
mov ecx, 0x11
mov esi, str.SYSTEMCurrentControlSetServices_
lea edi, [esp + 0x10]
rep movsd dword es:[edi], dword [esi]
push 0x1c2
lea eax, [esp + 0x5a]
push 0
push eax
mov dword [esp + 0x18], 1
movsw word es:[edi], word [esi]
call fcn.0046a930
add esp, 0xc
test ebx, ebx
jne 0x4023c1
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x210]
xor ecx, esp
call fcn.0046b5b0
add esp, 0x214
ret
push ebx
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea edx, [esp + 8]
push edx
push 2
push 0
lea eax, [esp + 0x1c]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4023a8
mov edx, dword [esp + 8]
push 4
lea ecx, [esp + 0x10]
push ecx
push 4
push eax
push str.Start
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x218]
xor eax, eax
test esi, esi
pop edi
sete al
pop esi
xor ecx, esp
call fcn.0046b5b0
add esp, 0x214
ret
Function at 0x402e20
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
push esi
mov esi, ecx
mov ecx, 0x200
mul ecx
push 0
mov dword [esp + 0x10], edx
lea edx, [esp + 0x10]
push edx
push eax
push edi
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x402e53
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x402e7e
mov ecx, dword [esp + 0x14]
push 0
lea eax, [esp + 8]
push eax
shl esi, 9
push esi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402e7e
cmp esi, dword [esp + 4]
jne 0x402e7e
mov eax, 1
pop esi
add esp, 0xc
ret
xor eax, eax
pop esi
add esp, 0xc
ret

Function at 0x402e90
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xc
push esi
mov esi, ecx
mov ecx, 0x200
mul ecx
push 0
mov dword [esp + 0x10], edx
lea edx, [esp + 0x10]
push edx
push eax
push edi
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x402ec3
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x402eee
mov ecx, dword [esp + 0x14]
push 0
lea eax, [esp + 8]
push eax
shl esi, 9
push esi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x402eee
cmp esi, dword [esp + 4]
jne 0x402eee
mov eax, 1
pop esi
add esp, 0xc
ret
xor eax, eax
pop esi
add esp, 0xc
ret

Function at 0x403060
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
mov eax, dword [esp + 0x24]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x28]
xor edx, edx
div dword [esi + 8]
push edi
mov ebp, 1
mov dword [esp + 0x14], eax
lea ecx, [ecx]
mov eax, dword [esp + 0x14]
push 0
push eax
call fcn.00402f60
mov ecx, dword [esi + 8]
mov ebx, eax
mov eax, dword [esp + 0x3c]
xor edx, edx
div ecx
add esp, 8
sub ecx, edx
mov edi, ecx
cmp edi, ebp
jbe 0x4030a6
mov edi, ebp
test ebx, ebx
jne 0x4030c1
mov ecx, dword [esp + 0x30]
mov ebx, edi
shl ebx, 9
push ebx
push 0
push ecx
call fcn.0046a930
add esp, 0xc
jmp 0x403122
mov eax, dword [esp + 0x2c]
mov esi, dword [eax]
lea eax, [edx + ebx]
mov ecx, 0x200
mul ecx
push 0
mov dword [esp + 0x28], edx
lea edx, [esp + 0x28]
push edx
push eax
push esi
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4030f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40313d
mov ecx, dword [esp + 0x30]
push 0
lea eax, [esp + 0x1c]
push eax
mov ebx, edi
shl ebx, 9
push ebx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40313d
cmp ebx, dword [esp + 0x18]
jne 0x40313d
mov dword [esp + 0x1c], 1
add dword [esp + 0x34], edi
add dword [esp + 0x30], ebx
inc dword [esp + 0x14]
sub ebp, edi
test ebp, ebp
je 0x403147
mov esi, dword [esp + 0x2c]
jmp 0x403080
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
Function at 0x403240
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
push edi
push 0x19000
call fcn.00447e29
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x40326c
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
push 0x19000
push 0
push ebx
call fcn.0046a930
mov esi, dword [esp + 0x3c]
mov ebp, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
add esp, 0xc
test ebp, ebp
je 0x40330c
mov ecx, 0x200
mul ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
lea ecx, [ecx]
mov edi, ebp
cmp ebp, 0xc8
jbe 0x4032af
mov edi, 0xc8
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
push 0
lea ecx, [esp + 0x28]
push ecx
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x34]
push eax
push edx
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4032e1
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40334a
mov ecx, dword [esp + 0x2c]
push 0
lea eax, [esp + 0x18]
push eax
mov esi, edi
shl esi, 9
push esi
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40334a
cmp esi, dword [esp + 0x14]
jne 0x40334a
sub ebp, edi
jne 0x4032a0
mov esi, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
lea eax, [ebx + 4]
mov dword [ebx], 0xfffffff8
mov dword [eax], 0xffffffff
add eax, 4
mov ecx, 2
cmp edx, 0x6400
jbe 0x40336c
push ebx
call fcn.00447e1e
add esp, 4
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov esi, eax
call fcn.00447e1e
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
test edx, edx
je 0x40337b
mov dword [eax], ecx
dec edx
add eax, 4
inc ecx
test edx, edx
jne 0x403370
mov eax, dword [esi + 8]
mov ecx, 0xc8
cmp eax, ecx
jae 0x403389
mov ecx, eax
mov eax, dword [esi + 0x10]
mov edi, dword [esp + 0x2c]
push ebx
call fcn.00402e90
add esp, 4
test eax, eax
je 0x40334a
push ebx
call fcn.00447e1e
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret
Function at 0x405250
Capabilities:
Set registry value

Disassembly:
push ecx
lea eax, [esp]
push eax
push 0x20006
push 0
push str.SoftwareLenovo_
push closesocket
mov dword [esp + 0x14], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40527c
xor eax, eax
pop ecx
ret
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 8]
push esi
push ecx
mov ecx, dword [esp + 8]
push edx
push 1
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [esp + 4]
push edx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test esi, esi
sete al
pop esi
pop ecx
ret

Function at 0x405370
Capabilities:
Get file version info

Disassembly:
sub esp, 0x220
mov eax, dword [0x4c2b20]
xor eax, esp
mov dword [esp + 0x21c], eax
mov eax, dword [esp + 0x224]
push esi
push edi
mov edi, ecx
push 0
push edi
mov dword [esp + 0x18], eax
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, eax
test esi, esi
jne 0x4053b8
pop edi
pop esi
mov ecx, dword [esp + 0x21c]
xor ecx, esp
call fcn.0046b5b0
add esp, 0x220
ret
xor ecx, ecx
mov edx, 2
mul edx
seto cl
push ebp
neg ecx
or ecx, eax
push ecx
call fcn.00447e29
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x40540a
push ebp
push esi
push 0
push edi
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x405401
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x1c]
push ecx
push str.VarFileInfoTranslation
push ebp
call sub.VERSION.dll_VerQueryValueW
mov edi, eax
test edi, edi
jne 0x405424
push ebp
call fcn.00447e1e
add esp, 4
pop ebp
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x21c]
xor ecx, esp
call fcn.0046b5b0
add esp, 0x220
ret
xor esi, esi
test dword [esp + 0xc], 0xfffffffc
jbe 0x4054c0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x405440
mov eax, dword [esp + 0x1c]
movzx edx, word [eax + esi*4 + 2]
movzx eax, word [eax + esi*4]
push edx
push eax
lea ecx, [esp + 0x2c]
push str.StringFileInfo_04x_04x_
push ecx
call fcn.0046ddec
add esp, 0x10
push 0x4a6a80
lea edx, [esp + 0x28]
push edx
call ebx
push 0x4a6c1c
lea eax, [esp + 0x28]
push eax
call ebx
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x2c]
push eax
push ebp
call sub.VERSION.dll_VerQueryValueW
mov edi, eax
test edi, edi
jne 0x4054a2
mov ecx, dword [esp + 0x10]
inc esi
shr ecx, 2
cmp esi, ecx
jb 0x405440
jmp 0x4054bf
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
sub edx, eax
lea esp, [esp]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4054b0
pop ebx
push ebp
call fcn.00447e1e
mov ecx, dword [esp + 0x22c]
add esp, 4
pop ebp
mov eax, edi
pop edi
pop esi
xor ecx, esp
call fcn.0046b5b0
add esp, 0x220
ret
Function at 0x405720
Capabilities:
Access the windows event log

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.estdisk
push 0
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
test esi, esi
jne 0x405754
push str.Cannot_register_the_event_source.
call fcn.0046dfbc
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
ret
push 0
lea eax, [esp + 0x10]
push eax
push 0
push 1
push 0
push 0xc0020001
push 0
push 4
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
test eax, eax
jne 0x405782
push str.Cannot_report_the_event.
call fcn.0046dfbc
add esp, 4
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
ret
Function at 0x405af0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov esi, eax
lea eax, [esp + 0x14]
push eax
push 0x20019
push 0
push str.SoftwareLenovo_
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x2c], 0x208
mov dword [esp + 0x28], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x405b5f
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push ecx
push esi
push 0
push 0
push str.SDiskPath
push edx
call ebx
mov edi, eax
mov eax, dword [esp + 0x14]
push eax
call ebp
xor eax, eax
test edi, edi
sete al
test eax, eax
jne 0x405bc2
lea ecx, [esp + 0x14]
push ecx
push 0x20019
xor edi, edi
push edi
push str.SoftwareLenovo_
push closesocket
mov dword [esp + 0x28], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, edi
jne 0x405bae
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x18]
push edx
push esi
push edi
push edi
push str.SDiskPath
push eax
call ebx
mov ecx, dword [esp + 0x14]
push ecx
mov edi, eax
call ebp
xor edx, edx
test edi, edi
sete dl
mov edi, edx
test edi, edi
jne 0x405bc0
push esi
call fcn.00405870
add esp, 4
test eax, eax
je 0x405bc0
call fcn.004057a0
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret

Function at 0x406860
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ecx
push ebp
mov ebp, dword [esp + 0x14]
push edi
push ebp
call fcn.00447def
mov edi, eax
add esp, 4
test edi, edi
jne 0x40687a
pop edi
pop ebp
pop ecx
ret
mov eax, dword [esp + 0x10]
push ebx
push 0
push 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea ecx, [esp + 0x10]
push ecx
push ebp
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, eax
test ebx, ebx
je 0x4068c3
mov edx, dword [esp + 0x18]
push 0
push 0
push edx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0x10]
push eax
push ebp
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, eax
push edi
call fcn.00447e1e
add esp, 4
mov eax, ebx
pop ebx
pop edi
pop ebp
pop ecx
ret