joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404a3a
Capabilities:
Query environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x74
mov dword [ebp - 4], eax
push ebx
lea ecx, [eax + 8]
push edi
mov di, word [eax]
mov dword [ebp - 4], ecx
mov ax, word [ecx]
call fcn.0040bc38
test al, al
jne 0x404a5f
inc ecx
inc ecx
mov dword [ebp - 4], ecx
push 0x63
lea eax, [ebp - 0x74]
push eax
xor ebx, ebx
push str.DEBUGMDG
mov byte [ebp - 0x74], bl
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableA]
cmp byte [ebp - 0x74], 0x31
jne 0x404a82
mov byte [0x4acb90], 1
push esi
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
push dword [ebp - 4]
lea ecx, [ebp - 0x10]
mov dword [0x4acb94], eax
mov dword [ebp - 0xc], ebx
call fcn.004403c3
lea ecx, [ebp - 8]
call fcn.00435d62
push 1
push ebx
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x10]
mov ecx, 0x4acf10
call fcn.0043d5b3
push dword [ebp - 8]
lea ecx, [ebp - 0xc]
call fcn.00440487
mov eax, dword [ebp - 0xc]
lea ecx, [ebp - 8]
mov dword [ebp - 4], eax
call fcn.0043092f
lea ecx, [ebp - 0x10]
call fcn.0043092f
mov ecx, dword [ebp - 4]
call fcn.004032c5
push 0x1e
push eax
push str._InstallService
mov dword [ebp - 4], eax
mov esi, eax
call fcn.0047fec0
add esp, 0xc
test eax, eax
jne 0x404b30
movzx esi, word [esi + 0x1e]
mov eax, esi
call fcn.0040bc38
test al, al
jne 0x404b0e
cmp si, bx
jne 0x404b30
push 0x1e
push 0x494f88
push dword [ebp - 4]
call fcn.004102e0
mov ecx, dword [ebp - 4]
add esp, 0xc
add ecx, 0x1e
call fcn.004032c5
mov dword [ebp - 4], eax
jmp 0x404b47
push 8
lea eax, [ebp - 4]
push eax
push 0x494f7c
call fcn.00437ad0
add esp, 0xc
test al, al
je 0x404b8a
cmp di, 0x22
jne 0x404b80
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
mov edx, dword [ebp - 4]
lea ecx, [edx + eax*2 - 2]
cmp ecx, edx
jbe 0x404b80
mov ax, word [ecx]
call fcn.0040bc38
test al, al
je 0x404b73
dec ecx
dec ecx
cmp ecx, edx
ja 0x404b61
cmp ecx, edx
jbe 0x404b80
cmp word [ecx], 0x22
jne 0x404b80
mov word [ecx], bx
push dword [ebp - 4]
call fcn.0040baf4
jmp 0x404baa
push 0xe
lea eax, [ebp - 4]
push eax
push 0x494f6c
call fcn.00437ad0
add esp, 0xc
test al, al
pop esi
je 0x404bb2
push dword [ebp - 4]
call fcn.004056e7
pop ecx
push ebx
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
lea ecx, [ebp - 0xc]
call fcn.0043092f
pop edi
xor eax, eax
pop ebx
leave
ret

Function at 0x404bc0
Capabilities:
Terminate process

