joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405498
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
push ebx
mov ebx, dword [ebp + 8]
push esi
push ebx
call fcn.00405739
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 8], eax
test cl, 8
je 0x4054ce
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x4247e8], eax
jmp 0x405653
mov dword [ebp + 8], ecx
push edi
and dword [ebp + 8], 1
je 0x4054e9
test eax, eax
je 0x4055fe
test cl, 2
je 0x4055fe
mov esi, 0x421d70
push ebx
push esi
call fcn.00405b66
cmp dword [ebp + 8], 0
je 0x405508
push str..
push esi
call sub.KERNEL32.dll_lstrcatA
jmp 0x40550e
push ebx
call fcn.004056a0
push 0x409010
push ebx
call sub.KERNEL32.dll_lstrcatA
push ebx
call sub.KERNEL32.dll_lstrlenA
mov edi, eax
lea eax, [ebp - 0x148]
push eax
push esi
add edi, ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x4055f4
lea eax, [ebp - 0x11c]
push 0x3f
push eax
lea esi, [ebp - 0x11c]
call fcn.00405684
cmp byte [eax], 0
je 0x40555f
cmp byte [ebp - 0x18], 0
je 0x40555f
lea esi, [ebp - 0x18]
cmp byte [esi], 0x2e
jne 0x405575
mov al, byte [esi + 1]
test al, al
je 0x4055d3
cmp al, 0x2e
jne 0x405575
cmp byte [esi + 2], 0
je 0x4055d3
push esi
push edi
call fcn.00405b66
test byte [ebp - 0x148], 0x10
je 0x40559a
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x4055d3
push dword [ebp + 0xc]
push ebx
call fcn.00405498
jmp 0x4055d3
push ebx
call fcn.0040581d
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x4055cb
test byte [ebp + 0xc], 4
je 0x4055c3
push ebx
push 0xfffffffffffffff1
call fcn.00404efa
push 0
push ebx
call fcn.004058b3
jmp 0x4055d3
inc dword [0x4247e8]
jmp 0x4055d3
push ebx
push 0xfffffffffffffff2
call fcn.00404efa
lea eax, [ebp - 0x148]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40553d
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x4055fe
and byte [edi - 1], 0
xor esi, esi
pop edi
cmp dword [ebp + 8], esi
je 0x405653
cmp dword [ebp - 8], esi
jne 0x405613
inc dword [0x4247e8]
jmp 0x405653
push ebx
call fcn.00405e3b
test eax, eax
je 0x405653
push ebx
call fcn.00405659
push ebx
call fcn.0040581d
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x40564b
test byte [ebp + 0xc], 4
je 0x40560b
push ebx
push 0xfffffffffffffff1
call fcn.00404efa
push esi
push ebx
call fcn.004058b3
jmp 0x405653
push ebx
push 0xffffffffffffffe5
call fcn.00404efa
pop esi
pop ebx
leave
ret 8
Function at 0x405739
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x422170
push esi
call fcn.00405b66
push esi
call fcn.004056ec
mov edi, eax
test edi, edi
jne 0x40575a
xor eax, eax
jmp 0x4057ac
push edi
call fcn.00405da2
test byte [0x424770], 0x80
je 0x405773
mov al, byte [edi]
test al, al
je 0x405756
cmp al, 0x5c
je 0x405756
sub edi, esi
jmp 0x40578b
call fcn.00405e3b
test eax, eax
je 0x405785
test byte [eax], 0x10
je 0x405756
push esi
call fcn.004056a0
push esi
call sub.KERNEL32.dll_lstrlenA
cmp eax, edi
push esi
jg 0x405777
call fcn.00405659
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop edi
pop esi
ret 4

Function at 0x40581d
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405839
and al, 0xfe
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
ret 4

Function at 0x40583c
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ecx, eax
push 0
inc ecx
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
push dword [esp + 0x14]
push 0
push 1
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
ret 0xc

