joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40502f
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 [0x4a5b98], eax
mov dword [ebp - 8], eax
lea eax, [ebp + 8]
push edi
push eax
mov dword [ebp - 0x10], 0x100
call fcn.0040415a
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 0x40506c
mov esi, eax
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0xc], ecx
call fcn.0042dd40
push 6
push dword [ebp - 0xc]
push str.__gui_
call fcn.0042ec66
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
add esp, 0x10
xor ebx, ebx
test al, al
je 0x4050c3
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.0042dd40
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.0047a350
add esp, 0xc
add esi, esi
push esi
push dword [ebp - 8]
lea eax, [ebp - 0x824]
push eax
call fcn.0047a010
add esp, 0xc
push dword [ebp - 8]
mov word [ebp + esi - 0x824], bx
mov byte [0x4a9003], bl
call edi
mov esi, eax
inc esi
lea eax, [esi + 0x226]
push eax
lea ecx, [ebp - 4]
call fcn.00432cd5
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 0x405225
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 0x405149
mov ax, word [edx]
call fcn.00402b57
test al, al
je 0x405147
xor edi, edi
inc edi
inc edx
inc edx
cmp edx, dword [ebp + 8]
jb 0x405138
cmp di, bx
mov edx, dword [ebp - 4]
lea eax, [edx + 2]
mov dword [ebp + 8], eax
je 0x40516a
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 0x48f054
push edi
call fcn.0047a010
push esi
push dword [ebp - 8]
add edi, 0x1e
push edi
call fcn.00404142
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 0x405217
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 0x405217
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 0x405210
push ebx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x4051fe
push 0x48f048
jmp 0x405203
push 0x48f03c
call fcn.004033ff
pop ecx
push dword [ebp + 8]
call esi
jmp 0x405222
push 0x48f030
jmp 0x40521c
push 0x48f024
call fcn.004033ff
pop ecx
push edi
call esi
lea ecx, [ebp - 4]
call fcn.0042dd2d
pop edi
pop esi
pop ebx
leave
ret
Function at 0x405232
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 0x405254
call fcn.00402b57
test al, al
jne 0x40525c
inc esi
inc esi
mov ax, word [esi]
cmp ax, bx
jne 0x405249
mov eax, esi
sub eax, edx
sar eax, 1
mov ecx, 0x400
cmp eax, ecx
jle 0x40526d
mov eax, ecx
lea edi, [eax + eax]
push edi
push edx
lea eax, [ebp - 0x824]
push eax
call fcn.0047a010
add esp, 0xc
mov word [ebp + edi - 0x824], bx
jmp 0x40528d
inc esi
inc esi
mov ax, word [esi]
call fcn.00402b57
test al, al
jne 0x40528b
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 0x405320
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 0x405320
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x4052e9
push 0x48f0ac
call fcn.004033ff
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 0x40530b
push 0x48f0a0
jmp 0x405310
push 0x48f094
call fcn.004033ff
pop ecx
push dword [ebp + 8]
call ebx
push edi
call esi
jmp 0x40533f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
jne 0x405334
push 0x48f088
jmp 0x405339
push 0x48f07c
call fcn.004033ff
pop ecx
push dword [ebp - 4]
call ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40542f
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7f8
push ebx
push esi
push edi
mov esi, 0x48f0b8
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.004031c0
mov edx, eax
mov ecx, edx
call fcn.00403287
mov esi, eax
sub esi, edx
sar esi, 1
mov eax, 0x3e8
cmp esi, eax
jl 0x40547d
mov esi, eax
push esi
push edx
lea eax, [ebp - 0x7e8]
push eax
call fcn.00404142
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 0x4054f2
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 0x4054f2
push 0x64
push edi
push esi
call fcn.004031d3
mov dword [esi], 0xffffffff
mov dword [esi + 8], edi
lea eax, [esi + 4]
add esp, 0xc
mov dword [0x4a40d4], eax
mov dword [0x4a5b9c], esi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40b607
Capabilities:
Check os version
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push 0x4a5c40
mov dword [0x4a5c40], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [0x4a5c44], 5
je 0x40b62f
xor eax, eax
leave
ret
mov eax, dword [0x4a5c48]
push ebx
push edi
xor edi, edi
sub eax, edi
je 0x40b64a
dec eax
jne 0x40b6cb
mov ebx, 0x39000
jmp 0x40b64f
mov ebx, 0x30000
push esi
push str.DevicePhysicalMemory
lea eax, [ebp - 8]
push eax
call dword [0x4a5c0c]
lea eax, [ebp - 8]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
push eax
push 6
mov esi, 0x4a5d60
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 [0x4a5c08]
cmp eax, 0xc0000022
jne 0x40b6c6
lea eax, [ebp - 0x20]
push eax
push 0x60000
push esi
call dword [0x4a5c08]
push dword [0x4a5d60]
call fcn.0040b539
pop ecx
push dword [0x4a5d60]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x20]
push eax
push 6
push esi
call dword [0x4a5c08]
cmp eax, edi
pop esi
jge 0x40b6cf
xor eax, eax
jmp 0x40b6f3
push 0x1000
push ebx
push edi
push 6
push dword [0x4a5d60]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [0x4a5d5c], eax
neg eax
sbb eax, eax
and eax, dword [0x4a5d60]
pop edi
pop ebx
leave
ret