Disassembly:
push ebx
push esi
mov esi, eax
push 0
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
push dword [esi]
mov ebx, dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov dword [0x4acb98], 0
call ebx
and dword [esi], 0
test edi, edi
je 0x404bff
mov eax, dword [edi]
test eax, eax
je 0x404bff
push 0
push eax
call dword [sym.imp.KERNEL32.DLL_TerminateJobObject]
push dword [edi]
call ebx
and dword [edi], 0
cmp byte [esp + 0x10], 0
je 0x404c17
push 1
push 0
push str.shutdown__a
call fcn.0040348b
add esp, 0xc
push dword [0x4acbf0]
call fcn.0040340a
cmp byte [esp + 0x10], 0
pop ecx
je 0x404c43
push 3
pop esi
push 0
call dword [sym.imp.ADVAPI32.dll_AbortSystemShutdownW]
push 0x3e8
call dword [sym.imp.KERNEL32.DLL_Sleep]
dec esi
jne 0x404c2d
pop esi
pop ebx
ret
Function at 0x4054e4
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x824
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [0x4acb9c], eax
mov dword [ebp - 8], eax
lea eax, [ebp + 8]
push edi
push eax
mov dword [ebp - 0x10], 0x100
call fcn.00404579
pop ecx
mov ecx, dword [ebp + 8]
mov esi, ecx
sub esi, dword [ebp - 8]
mov eax, 0x400
sar esi, 1
cmp esi, eax
jle 0x405521
mov esi, eax
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0xc], ecx
call fcn.00430961
push 6
push dword [ebp - 0xc]
push str.__gui_
call fcn.00431867
mov edi, dword [sym.imp.KERNEL32.DLL_lstrlenW]
add esp, 0x10
xor ebx, ebx
test al, al
je 0x405578
mov eax, dword [ebp - 0xc]
add eax, 0xc
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
mov dword [ebp - 0x10], ebx
call fcn.00430961
pop ecx
push dword [ebp + 8]
call edi
inc eax
add eax, eax
push eax
push dword [ebp + 8]
push dword [ebp - 0xc]
call fcn.00410296
add esp, 0xc
add esi, esi
push esi
push dword [ebp - 8]
lea eax, [ebp - 0x824]
push eax
call fcn.004102e0
add esp, 0xc
push dword [ebp - 8]
mov word [ebp + esi - 0x824], bx
mov byte [0x4b0003], bl
call edi
mov esi, eax
inc esi
lea eax, [esi + 0x226]
push eax
lea ecx, [ebp - 4]
call fcn.00435d80
mov eax, dword [ebp - 4]
push 0x1cc
add eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
mov ecx, eax
cmp ecx, ebx
jle 0x4056da
mov eax, dword [ebp - 4]
mov word [eax + ecx*2 + 2], bx
mov eax, dword [ebp - 4]
lea edi, [eax + ecx*2 + 2]
mov dword [ebp + 8], edi
lea edx, [eax + 2]
xor edi, edi
mov word [eax], 0x22
jmp 0x4055fe
mov ax, word [edx]
call fcn.0040bc38
test al, al
je 0x4055fc
xor edi, edi
inc edi
inc edx
inc edx
cmp edx, dword [ebp + 8]
jb 0x4055ed
cmp di, bx
mov edx, dword [ebp - 4]
lea eax, [edx + 2]
mov dword [ebp + 8], eax
je 0x40561f
dec eax
dec eax
mov word [edx + ecx*2 + 2], 0x22
inc ecx
mov dword [ebp + 8], eax
inc ecx
push 0x1e
lea edi, [eax + ecx*2]
push 0x495120
push edi
call fcn.004102e0
push esi
push dword [ebp - 8]
add edi, 0x1e
push edi
call fcn.00404561
add esp, 0x18
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
cmp edi, ebx
je 0x4056cc
mov eax, dword [ebp - 0x10]
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp + 8]
or eax, 0x10
push ebx
push 2
push eax
push 0xf01ff
lea eax, [ebp - 0x824]
push eax
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
cmp eax, ebx
je 0x4056cc
push eax
call esi
push 0x20000000
lea eax, [ebp - 0x824]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x4056c5
push ebx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x4056b3
push 0x495114
jmp 0x4056b8
push 0x495108
call fcn.00403504
pop ecx
push dword [ebp + 8]
call esi
jmp 0x4056d7
push 0x4950fc
jmp 0x4056d1
push 0x4950f0
call fcn.00403504
pop ecx
push edi
call esi
lea ecx, [ebp - 4]
call fcn.0043092f
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4056e7
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x824
push ebx
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push edi
mov edx, esi
xor ebx, ebx
jmp 0x405709
call fcn.0040bc38
test al, al
jne 0x405711
inc esi
inc esi
mov ax, word [esi]
cmp ax, bx
jne 0x4056fe
mov eax, esi
sub eax, edx
sar eax, 1
mov ecx, 0x400
cmp eax, ecx
jle 0x405722
mov eax, ecx
lea edi, [eax + eax]
push edi
push edx
lea eax, [ebp - 0x824]
push eax
call fcn.004102e0
add esp, 0xc
mov word [ebp + edi - 0x824], bx
jmp 0x405742
inc esi
inc esi
mov ax, word [esi]
call fcn.0040bc38
test al, al
jne 0x405740
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
cmp eax, ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 4], eax
je 0x4057d5
push 0x10020
lea ecx, [ebp - 0x824]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
mov dword [ebp + 8], eax
je 0x4057d5
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x40579e
push 0x495178
call fcn.00403504
pop ecx
mov esi, dword [sym.imp.KERNEL32.DLL_Sleep]
mov edi, 0xc8
push edi
call esi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x4057c0
push 0x49516c
jmp 0x4057c5
push 0x495160
call fcn.00403504
pop ecx
push dword [ebp + 8]
call ebx
push edi
call esi
jmp 0x4057f4
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x424
jne 0x4057e9
push 0x495154
jmp 0x4057ee
push 0x495148
call fcn.00403504
pop ecx
push dword [ebp - 4]
call ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4058e4
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7f8
push ebx
push esi
push edi
mov esi, 0x495184
lea edi, [ebp - 0x7f8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor eax, eax
mov ecx, 0x1f9
lea edi, [ebp - 0x7e6]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 8]
call fcn.004032c5
mov edx, eax
mov ecx, edx
call fcn.0040338c
mov esi, eax
sub esi, edx
sar esi, 1
mov eax, 0x3e8
cmp esi, eax
jl 0x405932
mov esi, eax
push esi
push edx
lea eax, [ebp - 0x7e8]
push eax
call fcn.00404561
add esp, 0xc
lea eax, [ebp - 0x7f8]
push eax
push 0x64
xor edi, edi
push edi
push 0x8000004
push edi
push 0xffffffffffffffff
mov word [ebp + esi*2 - 0x7e8], di
call dword [sym.imp.KERNEL32.DLL_CreateFileMappingW]
mov ebx, eax
cmp ebx, edi
je 0x4059a7
push edi
push edi
push edi
push 6
push ebx
call dword [sym.imp.KERNEL32.DLL_MapViewOfFile]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp esi, edi
je 0x4059a7
push 0x64
push edi
push esi
call fcn.004032d8
mov dword [esi], 0xffffffff
mov dword [esi + 8], edi
lea eax, [esi + 4]
add esp, 0xc
mov dword [0x4ab0d4], eax
mov dword [0x4acba0], esi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40bddc
Capabilities:
Check os version
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push 0x4acc40
mov dword [0x4acc40], 0x114
call dword [sym.imp.KERNEL32.DLL_GetVersionExW]
cmp dword [0x4acc44], 5
je 0x40be04
xor eax, eax
leave
ret
mov eax, dword [0x4acc48]
push ebx
push edi
xor edi, edi
sub eax, edi
je 0x40be1f
dec eax
jne 0x40bea0
mov ebx, 0x39000
jmp 0x40be24
mov ebx, 0x30000
push esi
push str.DevicePhysicalMemory
lea eax, [ebp - 8]
push eax
call dword [0x4acc0c]
lea eax, [ebp - 8]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
push eax
push 6
mov esi, 0x4acd60
push esi
mov dword [ebp - 0x20], 0x18
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], edi
call dword [0x4acc08]
cmp eax, 0xc0000022
jne 0x40be9b
lea eax, [ebp - 0x20]
push eax
push 0x60000
push esi
call dword [0x4acc08]
push dword [0x4acd60]
call fcn.0040bd0e
pop ecx
push dword [0x4acd60]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea eax, [ebp - 0x20]
push eax
push 6
push esi
call dword [0x4acc08]
cmp eax, edi
pop esi
jge 0x40bea4
xor eax, eax
jmp 0x40bec8
push 0x1000
push ebx
push edi
push 6
push dword [0x4acd60]
call dword [sym.imp.KERNEL32.DLL_MapViewOfFile]
mov dword [0x4acd5c], eax
neg eax
sbb eax, eax
and eax, dword [0x4acd60]
pop edi
pop ebx
leave
ret