Function at 0x40586b
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
dec edi
mov dword [ebp + 8], 0x61736e
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x1a
xor edx, edx
pop ecx
div ecx
push esi
lea eax, [ebp + 8]
push 0
push eax
push dword [ebp + 0xc]
add byte [ebp + 0xa], dl
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x4058af
test edi, edi
jne 0x405876
and byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x4058a9
Function at 0x4058b3
Capabilities:
Get common file path
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
push str.MoveFileExA
push str.KERNEL32.dll
call fcn.00405e79
test eax, eax
mov esi, dword [esp + 0x18]
je 0x4058df
push 5
push esi
push dword [esp + 0x1c]
call eax
test eax, eax
jne 0x405a1e
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov dword [0x422ef8], 0x4c554e
test esi, esi
mov edi, 0x400
mov ebp, 0x422ef8
je 0x405923
push 1
push 0
push esi
call fcn.0040583c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x405a24
cmp eax, edi
jg 0x405a24
mov esi, 0x422970
push edi
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x405a24
cmp eax, edi
jg 0x405a24
push esi
push ebp
push str._s_s_r_n
push 0x422570
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov ebx, eax
push 0x3f0
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.wininit.ini
push esi
call sub.KERNEL32.dll_lstrcatA
push 4
push 0xc0000000
push esi
call fcn.0040583c
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x14], ebp
je 0x405a1e
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea eax, [edi + ebx + 0xa]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x405a17
lea eax, [esp + 0x18]
push 0
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405a17
cmp edi, dword [esp + 0x18]
jne 0x405a17
push str._Rename__r_n
push esi
call fcn.004057b1
test eax, eax
jne 0x405a2b
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call fcn.00405b66
add edi, 0xa
mov eax, edi
push ebx
add eax, esi
push 0x422570
push eax
call fcn.004057fd
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x18]
push 0
add edi, ebx
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [0x4247f0]
pop edi
pop esi
pop ebp
pop ebx
ret 8
add eax, 0xa
push 0x409320
push eax
call fcn.004057b1
test eax, eax
je 0x4059e2
inc eax
lea ecx, [esi + edi]
cmp eax, ecx
mov ebp, eax
jae 0x405a52
mov dl, byte [ebp]
mov byte [ebx + ebp], dl
inc ebp
cmp ebp, ecx
jb 0x405a47
mov ebp, dword [esp + 0x14]
sub eax, esi
jmp 0x4059e4
Function at 0x405a5a
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
lea eax, [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x14]
xor ebx, ebx
push eax
push 0x20019
push ebx
push dword [ebp + 0xc]
mov byte [esi], bl
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405abe
lea eax, [ebp + 8]
mov dword [ebp + 8], 0x400
push eax
lea eax, [ebp + 0x14]
push esi
push eax
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405aad
cmp dword [ebp + 0x14], 1
je 0x405aaf
cmp dword [ebp + 0x14], 2
je 0x405aaf
mov byte [esi], bl
push dword [ebp + 0xc]
mov byte [esi + 0x3ff], bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
pop ebp
ret 0x10
Function at 0x405b88
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
test ebx, ebx
jge 0x405ba9
mov ecx, dword [0x423f3c]
lea eax, [ebx*4 + 4]
sub ecx, eax
mov ebx, dword [ecx]
mov eax, dword [0x424798]
mov ecx, dword [ebp + 8]
add ebx, eax
mov eax, 0x423700
sub ecx, eax
mov edi, eax
cmp ecx, 0x800
jae 0x405d7c
mov edi, dword [ebp + 8]
and dword [ebp + 8], 0
jmp 0x405d7c
mov edx, edi
sub edx, eax
cmp edx, 0x400
jge 0x405d89
inc ebx
cmp cl, 0xfc
jbe 0x405d6f
movsx eax, byte [ebx + 1]
movsx ecx, byte [ebx]
mov esi, eax
mov edx, ecx
and esi, 0x7f
and edx, 0x7f
shl esi, 7
or esi, edx
mov edx, 0x8000
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x10], eax
or ecx, edx
or eax, edx
inc ebx
mov dword [ebp - 0x14], ecx
inc ebx
cmp byte [ebp + 0xf], 0xfe
mov dword [ebp - 0xc], eax
jne 0x405d1a
and dword [ebp + 0xc], 0
and byte [edi], 0
push 4
pop esi
cmp dword [ebp - 0x10], esi
jne 0x405c3d
mov dword [ebp + 0xc], str.MicrosoftInternet_ExplorerQuick_Launch
jmp 0x405cb5
mov eax, dword [ebp - 0x18]
cmp eax, 0x2b
jne 0x405c5c
push edi
push str.CommonFilesDir
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00405a5a
jmp 0x405cb0
cmp eax, 0x26
jne 0x405c8c
push edi
push str.ProgramFilesDir
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00405a5a
cmp byte [edi], 0
jne 0x405d12
push str.C:Program_Files
push edi
call fcn.00405b66
jmp 0x405cb0
cmp eax, 0x25
jne 0x405c9f
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x405cb0
cmp eax, 0x24
jne 0x405cb5
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp byte [edi], 0
jne 0x405d12
cmp dword [0x4247e4], 0
jne 0x405cc1
push 2
pop esi
lea eax, [ebp - 4]
dec esi
push eax
push dword [ebp + esi*4 - 0x18]
push dword [0x424764]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x405cf7
push edi
push dword [ebp - 4]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
push dword [ebp - 4]
mov dword [ebp - 8], eax
call fcn.004053b3
cmp dword [ebp - 8], 0
jne 0x405cfe
jmp 0x405cfa
and byte [edi], 0
test esi, esi
jne 0x405cc1
cmp byte [edi], 0
je 0x405d12
cmp dword [ebp + 0xc], 0
je 0x405d12
push dword [ebp + 0xc]
push edi
call sub.KERNEL32.dll_lstrcatA
push edi
call fcn.00405da2
jmp 0x405d60
cmp byte [ebp + 0xf], 0xfd
jne 0x405d4e
cmp esi, 0x1b
jne 0x405d33
push dword [0x424764]
push edi
call fcn.00405ac4
jmp 0x405d44
mov eax, esi
shl eax, 0xa
add eax, section..ndata
push eax
push edi
call fcn.00405b66
add esi, 0xffffffeb
cmp esi, 6
jae 0x405d60
jmp 0x405d12
cmp byte [ebp + 0xf], 0xff
jne 0x405d60
or eax, 0xffffffff
sub eax, esi
push eax
push edi
call fcn.00405b88
push edi
call sub.KERNEL32.dll_lstrlenA
add edi, eax
mov eax, 0x423700
jmp 0x405d7c
jne 0x405d79
mov cl, byte [ebx]
mov byte [edi], cl
inc edi
inc ebx
jmp 0x405d7c
mov byte [edi], cl
inc edi
mov cl, byte [ebx]
test cl, cl
mov byte [ebp + 0xf], cl
jne 0x405bd4
and byte [edi], 0
cmp dword [ebp + 8], 0
pop edi
pop esi
pop ebx
je 0x405d9e
push eax
push dword [ebp + 8]
call fcn.00405b66
leave
ret 8
Function at 0x405ed6
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x4232fc], 0
push esi
jne 0x405f0d
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x405ee7
mov dword [ecx*4 + 0x4232f8], eax
inc ecx
cmp ecx, 0x100
jl 0x405ee2
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x405f3e
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x4232f8]
xor eax, esi
inc ecx
dec edx
jne 0x405f20
pop edi
not eax
pop esi
ret 0xc
Function at 0x401030
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xc
lea eax, [esp]
mov dword [esp + 4], 0x100
push eax
push 0x20019
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionApp_PathseTurbo.exe
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401093
mov edx, dword [esp + 0x10]
lea ecx, [esp + 4]
push ecx
mov ecx, dword [esp + 4]
lea eax, [esp + 0xc]
push edx
push eax
push 0
push str.Path
push ecx
mov dword [esp + 0x20], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x401093
mov edx, dword [esp]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esp, 0xc
ret

