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

Disassembly:
sub esp, 0x21c
mov eax, dword [0x5954a0]
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.004f8090
add esp, 0xc
test ebx, ebx
je 0x403500
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 0x403500
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 0x403500
cmp dword [esp + 0xc], edi
jne 0x403500
lea eax, [edi - 3]
pop edi
pop esi
mov ecx, dword [esp + 0x218]
xor ecx, esp
call fcn.004f8124
add esp, 0x21c
ret
mov ecx, dword [esp + 0x220]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.004f8124
add esp, 0x21c
ret

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

Disassembly:
sub esp, 0x214
mov eax, dword [0x5954a0]
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.004f8090
add esp, 0xc
test ebx, ebx
jne 0x403581
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x210]
xor ecx, esp
call fcn.004f8124
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 0x403568
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.004f8124
add esp, 0x214
ret
Function at 0x4039d0
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
sub esp, 0x2c
push ebp
mov ebp, dword [esp + 0x38]
push esi
test ebp, ebp
je 0x4039e4
mov dword [ebp], 0
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
mov dword [esp + 8], esi
test esi, esi
jne 0x403a03
pop esi
pop ebp
add esp, 0x2c
ret
push edi
push 0xf003f
push 0x5668c4
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
jne 0x403a56
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp edi, 0x424
jne 0x403a46
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x2c
ret
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x2c
ret
cmp dword [esp + 0x3c], 0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
je 0x403ada
lea eax, [esp + 0x44]
call fcn.004014e0
test eax, eax
je 0x403ada
cmp dword [esp + 0x44], 0
jne 0x403acf
lea eax, [esp + 0x18]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x403a93
call ebx
cmp eax, 0x426
jne 0x403acf
cmp dword [esp + 0x1c], 1
je 0x403ada
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [esp + 0x14]
push ecx
push 0x24
lea edx, [esp + 0x20]
push edx
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x403ac8
mov dword [esp + 0x1c], 4
jmp 0x403acf
cmp dword [esp + 0x1c], 1
je 0x403ada
test ebp, ebp
je 0x403ada
mov dword [ebp], 1
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov esi, eax
call ebx
mov ebx, eax
test esi, esi
jne 0x403b03
cmp ebx, 0x430
jne 0x403b03
test ebp, ebp
je 0x403afe
mov dword [ebp], 1
mov esi, 1
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
mov eax, dword [esp + 0x10]
push eax
call edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop ebx
pop edi
mov eax, esi
pop esi
pop ebp
add esp, 0x2c
ret

Function at 0x405200
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 0x405233
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40525e
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 0x40525e
cmp esi, dword [esp + 4]
jne 0x40525e
mov eax, 1
pop esi
add esp, 0xc
ret
xor eax, eax
pop esi
add esp, 0xc
ret
Function at 0x405270
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 0x4052a3
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4052ce
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 0x4052ce
cmp esi, dword [esp + 4]
jne 0x4052ce
mov eax, 1
pop esi
add esp, 0xc
ret
xor eax, eax
pop esi
add esp, 0xc
ret