Function at 0x40becc
Capabilities:
Read file via mapping

Disassembly:
mov ecx, dword [esp + 4]
push edi
mov edi, dword [esp + 0xc]
mov eax, edi
shr eax, 0x16
mov eax, dword [ecx + eax*4]
test al, 1
jne 0x40bee5
xor eax, eax
pop edi
ret
test al, al
push esi
jns 0x40bef8
mov esi, eax
xor esi, edi
and esi, 0x3fffff
xor esi, eax
jmp 0x40bf40
push 0x1000
and eax, 0xfffff000
push eax
push 0
push 4
push dword [0x4acd60]
call dword [sym.imp.KERNEL32.DLL_MapViewOfFile]
mov ecx, edi
shr ecx, 0xc
and ecx, 0x3ff
mov ecx, dword [eax + ecx*4]
test ecx, 1
jne 0x40bf2d
xor eax, eax
jmp 0x40bf42
mov esi, ecx
xor esi, edi
and esi, 0xfff
push eax
xor esi, ecx
call dword [sym.imp.KERNEL32.DLL_UnmapViewOfFile]
mov eax, esi
pop esi
pop edi
ret

Function at 0x40bf45
Capabilities:
Read file via mapping

Disassembly:
push esi
push dword [esp + 8]
push dword [0x4acd5c]
call fcn.0040becc
pop ecx
pop ecx
push 0x1000
mov esi, eax
and eax, 0xfffff000
push eax
push 0
push 6
push dword [0x4acd60]
call dword [sym.imp.KERNEL32.DLL_MapViewOfFile]
test eax, eax
jne 0x40bf7a
pop esi
ret
shr esi, 2
and esi, 0x3ff
mov esi, dword [eax + esi*4]
push eax
call dword [sym.imp.KERNEL32.DLL_UnmapViewOfFile]
mov eax, esi
pop esi
ret