Function at 0x40b6f7
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 0x40b710
xor eax, eax
pop edi
ret
test al, al
push esi
jns 0x40b723
mov esi, eax
xor esi, edi
and esi, 0x3fffff
xor esi, eax
jmp 0x40b76b
push 0x1000
and eax, 0xfffff000
push eax
push 0
push 4
push dword [0x4a5d60]
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 0x40b758
xor eax, eax
jmp 0x40b76d
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 0x40b770
Capabilities:
Read file via mapping

Disassembly:
push esi
push dword [esp + 8]
push dword [0x4a5d5c]
call fcn.0040b6f7
pop ecx
pop ecx
push 0x1000
mov esi, eax
and eax, 0xfffff000
push eax
push 0
push 6
push dword [0x4a5d60]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
jne 0x40b7a5
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 0x40b837
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 0x40b855
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, esi
pop esi
ret
Function at 0x40ba34
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push edi
push 0x80000000
push dword [ebp + 8]
call fcn.0040b9b3
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 4], eax
je 0x40bacb
push esi
push eax
call fcn.0040ba12
mov esi, dword [ebp + 0x10]
test esi, esi
pop ecx
mov dword [ebp - 8], eax
je 0x40ba66
mov dword [esi], eax
jmp 0x40ba69
lea esi, [ebp - 8]
mov edi, dword [ebp + 0xc]
test edi, edi
jne 0x40ba8f
add eax, 0x10
push eax
lea ecx, [ebp + 0xc]
call fcn.00432b5e
mov edi, dword [ebp + 0xc]
and dword [ebp + 0xc], 0
lea ecx, [ebp + 0xc]
call fcn.0042dd2d
test edi, edi
je 0x40babf
and dword [ebp + 0xc], 0
push 0
lea eax, [ebp + 0xc]
push eax
push dword [esi]
push edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp + 0xc]
test eax, eax
jge 0x40baae
xor eax, eax
push 6
mov dword [esi], eax
add eax, edi
push 0
push eax
call fcn.00479cf0
add esp, 0xc
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
jmp 0x40bace
mov edi, dword [ebp + 0xc]
mov eax, edi
pop edi
leave
ret

Function at 0x40c179
Capabilities:
Parse pe header

Disassembly:
cmp dword [esp + 8], 0x40
jb 0x40c18e
mov eax, dword [esp + 4]
mov dword [ecx + 0xc], eax
cmp word [eax], 0x5a4d
je 0x40c192
xor eax, eax
jmp 0x40c1fd
mov edx, dword [eax + 0x3c]
push esi
lea esi, [edx + 0xf8]
cmp dword [esp + 0xc], esi
jae 0x40c1a6
xor eax, eax
jmp 0x40c1fc
add eax, edx
mov dword [ecx + 0x10], eax
cmp dword [eax], 0x4550
jne 0x40c1a2
mov dx, word [eax + 0x16]
test dh, 0x20
je 0x40c1a2
test dl, 2
je 0x40c1a2
cmp word [eax + 0x14], 0xe0
jne 0x40c1a2
mov esi, dword [ecx + 0x10]
add eax, 0xf8
xor edx, edx
mov dword [ecx + 0x14], eax
cmp word [esi + 6], dx
jbe 0x40c1f9
add eax, 0x10
mov esi, dword [eax + 4]
add esi, dword [eax]
cmp esi, dword [esp + 0xc]
ja 0x40c1a2
mov esi, dword [ecx + 0x10]
movzx esi, word [esi + 6]
inc edx
add eax, 0x28
cmp edx, esi
jl 0x40c1df
xor eax, eax
inc eax
pop esi
ret 8