Function at 0x405480
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.00405380
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 0x4054c6
mov edi, ebp
test ebx, ebx
jne 0x4054e1
mov ecx, dword [esp + 0x30]
mov ebx, edi
shl ebx, 9
push ebx
push 0
push ecx
call fcn.004f8090
add esp, 0xc
jmp 0x405542
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 0x405517
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40555d
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 0x40555d
cmp ebx, dword [esp + 0x18]
jne 0x40555d
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 0x405567
mov esi, dword [esp + 0x2c]
jmp 0x4054a0
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 0x405580
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x14
mov eax, dword [esp + 0x20]
push ebx
push ebp
mov ebp, dword [esp + 0x20]
xor edx, edx
div dword [ebp + 8]
push esi
push edi
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x28]
push 1
push eax
mov esi, ebp
call fcn.00405380
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x40564b
mov edi, dword [ebp + 8]
mov eax, dword [esp + 0x30]
xor edx, edx
div edi
mov eax, dword [esp + 0x34]
sub edi, edx
cmp edi, eax
jbe 0x4055ca
mov edi, eax
mov esi, dword [ebp]
lea eax, [edx + ecx]
mov ecx, 0x200
mul ecx
push 0
mov dword [esp + 0x20], edx
lea edx, [esp + 0x20]
push edx
push eax
push esi
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4055fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40564b
mov ecx, dword [esp + 0x2c]
push 0
lea eax, [esp + 0x18]
push eax
mov ebx, edi
shl ebx, 9
push ebx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40564b
cmp ebx, dword [esp + 0x14]
jne 0x40564b
mov eax, dword [esp + 0x34]
add dword [esp + 0x30], edi
add dword [esp + 0x2c], ebx
inc dword [esp + 0x28]
sub eax, edi
mov dword [esp + 0x34], eax
test eax, eax
jne 0x405598
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret
Function at 0x405660
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x14
push ebx
push 0x19000
call fcn.004b304f
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x405686
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop ebx
add esp, 0x14
ret
push ebp
push esi
push edi
push 0x19000
push 0
push ebx
call fcn.004f8090
mov esi, dword [esp + 0x38]
mov ebp, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
add esp, 0xc
test ebp, ebp
je 0x405726
mov ecx, 0x200
mul ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
mov edi, ebp
cmp ebp, 0xc8
jbe 0x4056c5
mov edi, 0xc8
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x24]
push ecx
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x30]
push eax
push edx
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4056fb
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x405795
mov ecx, dword [esp + 0x28]
push 0
lea eax, [esp + 0x14]
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 0x405795
cmp esi, dword [esp + 0x10]
jne 0x405795
sub ebp, edi
jne 0x4056b6
mov esi, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
lea eax, [ebx + 4]
mov dword [ebx], 0xfffffff8
mov dword [eax], 0xffffffff
add eax, 4
mov ecx, 2
cmp edx, 0x6400
jbe 0x405764
push ebx
call fcn.004b305a
add esp, 4
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret
test edx, edx
je 0x405773
mov dword [eax], ecx
dec edx
add eax, 4
inc ecx
test edx, edx
jne 0x405768
mov eax, dword [esi + 8]
mov ecx, 0xc8
cmp eax, ecx
jae 0x405781
mov ecx, eax
mov eax, dword [esi + 0x10]
mov edi, dword [esp + 0x28]
push ebx
call fcn.00405270
add esp, 4
test eax, eax
jne 0x4057b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov esi, eax
call fcn.004b305a
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret
push ebx
call fcn.004b305a
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x14
ret
Function at 0x40783c
Capabilities:
Set file attributes

Disassembly:
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x28], 0
je 0x40785a
mov edx, dword [ebp - 0x3c]
push edx
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
ret

Function at 0x407c16
Capabilities:
Set file attributes

Disassembly:
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x24], 0
je 0x407c37
mov eax, dword [ebp - 0x2c]
push eax
lea ecx, [ebp + 0x2200]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
ret
Function at 0x40885a
Capabilities:
Set file attributes

Disassembly:
mov edx, dword [ebp - 0x2270]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x2268], 0
je 0x408884
mov eax, dword [ebp - 0x227c]
push eax
mov ecx, dword [ebp - 0x2278]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
ret

Function at 0x408db2
Capabilities:
Set file attributes

Disassembly:
mov ecx, dword [ebp - 0x2270]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x2268], 0
je 0x408ddc
mov edx, dword [ebp - 0x227c]
push edx
mov eax, dword [ebp - 0x2280]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
ret

Function at 0x4095cf
Capabilities:
Set file attributes