Function at 0x40c00c
Capabilities:
Check mutex on windows

Disassembly:
push esi
push dword [esp + 8]
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateMutexA]
mov esi, eax
test esi, esi
je 0x40c02a
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
mov eax, esi
pop esi
ret
Function at 0x40cd6c
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push esi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
xor esi, esi
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 8]
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.DLL_GetDiskFreeSpaceExW]
cmp dword [ebp + 0x10], esi
je 0x40cda4
cdq
jmp 0x40cdb7
cmp dword [ebp + 0xc], esi
je 0x40cdb1
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
jmp 0x40cdb7
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
pop esi
leave
ret

Function at 0x40d358
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0x24
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.DLL_GetTickCount]
push esi
push edi
call ebp
mov esi, dword [esp + 0x38]
mov edi, eax
add edi, esi
xor ebx, ebx
cmp esi, 0x4e20
jb 0x40d380
push ebx
call fcn.00432240
pop ecx
cmp esi, ebx
mov esi, dword [esp + 0x3c]
jg 0x40d39f
cmp esi, ebx
jg 0x40d39f
push ebx
call dword [sym.imp.KERNEL32.DLL_Sleep]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret 8
call ebp
mov ecx, edi
sub ecx, eax
cmp ecx, ebx
jg 0x40d3ad
cmp esi, ebx
jle 0x40d393
cmp byte [0x4ab290], bl
jle 0x40d393
cmp ecx, ebx
jbe 0x40d422
cmp ecx, 0x7d0
jbe 0x40d3c8
mov ecx, 0x3e8
jmp 0x40d3d0
cmp ecx, 0x64
jbe 0x40d3d0
push 0x64
pop ecx
push 0x4bf
push ecx
push ebx
lea eax, [esp + 0x1c]
push eax
push ebx
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
jmp 0x40d422
cmp esi, ebx
jg 0x40d3f3
call ebp
mov ecx, edi
sub ecx, eax
test ecx, ecx
jle 0x40d42a
push 3
push ebx
push ebx
push ebx
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x40d42a
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
cmp esi, ebx
jle 0x40d422
dec esi
cmp byte [0x4ab290], bl
jg 0x40d3e5
xor esi, esi
jmp 0x40d39f
Function at 0x40d431
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 4], 0
push ebx
push esi
push edi
push 0x325
lea ecx, [ebp - 8]
call fcn.00435d80
mov esi, dword [ebp - 8]
push esi
push 0x324
call dword [sym.imp.KERNEL32.DLL_GetLogicalDriveStringsW]
mov ebx, dword [ebp + 8]
mov edi, dword [sym.imp.USER32.dll_CharUpperW]
push ebx
call edi
push esi
call edi
cmp word [esi], 0
je 0x40d4c5
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
add eax, 0x10
mov dword [ebp - 0xc], eax
push esi
call fcn.0040cdba
cmp eax, dword [ebp - 0xc]
pop ecx
jb 0x40d4b4
push esi
call dword [sym.imp.KERNEL32.DLL_GetDriveTypeW]
dec eax
dec eax
je 0x40d4ae
dec eax
jne 0x40d4b4
mov ax, word [esi]
mov word [edi + 2], ax
mov cx, word [esi]
xor eax, eax
inc eax
cmp cx, word [ebx]
mov dword [ebp - 4], eax
jb 0x40d4b4
mov esi, eax
jmp 0x40d4c8
mov ax, word [esi]
mov word [edi], ax
push esi
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
lea esi, [esi + eax*2 + 2]
cmp word [esi], 0
jne 0x40d47b
mov esi, dword [ebp - 4]
lea ecx, [ebp - 8]
call fcn.0043092f
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x40de52
Capabilities:
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x140
push ebx
push edi
xor edi, edi
push edi
push 0x80
push 3
push edi
push 1
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40de83
xor eax, eax
jmp 0x40def2
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_ReadFile]
push edi
lea eax, [ebp - 4]
push eax
push 0x40
lea eax, [ebp - 0x48]
push eax
push ebx
mov dword [ebp - 8], edi
call esi
cmp dword [ebp - 4], 0x40
jne 0x40dee7
cmp word [ebp - 0x48], 0x5a4d
jne 0x40dee7
push edi
push edi
push dword [ebp - 0xc]
push ebx
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
cmp eax, 0xffffffff
je 0x40dee7
push edi
lea eax, [ebp - 4]
push eax
mov edi, 0xf8
push edi
lea eax, [ebp - 0x140]
push eax
push ebx
call esi
cmp dword [ebp - 4], edi
jne 0x40dee7
cmp dword [ebp - 0x140], 0x4550
jne 0x40dee7
mov dword [ebp - 8], 1
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [ebp - 8]
pop esi
pop edi
pop ebx
leave
ret