Function at 0x4010a0
Capabilities:
Persist via run registry key
Query or enumerate registry value

Disassembly:
sub esp, 0x120
lea eax, [esp]
mov dword [esp + 8], 0x100
push eax
push 0x20019
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionExplorerShell_Folders
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4011d4
push ebx
mov ebx, dword [esp + 0x128]
push esi
lea ecx, [esp + 0x10]
push edi
push ecx
lea edx, [esp + 0x14]
push ebx
push edx
push eax
mov eax, dword [esp + 0x1c]
mov esi, 1
push str.Common_Startup
push eax
mov dword [esp + 0x28], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4011c6
cmp dword [esp + 0x134], esi
jne 0x4011c6
lea edi, [ebx + 0xb]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x18]
mov byte [esp + 0x21], 0
push ecx
call fcn.00402680
lea edx, [esp + 0x1c]
push str.all_users
push edx
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 0xc
test eax, eax
jne 0x4011c6
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x2c]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x36]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebx + 0x14]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebx
add esp, 0x120
ret
Function at 0x4011e0
Capabilities:
Persist via run registry key
Query or enumerate registry value

Disassembly:
sub esp, 0xc
lea eax, [esp]
mov dword [esp + 4], 0x100
push eax
push 0x20019
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionExplorerShell_Folders
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40123f
mov edx, dword [esp + 0x10]
lea ecx, [esp + 4]
push ecx
mov ecx, dword [esp + 4]
lea eax, [esp + 0xc]
push edx
push eax
push 0
push str.Common_Desktop
push ecx
mov dword [esp + 0x20], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esp, 0xc
ret