Disassembly:
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x2268], 0
je 0x4095f3
mov edx, dword [ebp - 0x2280]
push edx
mov eax, dword [ebp - 0x2270]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
ret
Function at 0x40a690
Capabilities:
Check if file exists
Get file attributes
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x201c
call fcn.004fa800
mov eax, dword [0x5954a0]
xor eax, esp
mov dword [esp + 0x2018], eax
push ebx
push esi
push edi
mov esi, ecx
push esi
mov dword [esp + 0x14], esi
mov edi, edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ebx, ebx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], ebx
cmp eax, 0xffffffff
jne 0x40a6e9
mov eax, 0xc0000302
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2018]
xor ecx, esp
call fcn.004f8124
mov esp, ebp
pop ebp
ret
test al, 1
je 0x40a701
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov dword [esp + 0x18], 1
mov dword [esp + 0xc], ebx
mov eax, SysReAllocStringLen
cmp dword [ebp + 8], ebx
jne 0x40a714
mov eax, 0xc0000000
push ebx
push 0x20000000
push 3
push ebx
push 3
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40a738
mov edi, 0xc0000302
jmp 0x40a836
push 0
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x40a757
mov dword [esp + 0xc], 0xc0000305
jmp 0x40a82b
push 0
lea eax, [esp + 0x18]
push eax
push 0x2000
lea ecx, [esp + 0x2c]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40a860
cmp dword [esp + 0x14], 0x2000
jne 0x40a860
lea eax, [esp + 0x20]
call fcn.004152f0
test eax, eax
jne 0x40a79f
mov dword [esp + 0xc], 0xc0000102
jmp 0x40a82b
cmp dword [ebp + 8], 0
mov ecx, 0x80
je 0x40a7ca
lea esi, [esp + 0x315]
rep movsd dword es:[edi], dword [esi]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2018]
xor ecx, esp
call fcn.004f8124
mov esp, ebp
pop ebp
ret
mov esi, edi
lea edi, [esp + 0x315]
lea eax, [esp + 0x20]
rep movsd dword es:[edi], dword [esi]
call fcn.00415270
mov esi, 0xc0000304
test eax, eax
jne 0x40a7eb
mov dword [esp + 0xc], esi
push 0
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x40a823
push 0
lea edx, [esp + 0x18]
push edx
push 0x2000
lea eax, [esp + 0x2c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a823
cmp dword [esp + 0x14], 0x2000
je 0x40a827
mov dword [esp + 0xc], esi
mov esi, dword [esp + 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esp + 0xc]
cmp dword [esp + 0x18], 0
je 0x40a849
mov ecx, dword [esp + 0x1c]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, dword [esp + 0x2024]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004f8124
mov esp, ebp
pop ebp
ret
mov dword [esp + 0xc], 0xc0000303
jmp 0x40a82b
Function at 0x40afc0
Capabilities:
Set registry value

Disassembly:
push ecx
lea eax, [esp]
push eax
push 0x20006
push 0
push str.SoftwareLenovo_
push SysReAllocStringLen
mov dword [esp + 0x14], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40afec
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 0x40b130
Capabilities:
Get disk information
Get disk size

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x22c
mov eax, dword [0x5954a0]
xor eax, esp
mov dword [esp + 0x228], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, ecx
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x32]
push edx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], eax
mov word [esp + 0x34], cx
call fcn.004f8090
add esp, 0xc
lea esi, [esp + 0x28]
mov eax, esi
push eax
push 0x104
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
test eax, eax
je 0x40b226
cmp word [esp + 0x28], bx
je 0x40b2ac
add edi, 8
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
jne 0x40b1f1
push 0
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x18]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
je 0x40b1f1
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov ax, word [esi]
shrd ecx, edx, 0x14
mov dword [edi - 4], ecx
mov ecx, dword [esp + 0x1c]
mov word [edi - 8], ax
mov eax, dword [esp + 0x18]
shrd eax, ecx, 0x14
shr edx, 0x14
shr ecx, 0x14
mov dword [edi], eax
inc ebx
add edi, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2 + 2]
cmp ebx, 0x1a
jae 0x40b20c
cmp word [esi], 0
jne 0x40b1a0
jmp 0x40b2ac
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x228]
xor ecx, esp
call fcn.004f8124
mov esp, ebp
pop ebp
ret
push 0x566e0c
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [esp + 0x20]
xor edi, edi
add esi, 8
nop
add word [esp + 0x28], di
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
jne 0x40b2a6
push 0
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
je 0x40b2a6
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov cx, word [esp + 0x28]
shrd edx, eax, 0xa
shl edx, 0xa
mov word [esi - 8], cx
mov ecx, dword [esp + 0x18]
mov dword [esi - 4], edx
mov edx, dword [esp + 0x1c]
shrd ecx, edx, 0xa
shl ecx, 0xa
shr eax, 0xa
shr edx, 0xa
mov dword [esi], ecx
inc ebx
add esi, 0xc
inc edi
cmp edi, 0x1a
jb 0x40b240
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x234]
mov dword [eax], ebx
pop edi
xor eax, eax
test ebx, ebx
pop esi
setne al
pop ebx
xor ecx, esp
call fcn.004f8124
mov esp, ebp
pop ebp
ret
Function at 0x40b2d0
Capabilities:
Get file version info