Function at 0x40df1f
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push 0x20a
lea ecx, [ebp - 4]
call fcn.00435d80
mov eax, dword [ebp - 4]
mov word [eax], 0x20
mov eax, dword [ebp - 4]
and word [eax + 2], 0
mov eax, dword [ebp - 4]
push 0x208
add eax, 2
push eax
push str.SystemRoot
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableW]
push str.System32OnShutdown.wcs
lea ecx, [ebp - 4]
call fcn.00435dd0
mov al, byte [ebp + 0xc]
test al, 0x20
mov ebx, str.unknown
je 0x40df78
mov ebx, 0x495030
test al, 0x10
je 0x40df81
mov ebx, str.reboot
test al, 2
je 0x40df8a
mov ebx, str.logout
test al, 4
je 0x40df93
mov ebx, str.suspend
test al, 8
je 0x40df9c
mov ebx, str.hiber
test al, 0x40
je 0x40dfa5
mov ebx, str.poweroff
test al, al
jns 0x40dfae
mov ebx, str.lock
push ebx
lea ecx, [ebp - 4]
call fcn.00435dd0
mov esi, 0x4951ec
push esi
lea ecx, [ebp - 4]
call fcn.00435dd0
cmp dword [ebp + 8], 0
je 0x40dfd6
push dword [ebp + 8]
lea ecx, [ebp - 4]
call fcn.00435dd0
push dword [ebp - 4]
mov edi, 0x4acf10
mov ecx, edi
call fcn.00428650
push str._25INDATA
lea ecx, [ebp - 4]
call fcn.00440487
push ebx
lea ecx, [ebp - 4]
call fcn.00435dd0
push esi
lea ecx, [ebp - 4]
call fcn.00435dd0
cmp dword [ebp + 8], 0
je 0x40e015
push dword [ebp + 8]
lea ecx, [ebp - 4]
call fcn.00435dd0
test byte [ebp + 0xc], 0x70
je 0x40e025
push dword [ebp - 4]
mov ecx, edi
call fcn.00428650
lea ecx, [ebp - 4]
call fcn.0043092f
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40e0e4
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
push ebx
push esi
push edi
mov esi, 0x4961cc
lea edi, [ebp - 0x10]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
mov byte [ebp - 1], 0
mov byte [ebp - 2], 0
mov edi, 0x4acf10
movsx ax, byte [ebp - 2]
add eax, 0x41
mov word [ebp - 0x10], ax
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.DLL_GetDriveTypeW]
cmp eax, 5
jne 0x40e17e
movsx ebx, byte [ebp - 1]
lea eax, [ebp - 0x10]
push eax
push ebx
lea eax, [ebp - 0x218]
push str.HKLMSYSTEMCurrentControlSetControlSession_ManagerEnvironmentCDROM_u_s
push eax
call esi
add esp, 0x10
push 0
lea eax, [ebp - 0x218]
push eax
mov ecx, edi
call fcn.004509d7
lea eax, [ebp - 0x10]
push eax
push ebx
lea eax, [ebp - 0x218]
push str.CDROM_u
push eax
call esi
add esp, 0x10
inc byte [ebp - 1]
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x218]
push eax
mov ecx, edi
call fcn.00435749
inc byte [ebp - 2]
cmp byte [ebp - 2], 0x1a
jl 0x40e10e
cmp byte [ebp - 1], 0
pop edi
pop esi
pop ebx
jle 0x40e1a2
mov ecx, dword [ebp + 8]
xor eax, eax
push eax
push eax
push eax
push str.THREAD_Envi
call fcn.00426546
leave
ret