Function at 0x40c32e
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
xor ebx, ebx
cmp dword [0x4a5e10], ebx
push esi
je 0x40c394
cmp byte [ebp + 8], bl
je 0x40c394
mov eax, dword [0x4a5efc]
cmp word [eax], bx
je 0x40c394
test byte [0x4a6218], 2
mov esi, eax
je 0x40c375
push ebx
lea ecx, [ebp - 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push esi
push dword [0x4a5e10]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
jmp 0x40c394
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
lea ecx, [ebp - 4]
push ecx
shl eax, 1
push eax
push esi
push dword [0x4a5e10]
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, 0x10000
push esi
mov ecx, 0x4a5efc
call fcn.00432cfe
mov eax, dword [0x4a5efc]
mov word [eax], bx
mov dword [0x4a5f04], esi
pop esi
mov dword [0x4a5f00], ebx
pop ebx
leave
ret
Function at 0x40c7f6
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 0x40c82e
cdq
jmp 0x40c841
cmp dword [ebp + 0xc], esi
je 0x40c83b
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
jmp 0x40c841
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
pop esi
leave
ret

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

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call edi
mov ebp, dword [esp + 0x38]
mov esi, eax
add esi, ebp
xor ebx, ebx
cmp ebp, 0x4e20
jb 0x40ce8a
push ebx
call fcn.0042f5b0
pop ecx
cmp ebp, ebx
jg 0x40cf07
push ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40cf11
cmp byte [0x4a4290], bl
jle 0x40cf11
cmp ecx, 0x7d0
jbe 0x40ceae
mov ecx, 0x3e8
jmp 0x40ceb6
cmp ecx, 0x64
jbe 0x40ceb6
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 0x40ceff
call edi
mov ecx, esi
sub ecx, eax
test ecx, ecx
jle 0x40cf07
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 0x40cf07
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 byte [0x4a4290], bl
jg 0x40cecb
call edi
mov ecx, esi
sub ecx, eax
cmp ecx, ebx
jg 0x40ce97
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret 4

Function at 0x40cf1d
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.00432cd5
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 0x40cfb1
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
add eax, 0x10
mov dword [ebp - 0xc], eax
push esi
call fcn.0040c844
cmp eax, dword [ebp - 0xc]
pop ecx
jb 0x40cfa0
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
dec eax
dec eax
je 0x40cf9a
dec eax
jne 0x40cfa0
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 0x40cfa0
mov esi, eax
jmp 0x40cfb4
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 0x40cf67
mov esi, dword [ebp - 4]
lea ecx, [ebp - 8]
call fcn.0042dd2d
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x40d420
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 0x40d451
xor eax, eax
jmp 0x40d4c0
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 0x40d4b5
cmp word [ebp - 0x48], 0x5a4d
jne 0x40d4b5
push edi
push edi
push dword [ebp - 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x40d4b5
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 0x40d4b5
cmp dword [ebp - 0x140], 0x4550
jne 0x40d4b5
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 0x40d5a0
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
push ebx
push esi
push edi
mov esi, 0x48febc
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, 0x4a5f08
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 0x40d63a
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.0044cba7
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.00432698
inc byte [ebp - 2]
cmp byte [ebp - 2], 0x1a
jl 0x40d5ca
cmp byte [ebp - 1], 0
pop edi
pop esi
pop ebx
jle 0x40d65e
mov ecx, dword [ebp + 8]
xor eax, eax
push eax
push eax
push eax
push str.THREAD_Envi
call fcn.0042442a
leave
ret
Function at 0x40d988
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.00432cb7
lea ecx, [ebp - 4]
call fcn.00432cb7
push 0x2c
push dword [ebp + 8]
call dword [sym.imp.SHLWAPI.dll_StrChrW]
mov edi, eax
test edi, edi
je 0x40da69
and word [edi], 0
push ebx
push 1
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov esi, 0x4a5f08
mov ecx, esi
call fcn.0043b168
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.0043b168
cmp byte [ebp + 0xc], 0
mov esi, dword [ebp - 4]
mov dword [ebp - 0xc], esi
je 0x40da20
lea ecx, [ebp + 8]
call fcn.0040b430
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 0x48f4a0
push 0x80000002
jmp 0x40da5c
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.0042eb45
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.0042eb45
add esp, 0x18
xor esi, esi
pop ebx
jmp 0x40da6c
xor esi, esi
inc esi
lea ecx, [ebp - 4]
call fcn.0042dd2d
lea ecx, [ebp - 8]
call fcn.0042dd2d
pop edi
mov eax, esi
pop esi
leave
ret

Function at 0x40df73
Capabilities:
Encode data using xor

Disassembly:
push esi
push edi
mov edi, dword [esp + 0x10]
test edi, edi
jge 0x40df84
call fcn.0040df18
mov edi, eax
mov eax, dword [esp + 0x14]
test eax, eax
mov esi, dword [esp + 0xc]
jg 0x40df98
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
dec eax
js 0x40dfa4
inc eax
xor word [esi], di
inc esi
inc esi
dec eax
jne 0x40df9c
mov eax, edi
pop edi
shl eax, 0x10
pop esi
ret

Function at 0x40e0e2
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2e0
and dword [ebp - 8], 0
or dword [ebp - 4], 0xffffffff
and dword [ebp - 0x10], 0
cmp byte [0x4a5fbc], 0
mov dword [ebp - 0xc], 4
jne 0x40e1ac
push ebx
push esi
push edi
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
mov ebx, str.SysStartuped
push ebx
mov edi, str.SOFTWAREPELOGON
push edi
mov esi, 0x80000002
push esi
mov byte [0x4a5fbc], 1
call fcn.0042eace
add esp, 0x18
test eax, eax
jne 0x40e144
cmp dword [ebp - 8], eax
jne 0x40e1a9
push 1
push 0x25
lea eax, [ebp - 0x2e0]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push str.SysStartup.ini
lea eax, [ebp - 0x2e0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x2e0]
push eax
call fcn.00479791
test eax, eax
pop ecx
je 0x40e181
mov dword [ebp - 4], 1
push 4
lea eax, [ebp - 4]
push eax
push 4
push ebx
push edi
push esi
call fcn.0042eb45
add esp, 0x18
cmp dword [ebp - 4], 1
jne 0x40e1a9
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x2e0]
push eax
call fcn.0041fd16
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40e2e5
Capabilities:
Log keystrokes via application hook

Disassembly:
cmp dword [0x4a5df0], 0
jne 0x40e308
push 0
push dword [0x4a5e00]
push 0x40e22d
push 0xd
call dword [sym.imp.USER32.dll_SetWindowsHookExW]
mov dword [0x4a5df0], eax
ret

Function at 0x40e6d2
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 0x40e6ed
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 0x40e73c
cmp dword [ebp - 0x224], esi
je 0x40e742
lea eax, [ebp - 0x22c]
push eax
push edi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x40e727
jmp 0x40e748
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 0x40e6ed
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 0xc], 1
push edi
je 0x40e8e1
cmp dword [ebp + 0xc], 2
jne 0x40e910
mov edi, dword [ebp + 0x14]
push 0x104
push edi
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
jmp 0x40e8e4
mov edi, dword [ebp + 0x10]
cmp dword [ebp + 0x18], 0
je 0x40e8f4
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, 0x4a5f08
call fcn.00432698
pop esi
pop edi
pop ebp
ret
Function at 0x40e9a3
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push 0x411
lea ecx, [ebp - 4]
mov byte [0x4a5f15], 1
call fcn.00432cd5
push 0x822
push 0
push dword [ebp - 4]
call fcn.00479cf0
mov edi, dword [ebp - 4]
add esp, 0xc
push 0x104
add edi, 0x410
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push str.PE_IDBASE
push 0x1000
mov esi, 0x4a5f08
push esi
call fcn.00434ea0
push str.WM_PE_BASE
push 0x5000
push esi
call fcn.00434ea0
push str.PE_MENU_IDBASE
push 0x100
push esi
call fcn.00434ea0
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
add esp, 0x24
push edi
push 0x490262
call esi
push edi
mov ebx, 0x4a5f08
push str.MyName
mov ecx, ebx
call fcn.00432698
push 0x5c
push 0
push edi
call dword [sym.imp.SHLWAPI.dll_StrRChrW]
xor edi, edi
cmp eax, edi
je 0x40ea6a
lea edi, [eax + 2]
push edi
push 0x49024e
call esi
push edi
push str.MyName0
mov ecx, ebx
call fcn.00432698
xor edi, edi
push edi
push edi
push str.Desktop
call fcn.0040e913
push edi
push edi
push str.Favorites
call fcn.0040e913
push edi
push edi
push 0x48f8fc
call fcn.0040e913
push edi
push edi
push str.SendTo
call fcn.0040e913
push edi
push edi
push str.Personal
call fcn.0040e913
push edi
push str.Start_Menu
push 0x48f924
call fcn.0040e913
add esp, 0x48
push edi
push str.Cache
push str.IECache
call fcn.0040e913
push edi
push edi
push str.Startup
call fcn.0040e913
push str.MicrosoftInternet_ExplorerQuick_Launch
push str.AppData
push str.QuickLaunch
call fcn.0040e913
add esp, 0x24
lea ecx, [ebp - 4]
call fcn.0042dd2d
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40eb2b
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x14b8
call fcn.0047a810
push esi
mov esi, 0x4a4294
and word [ebp - 0x14b8], 0
mov edx, dword [esi]
mov word [ebp - 0x64], 0x26
lea ecx, [ebp - 0x62]
movsx ax, byte [edx]
mov word [ecx], ax
inc ecx
inc ecx
inc edx
test ax, ax
jne 0x40eb51
push 0xa28
lea eax, [ebp - 0x14b8]
push eax
lea eax, [ebp - 0x62]
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp - 0x14b8]
push eax
lea eax, [ebp - 0x64]
push eax
mov ecx, 0x4a5f08
call fcn.00432698
add esi, 4
cmp esi, 0x4a42a8
jl 0x40eb3e
pop esi
leave
ret