Function at 0x401250
Capabilities:
Get installed programs
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
sub esp, 0x10c
push ebp
push esi
push edi
mov edi, str.SOFTWAREMicrosoftWindowsCurrentVersionUninstall
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x18]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov ebp, 0x100
and ecx, 3
mov dword [esp + 0xc], ebp
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
push ecx
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x401385
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x14]
push ebx
lea ecx, [esp + 0x1c]
xor esi, esi
push eax
push ecx
push esi
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x401379
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ebx, dword [sym.imp.MSVCRT.dll__mbscmp]
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x14]
lea ecx, [esp + 0x1c]
push eax
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x401321
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x1c]
push eax
push ecx
push 0
push 0
push str.DisplayName
push edx
mov dword [esp + 0x28], ebp
call edi
lea eax, [esp + 0x1c]
push str.eTurboWare
push eax
mov byte [esp + 0x2e], 0
call ebx
add esp, 8
test eax, eax
je 0x40134d
mov ecx, dword [esp + 0x14]
inc esi
push ecx
mov dword [esp + 0x14], ebp
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push edx
push eax
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
je 0x4012d2
jmp 0x401379
mov eax, dword [esp + 0x120]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x10]
mov dword [esp + 0x10], ebp
push edx
push eax
push 0
push 0
push str.UninstallString
push ecx
call edi
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x10c
ret
Function at 0x401390
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
sub esp, 0x20c
push ebx
push ebp
push esi
push edi
mov byte [esp + 0x13], 0
call fcn.00401510
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
lea eax, [esp + 0x14]
push eax
push str.SYSTEM
push 0x80000002
call ebp
test eax, eax
jne 0x4014f6
mov edx, dword [esp + 0x14]
mov ecx, 0x40
lea edi, [esp + 0x11c]
xor ebx, ebx
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x11c]
push 0x100
push ecx
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x4014f6
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
mov edi, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov al, byte [esp + 0x13]
test al, al
jne 0x4014f6
lea eax, [esp + 0x11c]
push str.CurrentControlSet
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
jne 0x40142b
mov byte [esp + 0x13], 1
lea ecx, [esp + 0x11c]
lea edx, [esp + 0x1c]
push ecx
push str._sControlCriticalDeviceDatabase_rootetouch
push edx
call esi
mov edx, dword [esp + 0x20]
add esp, 0xc
lea eax, [esp + 0x18]
lea ecx, [esp + 0x1c]
push eax
push ecx
push edx
call ebp
test eax, eax
jne 0x40146e
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x1c]
push ecx
push edx
call edi
lea eax, [esp + 0x11c]
lea ecx, [esp + 0x1c]
push eax
push str._sEnumUSBVid_1234Pid_5678
push ecx
call esi
mov eax, dword [esp + 0x20]
add esp, 0xc
lea edx, [esp + 0x1c]
push edx
push eax
call edi
lea ecx, [esp + 0x11c]
lea edx, [esp + 0x1c]
push ecx
push str._sControlClassff646f80_8def_11d2_9449_00105a075f6b
push edx
call esi
mov edx, dword [esp + 0x20]
add esp, 0xc
lea eax, [esp + 0x18]
lea ecx, [esp + 0x1c]
push eax
push ecx
push edx
call ebp
test eax, eax
jne 0x4014d4
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x1c]
push ecx
push edx
call edi
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x11c]
inc ebx
push 0x100
push eax
push ebx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
je 0x401400
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20c
ret
Function at 0x4017f0
Capabilities:
Delete file
Delete registry value
Get common file path
Query or enumerate registry value