Function at 0x40e4fc
Capabilities:
Persist via run registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
add dword [ebp + 8], 2
push esi
push edi
lea ecx, [ebp - 8]
call fcn.00435d62
lea ecx, [ebp - 4]
call fcn.00435d62
push 0x2c
xor esi, esi
push esi
push dword [ebp + 8]
call dword [sym.imp.SHLWAPI.dll_StrRChrW]
mov edi, eax
cmp edi, esi
je 0x40e5de
push ebx
push 1
push esi
lea eax, [ebp - 8]
mov word [edi], si
push eax
push dword [ebp + 8]
mov esi, 0x4acf10
mov ecx, esi
call fcn.0043e7f3
mov ebx, dword [ebp - 8]
push 1
push 0
lea eax, [ebp - 4]
push eax
add edi, 2
push edi
mov ecx, esi
mov dword [ebp + 8], ebx
call fcn.0043e7f3
cmp byte [ebp + 0xc], 0
mov esi, dword [ebp - 4]
mov dword [ebp - 0xc], esi
je 0x40e595
lea ecx, [ebp + 8]
call fcn.0040bc51
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
shl eax, 1
push eax
push dword [ebp + 8]
push 1
push esi
push 0x495678
push 0x80000002
jmp 0x40e5d1
mov esi, dword [sym.imp.KERNEL32.DLL_lstrlenW]
push ebx
call esi
shl eax, 1
push eax
push ebx
push 1
push str.RegisteredOwner
mov edi, str.SOFTWAREMicrosoftWindows_NTCurrentVersion
push edi
mov ebx, 0x80000002
push ebx
call fcn.00431794
add esp, 0x18
push dword [ebp - 0xc]
call esi
shl eax, 1
push eax
push dword [ebp - 0xc]
push 1
push str.RegisteredOrganization
push edi
push ebx
call fcn.00431794
add esp, 0x18
xor esi, esi
pop ebx
jmp 0x40e5e1
xor esi, esi
inc esi
lea ecx, [ebp - 4]
call fcn.0043092f
lea ecx, [ebp - 8]
call fcn.0043092f
pop edi
mov eax, esi
pop esi
leave
ret
Function at 0x40eae8
Capabilities:
Encode data using xor