Disassembly:
sub esp, 0x220
mov eax, dword [0x5954a0]
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 0x40b318
pop edi
pop esi
mov ecx, dword [esp + 0x21c]
xor ecx, esp
call fcn.004f8124
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.004b304f
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x40b36a
push ebp
push esi
push 0
push edi
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x40b361
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 0x40b384
push ebp
call fcn.004b3044
add esp, 4
pop ebp
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x21c]
xor ecx, esp
call fcn.004f8124
add esp, 0x220
ret
xor esi, esi
test dword [esp + 0xc], 0xfffffffc
jbe 0x40b420
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x40b3a0
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.004fbc08
add esp, 0x10
push 0x5668c0
lea edx, [esp + 0x28]
push edx
call ebx
push 0x566a5c
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 0x40b402
mov ecx, dword [esp + 0x10]
inc esi
shr ecx, 2
cmp esi, ecx
jb 0x40b3a0
jmp 0x40b41f
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 0x40b410
pop ebx
push ebp
call fcn.004b3044
mov ecx, dword [esp + 0x22c]
add esp, 4
pop ebp
mov eax, edi
pop edi
pop esi
xor ecx, esp
call fcn.004f8124
add esp, 0x220
ret

Function at 0x40c7f0
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 0x40c824
push str.Cannot_register_the_event_source.
call fcn.004fbdd5
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 0x40c852
push str.Cannot_report_the_event.
call fcn.004fbdd5
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 0x40cdb0
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 0x40ce1f
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 0x40ce82
lea ecx, [esp + 0x14]
push ecx
push 0x20019
xor edi, edi
push edi
push str.SoftwareLenovo_
push SysReAllocStringLen
mov dword [esp + 0x28], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, edi
jne 0x40ce6e
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 0x40ce80
push esi
call fcn.0040cb30
add esp, 4
test eax, eax
je 0x40ce80
call fcn.0040c870
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret

Function at 0x40ce90
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
lea eax, [esp + 0xc]
push eax
push 0x20019
push 0
push str.SoftwareLenovo_
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x24], 0x208
mov dword [esp + 0x20], 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 0x40cefc
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0x10]
push ecx
push edi
push 0
push 0
push str.SDiskPathPreCommit
push edx
call ebx
mov esi, eax
mov eax, dword [esp + 0xc]
push eax
call ebp
xor eax, eax
test esi, esi
sete al
test eax, eax
jne 0x40cf53
lea ecx, [esp + 0xc]
push ecx
push 0x20019
push 0
push str.SoftwareLenovo_
push SysReAllocStringLen
mov dword [esp + 0x20], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40cf2d
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
mov eax, dword [esp + 0xc]
lea edx, [esp + 0x10]
push edx
push edi
push 0
push 0
push str.SDiskPathPreCommit
push eax
call ebx
mov ecx, dword [esp + 0xc]
push ecx
mov esi, eax
call ebp
xor eax, eax
test esi, esi
sete al
pop esi
pop ebp
pop ebx
add esp, 8
ret