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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push edi
mov edi, ecx
lea ecx, [ebp - 4]
push ecx
lea eax, [edi + 0xa6a0]
and word [eax], 0
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0x407980
push dword [ebp + 8]
xor ebx, ebx
inc ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], 0x20a
call esi
lea ecx, [ebp - 4]
push ecx
lea eax, [edi + 0xa8aa]
and word [eax], 0
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0x40799c
push dword [ebp + 8]
mov dword [ebp - 8], ebx
mov dword [ebp - 4], 0x20a
call esi
lea ecx, [ebp - 4]
push ecx
lea eax, [edi + 0xaab4]
and word [eax], 0
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0x4079bc
push dword [ebp + 8]
mov dword [ebp - 8], ebx
mov dword [ebp - 4], 0x20a
call esi
lea ecx, [ebp - 4]
push ecx
lea eax, [edi + 0xacbe]
and word [eax], 0
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0x4079ec
push dword [ebp + 8]
mov dword [ebp - 8], ebx
mov dword [ebp - 4], 0x20a
call esi
push 4
pop eax
mov dword [ebp - 8], eax
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
add edi, 0xaec8
push edi
lea eax, [ebp - 8]
push eax
push 0
push 0x407a1c
push dword [ebp + 8]
mov dword [edi], 0x110000
call esi
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 4

Function at 0x40b67a
Capabilities:
Delete registry value
Set registry value