Disassembly:
sub esp, 0x3a4
push ebx
push esi
push edi
lea eax, [esp + 0x2b0]
mov ebx, 0x100
push 0x32
push eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x2b0]
push ecx
lea edx, [esp + 0x1b4]
push str._s32driversUsbTouch.sys
push edx
call esi
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
add esp, 0xc
lea eax, [esp + 0x1b0]
push eax
call edi
lea ecx, [esp + 0x2b0]
lea edx, [esp + 0x1b0]
push ecx
push str._s32driversUsbTouch.inf
push edx
call esi
add esp, 0xc
lea eax, [esp + 0x1b0]
push eax
call edi
lea ecx, [esp + 0xc]
push ecx
push str.SoftwareMicrosoftWindowsCurrentVersionSetupSetupXINFOEM_Name
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x401937
lea edx, [esp + 0x10]
push ebp
lea eax, [esp + 0xb4]
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
xor esi, esi
push edx
push eax
mov eax, dword [esp + 0x18]
push esi
lea ecx, [esp + 0x24]
push esi
lea edx, [esp + 0x2c]
push ecx
push edx
push esi
push eax
call edi
test eax, eax
jne 0x40192b
mov ebp, dword [sym.imp.MSVCRT.dll__mbscmp]
lea ecx, [esp + 0xb4]
push ecx
call fcn.00402680
lea edx, [esp + 0xb8]
push str.usbtouch.inf
push edx
call ebp
add esp, 0xc
test eax, eax
je 0x401910
lea eax, [esp + 0x14]
lea ecx, [esp + 0xb4]
push eax
push ecx
mov ecx, dword [esp + 0x18]
push 0
lea edx, [esp + 0x24]
push 0
lea eax, [esp + 0x2c]
inc esi
push edx
push eax
push esi
push ecx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], ebx
call edi
test eax, eax
je 0x4018bb
jmp 0x40192b
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x1c]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x3a4
ret
Function at 0x401ce0
Capabilities:
Shutdown system

Disassembly:
sub esp, 0x14
lea eax, [esp]
push esi
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x401d01
pop esi
add esp, 0x14
ret
lea ecx, [esp + 0xc]
push ecx
push str.SeShutdownPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov eax, dword [esp + 4]
mov esi, dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 0
push 0
lea edx, [esp + 0x10]
push 0
push edx
push 0
push eax
mov dword [esp + 0x20], 1
mov dword [esp + 0x2c], 2
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x401d4e
xor eax, eax
pop esi
add esp, 0x14
ret
mov ecx, dword [esp + 0x1c]
push 1
push 0
push 5
push ecx
push 0
call dword [sym.imp.ADVAPI32.dll_InitiateSystemShutdownA]
test eax, eax
jne 0x401d6a
pop esi
add esp, 0x14
ret
mov eax, dword [esp + 4]
push 0
push 0
lea edx, [esp + 0x10]
push 0
push edx
push 0
push eax
mov dword [esp + 0x2c], 0
call esi
mov eax, 1
pop esi
add esp, 0x14
ret