Disassembly:
push esi
push edi
mov edi, dword [esp + 0x10]
test edi, edi
jge 0x40eaf9
call fcn.0040ea8d
mov edi, eax
mov eax, dword [esp + 0x14]
test eax, eax
mov esi, dword [esp + 0xc]
jg 0x40eb0d
push esi
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
inc eax
dec eax
js 0x40eb19
inc eax
xor word [esi], di
inc esi
inc esi
dec eax
jne 0x40eb11
mov eax, edi
pop edi
shl eax, 0x10
pop esi
ret

Function at 0x40ece9
Capabilities:
Log keystrokes via application hook

Disassembly:
cmp dword [0x4acdf4], 0
jne 0x40ed0c
push 0
push dword [0x4ace04]
push 0x40ec31
push 0xd
call dword [sym.imp.USER32.dll_SetWindowsHookExW]
mov dword [0x4acdf4], eax
ret

Function at 0x40ed3d
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
push ebx
push esi
mov esi, dword [ebp + 8]
test esi, esi
push edi
jne 0x40ed58
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcessId]
mov esi, eax
push esi
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x22c], 0x22c
mov dword [ebp - 0x228], ebx
mov ecx, 0x89
lea edi, [ebp - 0x224]
push 2
rep stosd dword es:[edi], eax
call sub.KERNEL32.DLL_CreateToolhelp32Snapshot
mov edi, eax
lea eax, [ebp - 0x22c]
push eax
push edi
call sub.KERNEL32.DLL_Process32FirstW
jmp 0x40eda7
cmp dword [ebp - 0x224], esi
je 0x40edad
lea eax, [ebp - 0x22c]
push eax
push edi
call sub.KERNEL32.DLL_Process32NextW
test eax, eax
jne 0x40ed92
jmp 0x40edb3
mov ebx, dword [ebp - 0x214]
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
dec dword [ebp + 0xc]
cmp dword [ebp + 0xc], 0
mov esi, ebx
jg 0x40ed58
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret

Function at 0x40ef31
Capabilities:
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 0xc], 1
push edi
je 0x40ef55
cmp dword [ebp + 0xc], 2
jne 0x40ef84
mov edi, dword [ebp + 0x14]
push 0x104
push edi
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
jmp 0x40ef58
mov edi, dword [ebp + 0x10]
cmp dword [ebp + 0x18], 0
je 0x40ef68
push dword [ebp + 0x18]
push edi
call dword [sym.imp.KERNEL32.DLL_lstrcatW]
push esi
mov esi, dword [ebp + 8]
push edi
lea eax, [esi + 2]
push eax
call dword [sym.imp.KERNEL32.DLL_SetEnvironmentVariableW]
push edi
push esi
mov ecx, 0x4acf10
call fcn.00435749
pop esi
pop edi
pop ebp
ret