Disassembly:
push ebx
push ebp
mov ebp, ecx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea ebx, [ebp + 0xa6a0]
cmp word [ebx], 0
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
je 0x40b6b3
push ebx
call edi
lea eax, [eax + eax + 2]
push eax
push ebx
mov ebx, dword [esp + 0x1c]
push 1
push 0
push 0x407980
push ebx
call esi
jmp 0x40b6c3
mov ebx, dword [esp + 0x14]
push 0x407980
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
lea eax, [ebp + 0xa8aa]
cmp word [eax], 0
je 0x40b6ec
push eax
call edi
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp + 0xa8aa]
push eax
push 1
push 0
push 0x40799c
push ebx
call esi
jmp 0x40b6f8
push 0x40799c
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
lea eax, [ebp + 0xaab4]
cmp word [eax], 0
je 0x40b721
push eax
call edi
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp + 0xaab4]
push eax
push 1
push 0
push 0x4079bc
push ebx
call esi
jmp 0x40b72d
push 0x4079bc
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
lea eax, [ebp + 0xacbe]
cmp word [eax], 0
je 0x40b756
push eax
call edi
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp + 0xacbe]
push eax
push 1
push 0
push 0x4079ec
push ebx
call esi
jmp 0x40b762
push 0x4079ec
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
add ebp, 0xaec8
cmp dword [ebp], 0x110000
je 0x40b782
push 4
push ebp
push 4
push 0
push 0x407a1c
push ebx
call esi
jmp 0x40b78e
push 0x407a1c
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
pop edi
pop esi
xor eax, eax
pop ebp
inc eax
pop ebx
ret 4
Function at 0x40bb33
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 0x14], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, ecx
je 0x40bb50
push dword [ebp + 0x18]
push ebx
push dword [ebp + 8]
push dword [ebp + 0x10]
call dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x40bb6a
mov dword [ebp + 0x14], 1
jmp 0x40bc5e
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40bb85
test al, 1
je 0x40bb85
and eax, 0xfffffffe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push edi
push 0
push ebx
push dword [ebp + 8]
call dword [esi + 0xa68c]
test eax, eax
mov edi, dword [sym.imp.USER32.dll_wsprintfW]
mov dword [ebp + 0x14], eax
jne 0x40bc2d
push 0
push 0x105
lea eax, [esi + 0xb2e0]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
lea eax, [esi + 0xb2e0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
push dword [ebp + 8]
lea eax, [esi + eax*2 + 0xb2e0]
push 0x404594
push eax
call edi
add esp, 0x10
push 0x42015
lea eax, [esi + 0xb2e0]
push eax
push dword [esi + 0xa27c]
mov ecx, esi
call fcn.00409c8a
cmp eax, 2
push 0
je 0x40bc20
push ebx
push dword [ebp + 8]
call dword [esi + 0xa68c]
test eax, eax
mov dword [ebp + 0x14], eax
je 0x40bba3
jmp 0x40bc27
mov ecx, esi
call fcn.0040a31d
cmp dword [ebp + 0x14], 0
je 0x40bc5d
push ebx
push dword [ebp + 8]
add esi, 0xb2e0
push 0x40455c
push esi
call edi
add esp, 0x10
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40bc5d
test al, 1
je 0x40bc5d
and eax, 0xfffffffe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
pop edi
mov eax, dword [ebp + 0x14]
pop esi
pop ebx
pop ebp
ret 0x14

Function at 0x40bca2
Capabilities:
Create directory

Disassembly:
push ebx
mov eax, ecx
mov edx, dword [eax + 0x9a3c]
push ebp
push esi
push edi
lea ebx, [eax + 0xaecc]
mov ecx, edx
lea esi, [eax + 0x9830]
mov edi, ebx
rep movsw word es:[edi], word [esi]
cmp word [eax + edx*2 + 0xaeca], 0x5c
je 0x40bcd7
mov word [eax + edx*2 + 0xaecc], 0x5c
inc edx
mov ecx, dword [esp + 0x14]
and word [eax + edx*2 + 0xaecc], 0
imul ecx, ecx, 0x20a
lea edi, [eax + 0xb0d6]
push 0x104
lea eax, [ecx + eax + 0x480c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
mov esi, 0x403ed0
push esi
push edi
mov edi, dword [sym.imp.msvcrt.dll_wcstok]
call edi
push esi
push 0
mov dword [esp + 0x24], eax
call edi
add esp, 0x10
jmp 0x40bd6a
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, 0x104
sub ecx, eax
push ecx
push dword [esp + 0x18]
push ebx
call dword [sym.imp.msvcrt.dll_wcsncat]
add esp, 0xc
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, 0x104
sub ecx, eax
push ecx
push esi
push ebx
call dword [sym.imp.msvcrt.dll_wcsncat]
push esi
push 0
mov dword [esp + 0x28], ebp
call edi
add esp, 0x14
mov ebp, eax
test ebp, ebp
jne 0x40bd21
pop edi
pop esi
pop ebp
pop ebx
ret 4
Function at 0x40c297
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
push ebx
mov ebx, ecx
test byte [ebx + 0x18], 8
jne 0x40c2bc
mov eax, dword [ebp + 8]
test byte [ebx + eax*4 + 0x8538], 0x10
jne 0x40c2da
jmp 0x40c45a
test byte [ebx + 0x982c], 1
jne 0x40c45a
mov eax, dword [ebp + 8]
test byte [ebx + eax*4 + 0x8538], 8
je 0x40c45a
cmp eax, dword [ebx + 0x4808]
jae 0x40c45a
mov ecx, dword [ebx + 0x9a3c]
imul eax, eax, 0x20a
push esi
push edi
mov dword [ebp + 8], ecx
lea esi, [ebx + 0x9830]
lea edi, [ebx + 0xaecc]
rep movsw word es:[edi], word [esi]
lea esi, [eax + ebx + 0x480c]
push esi
mov dword [ebp - 0xc], esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 4], eax
lea ecx, [eax + eax + 2]
mov eax, dword [ebp + 8]
lea edi, [ebx + eax*2 + 0xaecc]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebx + 0xaecc]
push edi
call dword [ebx + 0xa694]
push edi
mov esi, eax
lea eax, [ebx + 0xb0d6]
push 0x4045e4
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
test esi, esi
je 0x40c373
cmp dword [ebp + 0x10], 0
je 0x40c373
xor esi, esi
inc esi
push esi
push edi
push dword [ebp + 0xc]
call dword [ebp + 0x10]
mov dword [ebp - 8], esi
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 4]
add eax, ecx
lea esi, [ebx + eax*2 + 0xaeca]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov word [esi], 0x5f
call edi
lea eax, [ebx + 0xaecc]
push eax
mov word [esi], 0x58
call edi
mov eax, dword [ebx + 0x9a3c]
mov ecx, eax
lea esi, [ebx + 0x9830]
lea edi, [ebx + 0xaecc]
rep movsw word es:[edi], word [esi]
mov esi, dword [ebp - 0xc]
push esi
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax + eax + 2]
mov edx, ecx
shr ecx, 2
lea eax, [ebx + 0xb0d6]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
mov ecx, ebx
call fcn.0040a57f
lea esi, [ebx + 0xb0d6]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 4], eax
lea ecx, [eax + eax + 2]
mov eax, dword [ebp + 8]
lea edi, [ebx + eax*2 + 0xaecc]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea esi, [ebx + 0xaecc]
push esi
call dword [ebx + 0xa694]
cmp dword [ebp + 0x10], 0
je 0x40c433
xor eax, eax
cmp dword [ebp - 8], eax
sete al
push eax
push esi
push dword [ebp + 0xc]
call dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 4]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
add eax, ecx
lea ebx, [ebx + eax*2 + 0xaeca]
push esi
mov word [ebx], 0x5f
call edi
push esi
mov word [ebx], 0x58
call edi
pop edi
pop esi
xor eax, eax
inc eax
pop ebx
leave
ret 0xc
Function at 0x40cb24
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
mov esi, ecx
test byte [esi + 0x18], 8
je 0x40cbc1
mov eax, dword [esi + 8]
push ebx
push 0xa
push 0x1100
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
je 0x40cbc0
mov eax, dword [esi + 8]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
mov dword [ebp - 4], eax
je 0x40cbc0
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x40cbbf
mov esi, dword [esi + 8]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push 0xc
xor edx, edx
pop ecx
div ecx
mov esi, eax
imul esi, esi, 0xc
add esi, edi
jmp 0x40cbb2
push 0
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push dword [edi]
call sub.IMM32.dll_ImmGetHotKey
cmp eax, 1
je 0x40cbaf
push 0
push dword [edi + 8]
push dword [edi + 4]
push dword [edi]
call sub.IMM32.dll_ImmSetHotKey
add edi, 0xc
cmp edi, esi
jb 0x40cb8a
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
pop ebx
xor eax, eax
inc eax
pop esi
leave
ret
Function at 0x40cbc7
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push esi
mov esi, ecx
test byte [esi + 0x18], 8
jne 0x40cbde
xor eax, eax
inc eax
jmp 0x40cd80
push ebx
push edi
push 0x104
push 0x403b80
lea edi, [esi + 0xaecc]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push edi
call ebx
mov word [esi + eax*2 + 0xaecc], 0x5c
inc eax
mov ecx, 0x105
sub ecx, eax
push ecx
lea eax, [esi + eax*2 + 0xaecc]
push eax
push 0x13c8
push dword [esi + 8]
call dword [sym.imp.USER32.dll_LoadStringW]
lea ecx, [ebp - 0x18]
push ecx
xor eax, eax
lea ecx, [ebp - 4]
push ecx
push eax
push 0xf003f
push eax
push eax
push eax
push edi
push 0x80000002
mov dword [ebp - 4], eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
mov dword [ebp - 0x14], eax
je 0x40cc63
push 0x1128
mov ecx, esi
call fcn.0040a31d
jmp 0x40cd67
mov ecx, dword [esi + 4]
mov eax, dword [ecx]
mov edi, ecx
call dword [eax + 0x34]
lea eax, [eax + eax + 2]
push eax
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x30]
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push eax
push 1
push 0
push 0x403be4
push dword [ebp - 4]
call edi
cmp dword [0x4177cc], 2
jne 0x40cd23
push 0x403c3c
call ebx
lea eax, [eax + eax + 2]
push eax
push 0x403c3c
xor ebx, ebx
inc ebx
push ebx
push 0
push 0x403c10
push dword [ebp - 4]
call edi
cmp dword [esi + 0xa66c], 0
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], 0x104
mov ebx, 0x403c68
jne 0x40cd05
lea eax, [ebp - 8]
push eax
lea eax, [esi + 0xaecc]
push eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0xc]
push eax
push 0
push ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40cd05
mov esi, dword [esi + 4]
push dword [ebp - 0x10]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x20]
jmp 0x40cd67
mov ecx, dword [esi + 4]
mov eax, dword [ecx]
mov esi, ecx
call dword [eax + 0x24]
lea eax, [eax + eax + 2]
push eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x1c]
push eax
push 1
push 0
push ebx
jmp 0x40cd62
push 0x403c28
call ebx
lea eax, [eax + eax + 2]
push eax
push 0x403c28
push 1
push 0
push 0x403bf8
push dword [ebp - 4]
call edi
mov ecx, dword [esi + 4]
mov eax, dword [ecx]
mov esi, ecx
call dword [eax + 0x24]
lea eax, [eax + eax + 2]
push eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x1c]
push eax
push 1
push 0
push 0x403c50
push dword [ebp - 4]
call edi
cmp dword [ebp - 4], 0
pop edi
pop ebx
je 0x40cd78
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
cmp dword [ebp - 0x14], eax
sete al
pop esi
leave
ret
Function at 0x40cd83
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
push edi
push dword [ebp + 8]
mov edi, ecx
lea ebx, [edi + 0xb8fe]
push 0x403280
push ebx
call esi
push dword [ebp + 0xc]
add edi, 0xb906
push 0x404290
push edi
call esi
add esp, 0x18
cmp dword [0x4177cc], 2
jne 0x40cddc
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push edi
push 1
push 0
push ebx
push dword [ebp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
jmp 0x40ce28
lea eax, [ebp + 0x10]
push eax
xor esi, esi
lea eax, [ebp + 8]
push eax
push esi
push 0xf003f
push esi
push esi
push esi
push ebx
push dword [ebp + 0x10]
mov dword [ebp + 8], esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x40ce1a
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push edi
push 1
push esi
push esi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp dword [ebp + 8], esi
je 0x40ce28
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebx
pop ebp
ret 0xc

Function at 0x40ce60
Capabilities:
Identify system language via api

Disassembly:
push esi
mov esi, ecx
test byte [esi + 0xa668], 2
jne 0x40ce7b
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
cmp ax, word [esi + 0xa670]
je 0x40ce7f
xor eax, eax
jmp 0x40ce9e
test word [esi + 0x18], 0x400
push edi
mov edi, dword [esp + 0xc]
je 0x40cea2
xor eax, eax
mov ecx, dword [edi]
push edi
push dword [esi + 0xa670]
push eax
call fcn.0041465a
pop edi
pop esi
ret 4
mov ecx, dword [esi + 4]
push dword [esi + 0xa670]
mov eax, dword [ecx]
call dword [eax + 0x50]
mov ecx, dword [edi]
and eax, 0xe
push eax
call fcn.00414608
cmp eax, 0xffffffff
jne 0x40ce8e
xor eax, eax
jmp 0x40ce9d
Function at 0x40cec4
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
mov eax, 0x415018
call fcn.00414de8
sub esp, 0x1c
mov eax, dword [ebp + 0xc]
push ebx
push esi
xor ebx, ebx
push edi
mov esi, ecx
mov dword [eax], ebx
mov dword [ebp - 0x18], ebx
cmp dword [0x4177cc], 2
mov dword [ebp - 0x1c], 1
lea edi, [esi + 0xb8fe]
jne 0x40cf2c
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0xb906]
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
lea eax, [ebp - 0x20]
push eax
push edi
push dword [ebp - 0x18]
mov dword [ebp - 0x20], 8
push dword [ebp + 8]
mov dword [ebp - 0x10], 0x18
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov dword [ebp - 0x10], eax
cmp eax, ebx
jmp 0x40cfa6
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x24]
push eax
push edi
push dword [ebp - 0x18]
mov dword [ebp - 0x24], 8
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
cmp eax, ebx
mov dword [ebp - 0x10], eax
jne 0x40cfdd
lea eax, [ebp - 0x14]
push eax
push 0x20019
push ebx
push edi
push dword [ebp + 8]
mov dword [ebp - 0x14], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
mov dword [ebp - 0x10], eax
jne 0x40cf95
lea eax, [ebp - 0x28]
push eax
lea eax, [esi + 0xb906]
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
push ebx
push dword [ebp - 0x14]
mov dword [ebp - 0x28], 0x18
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x14], ebx
je 0x40cfa3
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x10], ebx
jne 0x40cfdd
cmp word [edi], bx
je 0x40cfd5
push 0x30
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov ecx, eax
mov dword [ebp - 0x20], ecx
cmp ecx, ebx
mov dword [ebp - 4], ebx
je 0x40cfd1
push dword [ebp + 0xc]
lea eax, [esi + 0xb906]
push eax
push edi
call fcn.004146f6
or dword [ebp - 4], 0xffffffff
inc dword [ebp - 0x18]
jmp 0x40cee0
mov ecx, dword [ebp - 0xc]
xor eax, eax
cmp dword [ebp - 0x10], 0x103
pop edi
pop esi
sete al
pop ebx
mov dword fs:[0], ecx
leave
ret 8

Function at 0x40d101
Capabilities:
Delete registry key

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
test byte [esi + 0x18], 8
jne 0x40d18b
test byte [esi + 0xa648], 4
jne 0x40d18b
cmp dword [esi + 0xa66c], 0
je 0x40d18b
cmp dword [0x4177cc], 2
je 0x40d132
call fcn.0040d0e1
test eax, eax
jne 0x40d18b
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
push 0xf003f
push 0
push 0x403b80
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40d17c
push edi
push dword [esi + 0xa66c]
lea edi, [esi + 0xaecc]
push 0x403a6c
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
pop edi
cmp dword [ebp - 4], 0
je 0x40d18b
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
pop esi
leave
ret
Function at 0x40d191
Capabilities:
Delete registry value
Set registry value

Disassembly:
push ecx
push ecx
push ebp
push esi
mov ebp, ecx
mov ecx, dword [esp + 0x18]
mov eax, dword [ebp + 8]
push 0x105
lea esi, [ebp + 0xb2e0]
push esi
add ecx, 0x1410
push ecx
push eax
mov dword [esp + 0x1c], esi
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
je 0x40d31b
test byte [ebp + 0xa648], 4
je 0x40d1d6
test byte [ebp + 0x982c], 1
je 0x40d1e6
push esi
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
jmp 0x40d318
push ebx
mov ebx, dword [ebp + 0x9c4c]
push edi
lea edi, [ebp + 0xaecc]
mov ecx, ebx
lea esi, [ebp + 0x9a40]
mov dword [esp + 0x10], edi
rep movsw word es:[edi], word [esi]
cmp word [ebp + ebx*2 + 0xaeca], 0x5c
je 0x40d219
mov word [ebp + ebx*2 + 0xaecc], 0x5c
inc ebx
mov ecx, dword [ebp + 4]
mov eax, dword [ecx]
call dword [eax + 0x40]
mov ecx, dword [ebp + 4]
mov esi, eax
mov eax, dword [ecx]
call dword [eax + 0x44]
add eax, eax
mov ecx, eax
shr ecx, 2
lea edi, [ebp + ebx*2 + 0xaecc]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 4]
mov eax, dword [ecx]
call dword [eax + 0x44]
add ebx, eax
mov eax, dword [ebp + 8]
mov ecx, 0x105
sub ecx, ebx
push ecx
lea ecx, [ebp + ebx*2 + 0xaecc]
push ecx
mov ecx, dword [esp + 0x28]
add ecx, 0x1420
push ecx
push eax
call dword [sym.imp.USER32.dll_LoadStringW]
add ebx, eax
test byte [ebp + 0x18], 0x80
je 0x40d2b6
mov word [ebp + ebx*2 + 0xaecc], 0x20
inc ebx
mov esi, 0x4041d0
mov word [ebp + ebx*2 + 0xaecc], 0x2f
push esi
inc ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax + eax + 2]
mov edx, ecx
shr ecx, 2
lea edi, [ebp + ebx*2 + 0xaecc]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add ebx, eax
test word [ebp + 0x18], 0x400
je 0x40d2fb
mov word [ebp + ebx*2 + 0xaecc], 0x20
inc ebx
mov esi, 0x404194
mov word [ebp + ebx*2 + 0xaecc], 0x2f
push esi
inc ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [eax + eax + 2]
mov edx, ecx
shr ecx, 2
lea edi, [ebp + ebx*2 + 0xaecc]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add ebx, eax
lea eax, [ebx + ebx + 2]
push eax
push dword [esp + 0x14]
push 1
push 0
push dword [esp + 0x24]
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
pop edi
pop ebx
xor eax, eax
inc eax
pop esi
pop ebp
pop ecx
pop ecx
ret 8
Function at 0x40d617
Capabilities:
Delete registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
xor esi, esi
cmp dword [0x4177cc], 2
mov ebx, ecx
mov dword [ebp - 4], esi
jne 0x40d64a
lea eax, [ebp - 4]
push eax
push 0xf003f
push esi
push 0x403e50
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
jmp 0x40d671
test byte [ebx + 0x18], 8
je 0x40d62e
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push esi
push 0xf003f
push esi
push esi
push esi
push 0x403e50
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp eax, esi
jne 0x40d722
cmp dword [0x4177cc], 2
jne 0x40d69b
mov ebx, dword [ebx + 4]
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x14]
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
jmp 0x40d722
test byte [ebx + 0x18], 8
je 0x40d682
test byte [ebx + 0x982c], 2
je 0x40d722
mov eax, dword [ebx + 0x9c4c]
push edi
lea edi, [ebx + 0xaecc]
mov dword [ebp - 8], edi
mov ecx, eax
lea esi, [ebx + 0x9a40]
rep movsw word es:[edi], word [esi]
cmp word [ebx + eax*2 + 0xaeca], 0x5c
pop edi
je 0x40d6dc
mov word [ebx + eax*2 + 0xaecc], 0x5c
inc eax
mov ecx, 0x104
sub ecx, eax
push ecx
push 0x403ed4
lea eax, [ebx + eax*2 + 0xaecc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
push dword [ebp - 8]
mov ebx, dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push dword [ebp - 8]
mov eax, dword [ebx]
push 1
push 0
mov ecx, ebx
call dword [eax + 0x14]
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
xor esi, esi
cmp dword [ebp - 4], esi
pop esi
pop ebx
je 0x40d732
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
leave
ret
Function at 0x40d737
Capabilities:
Shutdown system

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
test byte [ecx + 0xa648], 4
jne 0x40d74e
xor eax, eax
inc eax
jmp 0x40d83d
mov eax, dword [ecx + 0x18]
push ebx
xor ebx, ebx
inc ebx
test al, 8
je 0x40d765
test byte [ecx + 0x982c], bl
jne 0x40d83a
test al, 2
je 0x40d83a
test ax, 0x200
je 0x40d78a
push 0x42000
push 0x1161
push dword [ebp + 8]
call fcn.00409cf8
jmp 0x40d83a
test ax, 0x100
jne 0x40d7ab
push 0x42004
push 0x1160
push dword [ebp + 8]
call fcn.00409cf8
cmp eax, 6
jne 0x40d83a
push esi
push edi
lea eax, [ebp + 8]
push eax
xor edi, edi
push 0x28
mov dword [ebp + 8], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
cmp dword [ebp + 8], edi
mov esi, dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
je 0x40d812
lea eax, [ebp - 0xc]
push eax
push 0x404690
push edi
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov eax, dword [ebp - 0xc]
push 0x10
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x14], eax
pop eax
lea ecx, [ebp - 4]
push ecx
lea ecx, [ebp - 0x2c]
push ecx
push eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x1c]
push eax
push edi
push dword [ebp + 8]
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x10], 2
mov dword [ebp - 0x2c], ebx
call esi
push edi
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
cmp dword [ebp + 8], edi
je 0x40d838
push edi
push edi
push dword [ebp - 4]
lea eax, [ebp - 0x2c]
push eax
push edi
push dword [ebp + 8]
call esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 4

Function at 0x40e66c
Capabilities:
Delete registry key

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
xor ebx, ebx
cmp dword [esi + 0xa66c], ebx
je 0x40e6ed
push edi
lea eax, [ebp - 4]
push eax
push 0xf003f
push ebx
push 0x403b80
push 0x80000002
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40e6c5
push dword [esi + 0xa66c]
lea edi, [esi + 0xaecc]
push 0x403a6c
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
cmp dword [ebp - 4], ebx
je 0x40e6d3
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [esi + 0xa66c]
mov ecx, esi
mov dword [esi + 0xa66c], ebx
call fcn.0040cbc7
mov dword [esi + 0xa66c], edi
pop edi
xor eax, eax
pop esi
inc eax
pop ebx
leave
ret