joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404c7f
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 0x404ca1
call fcn.00402a89
test al, al
jne 0x404ca9
inc esi
inc esi
mov ax, word [esi]
cmp ax, bx
jne 0x404c96
mov eax, esi
sub eax, edx
sar eax, 1
mov ecx, 0x400
cmp eax, ecx
jle 0x404cba
mov eax, ecx
lea edi, [eax + eax]
push edi
push edx
lea eax, [ebp - 0x824]
push eax
call fcn.0046cbf0
add esp, 0xc
mov word [ebp + edi - 0x824], bx
jmp 0x404cda
inc esi
inc esi
mov ax, word [esi]
call fcn.00402a89
test al, al
jne 0x404cd8
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 0x404d6d
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 0x404d6d
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x404d36
push 0x481028
call fcn.0040326e
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 0x404d58
push 0x48101c
jmp 0x404d5d
push 0x481010
call fcn.0040326e
pop ecx
push dword [ebp + 8]
call ebx
push edi
call esi
jmp 0x404d8c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
jne 0x404d81
push 0x481004
jmp 0x404d86
push 0x480ff8
call fcn.0040326e
pop ecx
push dword [ebp - 4]
call ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x404e7c
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7f8
push ebx
push esi
push edi
mov esi, 0x481034
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.0040302f
mov edx, eax
mov ecx, edx
call fcn.004030f6
mov esi, eax
sub esi, edx
sar esi, 1
mov eax, 0x3e8
cmp esi, eax
jl 0x404eca
mov esi, eax
push esi
push edx
lea eax, [ebp - 0x7e8]
push eax
call fcn.00403c6b
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 0x404f3f
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 0x404f3f
push 0x64
push edi
push esi
call fcn.00403042
mov dword [esi], 0xffffffff
mov dword [esi + 8], edi
lea eax, [esi + 4]
add esp, 0xc
mov dword [0x4950c4], eax
mov dword [0x496b9c], esi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40a19f
Capabilities:
Check os version
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push 0x496c30
mov dword [0x496c30], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [0x496c34], 5
je 0x40a1c7
xor eax, eax
leave
ret
mov eax, dword [0x496c38]
push ebx
push edi
xor edi, edi
sub eax, edi
je 0x40a1e2
dec eax
jne 0x40a263
mov ebx, 0x39000
jmp 0x40a1e7
mov ebx, 0x30000
push esi
push str.DevicePhysicalMemory
lea eax, [ebp - 8]
push eax
call dword [0x496d44]
lea eax, [ebp - 8]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
push eax
push 6
mov esi, 0x496d54
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 [0x496bf8]
cmp eax, 0xc0000022
jne 0x40a25e
lea eax, [ebp - 0x20]
push eax
push 0x60000
push esi
call dword [0x496bf8]
push dword [0x496d54]
call fcn.0040a0d1
pop ecx
push dword [0x496d54]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x20]
push eax
push 6
push esi
call dword [0x496bf8]
cmp eax, edi
pop esi
jge 0x40a267
xor eax, eax
jmp 0x40a28b
push 0x1000
push ebx
push edi
push 6
push dword [0x496d54]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [0x496d50], eax
neg eax
sbb eax, eax
and eax, dword [0x496d54]
pop edi
pop ebx
leave
ret

Function at 0x40a28f
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 0x40a2a8
xor eax, eax
pop edi
ret
test al, al
push esi
jns 0x40a2bb
mov esi, eax
xor esi, edi
and esi, 0x3fffff
xor esi, eax
jmp 0x40a303
push 0x1000
and eax, 0xfffff000
push eax
push 0
push 4
push dword [0x496d54]
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 0x40a2f0
xor eax, eax
jmp 0x40a305
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 0x40a308
Capabilities:
Read file via mapping

Disassembly:
push esi
push dword [esp + 8]
push dword [0x496d50]
call fcn.0040a28f
pop ecx
pop ecx
push 0x1000
mov esi, eax
and eax, 0xfffff000
push eax
push 0
push 6
push dword [0x496d54]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
jne 0x40a33d
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 0x40a641
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.0040a5c1
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 4], eax
je 0x40a6d8
push esi
push eax
call fcn.0040a61f
mov esi, dword [ebp + 0x10]
test esi, esi
pop ecx
mov dword [ebp - 8], eax
je 0x40a673
mov dword [esi], eax
jmp 0x40a676
lea esi, [ebp - 8]
mov edi, dword [ebp + 0xc]
test edi, edi
jne 0x40a69c
add eax, 0x10
push eax
lea ecx, [ebp + 0xc]
call fcn.0042c6b0
mov edi, dword [ebp + 0xc]
and dword [ebp + 0xc], 0
lea ecx, [ebp + 0xc]
call fcn.00427365
test edi, edi
je 0x40a6cc
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 0x40a6bb
xor eax, eax
push 6
mov dword [esi], eax
add eax, edi
push 0
push eax
call fcn.0046c9b0
add esp, 0xc
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
jmp 0x40a6db
mov edi, dword [ebp + 0xc]
mov eax, edi
pop edi
leave
ret

Function at 0x40ad62
Capabilities:
Parse pe header

Disassembly:
cmp dword [esp + 8], 0x40
jb 0x40ad77
mov eax, dword [esp + 4]
mov dword [ecx + 0xc], eax
cmp word [eax], 0x5a4d
je 0x40ad7b
xor eax, eax
jmp 0x40ade6
mov edx, dword [eax + 0x3c]
push esi
lea esi, [edx + 0xf8]
cmp dword [esp + 0xc], esi
jae 0x40ad8f
xor eax, eax
jmp 0x40ade5
add eax, edx
mov dword [ecx + 0x10], eax
cmp dword [eax], 0x4550
jne 0x40ad8b
mov dx, word [eax + 0x16]
test dh, 0x20
je 0x40ad8b
test dl, 2
je 0x40ad8b
cmp word [eax + 0x14], 0xe0
jne 0x40ad8b
mov esi, dword [ecx + 0x10]
add eax, 0xf8
xor edx, edx
mov dword [ecx + 0x14], eax
cmp word [esi + 6], dx
jbe 0x40ade2
add eax, 0x10
mov esi, dword [eax + 4]
add esi, dword [eax]
cmp esi, dword [esp + 0xc]
ja 0x40ad8b
mov esi, dword [ecx + 0x10]
movzx esi, word [esi + 6]
inc edx
add eax, 0x28
cmp edx, esi
jl 0x40adc8
xor eax, eax
inc eax
pop esi
ret 8

Function at 0x40af17
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
xor ebx, ebx
cmp dword [0x496de4], ebx
push esi
je 0x40af7d
cmp byte [ebp + 8], bl
je 0x40af7d
mov eax, dword [0x496ea8]
cmp word [eax], bx
je 0x40af7d
test byte [0x497174], 2
mov esi, eax
je 0x40af5e
push ebx
lea ecx, [ebp - 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push esi
push dword [0x496de4]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
jmp 0x40af7d
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 [0x496de4]
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, 0x10000
push esi
mov ecx, 0x496ea8
call fcn.0042c850
mov eax, dword [0x496ea8]
mov word [eax], bx
mov dword [0x496eb0], esi
pop esi
mov dword [0x496eac], ebx
pop ebx
leave
ret
Function at 0x40b3b6
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 0x40b3ee
cdq
jmp 0x40b401
cmp dword [ebp + 0xc], esi
je 0x40b3fb
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
jmp 0x40b401
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
pop esi
leave
ret

Function at 0x40b816
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 0x40b83e
push ebx
call fcn.00428b63
pop ecx
cmp ebp, ebx
jg 0x40b8bb
push ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40b8c5
cmp byte [0x495280], bl
jle 0x40b8c5
cmp ecx, 0x7d0
jbe 0x40b862
mov ecx, 0x3e8
jmp 0x40b86a
cmp ecx, 0x64
jbe 0x40b86a
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 0x40b8b3
call edi
mov ecx, esi
sub ecx, eax
test ecx, ecx
jle 0x40b8bb
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 0x40b8bb
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 [0x495280], bl
jg 0x40b87f
call edi
mov ecx, esi
sub ecx, eax
cmp ecx, ebx
jg 0x40b84b
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret 4

Function at 0x40b8d1
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.0042c827
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 0x40b965
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
add eax, 0x10
mov dword [ebp - 0xc], eax
push esi
call fcn.0040b404
cmp eax, dword [ebp - 0xc]
pop ecx
jb 0x40b954
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
dec eax
dec eax
je 0x40b94e
dec eax
jne 0x40b954
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 0x40b954
mov esi, eax
jmp 0x40b968
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 0x40b91b
mov esi, dword [ebp - 4]
lea ecx, [ebp - 8]
call fcn.00427365
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x40be77
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
push ebx
push esi
push edi
mov esi, 0x481d54
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, 0x496eb8
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 0x40bf11
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.004458e7
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.0042b2cd
inc byte [ebp - 2]
cmp byte [ebp - 2], 0x1a
jl 0x40bea1
cmp byte [ebp - 1], 0
pop edi
pop esi
pop ebx
jle 0x40bf35
mov ecx, dword [ebp + 8]
xor eax, eax
push eax
push eax
push eax
push str.THREAD_Envi
call fcn.00420f64
leave
ret

Function at 0x40c1ec
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 0x40c20a
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, esi
pop esi
ret

Function at 0x40c26b
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.0042c809
lea ecx, [ebp - 4]
call fcn.0042c809
push 0x2c
push dword [ebp + 8]
call dword [sym.imp.SHLWAPI.dll_StrChrW]
mov edi, eax
test edi, edi
je 0x40c34c
and word [edi], 0
push ebx
push 1
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov esi, 0x496eb8
mov ecx, esi
call fcn.0043d8d6
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.0043d8d6
cmp byte [ebp + 0xc], 0
mov esi, dword [ebp - 4]
mov dword [ebp - 0xc], esi
je 0x40c303
lea ecx, [ebp + 8]
call fcn.00409fda
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 0x481318
push 0x80000002
jmp 0x40c33f
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.004280f8
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.004280f8
add esp, 0x18
xor esi, esi
pop ebx
jmp 0x40c34f
xor esi, esi
inc esi
lea ecx, [ebp - 4]
call fcn.00427365
lea ecx, [ebp - 8]
call fcn.00427365
pop edi
mov eax, esi
pop esi
leave
ret
Function at 0x40c84a
Capabilities:
Encode data using xor

Disassembly:
push esi
push edi
mov edi, dword [esp + 0x10]
test edi, edi
jge 0x40c85b
call fcn.0040c7ef
mov edi, eax
mov eax, dword [esp + 0x14]
test eax, eax
mov esi, dword [esp + 0xc]
jg 0x40c86f
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
dec eax
js 0x40c87b
inc eax
xor word [esi], di
inc esi
inc esi
dec eax
jne 0x40c873
mov eax, edi
pop edi
shl eax, 0x10
pop esi
ret

Function at 0x40c9a3
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 [0x496f60], 0
mov dword [ebp - 0xc], 4
jne 0x40ca6a
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 [0x496f60], 1
call fcn.00428081
add esp, 0x18
cmp dword [ebp - 8], 0
jne 0x40ca67
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.0046c682
test eax, eax
pop ecx
je 0x40ca3f
mov dword [ebp - 4], 1
push 4
lea eax, [ebp - 4]
push eax
push 4
push ebx
push edi
push esi
call fcn.004280f8
add esp, 0x18
cmp dword [ebp - 4], 1
jne 0x40ca67
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x2e0]
push eax
call fcn.0041d2d9
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40cb24
Capabilities:
Log keystrokes via application hook

Disassembly:
cmp dword [0x496dc8], 0
jne 0x40cb47
push 0
push dword [0x496dd4]
push 0x40ca6c
push 0xd
call dword [sym.imp.USER32.dll_SetWindowsHookExW]
mov dword [0x496dc8], eax
ret

Function at 0x40cf11
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 0x40cf2c
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 0x40cf7b
cmp dword [ebp - 0x224], esi
je 0x40cf81
lea eax, [ebp - 0x22c]
push eax
push edi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x40cf66
jmp 0x40cf87
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 0x40cf2c
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret
Function at 0x40d074
Capabilities:
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 0xc], 1
push edi
je 0x40d098
cmp dword [ebp + 0xc], 2
jne 0x40d0c7
mov edi, dword [ebp + 0x14]
push 0x104
push edi
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
jmp 0x40d09b
mov edi, dword [ebp + 0x10]
cmp dword [ebp + 0x18], 0
je 0x40d0ab
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, 0x496eb8
call fcn.0042b2cd
pop esi
pop edi
pop ebp
ret

Function at 0x40d15a
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 [0x496ec5], 1
call fcn.0042c827
push 0x822
push 0
push dword [ebp - 4]
call fcn.0046c9b0
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, 0x496eb8
push esi
call fcn.0042e74e
push str.WM_PE_BASE
push 0x5000
push esi
call fcn.0042e74e
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
add esp, 0x18
push edi
push 0x4820a2
call esi
push edi
mov ebx, 0x496eb8
push str.MyName
mov ecx, ebx
call fcn.0042b2cd
push 0x5c
push 0
push edi
call dword [sym.imp.SHLWAPI.dll_StrRChrW]
xor edi, edi
cmp eax, edi
je 0x40d211
lea edi, [eax + 2]
push edi
push 0x48208e
call esi
push edi
push str.MyName0
mov ecx, ebx
call fcn.0042b2cd
xor edi, edi
push edi
push edi
push str.Desktop
call fcn.0040d0ca
push edi
push edi
push str.Favorites
call fcn.0040d0ca
push edi
push edi
push str.Programs
call fcn.0040d0ca
push edi
push edi
push str.SendTo
call fcn.0040d0ca
push edi
push edi
push str.Personal
call fcn.0040d0ca
push edi
push str.Start_Menu
push 0x48176c
call fcn.0040d0ca
add esp, 0x48
push edi
push str.Cache
push str.IECache
call fcn.0040d0ca
push edi
push edi
push str.Startup
call fcn.0040d0ca
push str.MicrosoftInternet_ExplorerQuick_Launch
push str.AppData
push str.QuickLaunch
call fcn.0040d0ca
add esp, 0x24
lea ecx, [ebp - 4]
call fcn.00427365
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40d2d2
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x14b8
call fcn.0046d3f0
push esi
mov esi, 0x495284
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 0x40d2f8
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, 0x496eb8
call fcn.0042b2cd
add esi, 4
cmp esi, 0x495298
jl 0x40d2e5
pop esi
leave
ret
Function at 0x40ded1
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
push 6
pop ecx
mov esi, str.format.com
lea edi, [ebp - 0x8c]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
call esi
push dword [ebp + 8]
mov edi, eax
call esi
add eax, edi
lea eax, [eax + eax + 0x1a]
add eax, 0x1e
push eax
lea ecx, [ebp - 8]
call fcn.0042c6b0
mov edx, dword [ebp - 8]
push 0x10
pop ecx
xor eax, eax
mov dword [ebp - 0x74], 0x44
lea edi, [ebp - 0x70]
rep stosd dword es:[edi], eax
and word [ebp - 0x44], ax
or dword [ebp - 0x48], 1
lea eax, [ebp - 0x8c]
push eax
push edx
mov dword [ebp + 0xc], edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push dword [ebp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push dword [ebp + 0xc]
call edi
push 0x48109c
push dword [ebp + 0xc]
call edi
cmp word [ebx], 0x22
jne 0x40df74
inc ebx
inc ebx
push ebx
call esi
test eax, eax
jle 0x40df74
lea eax, [ebx + eax*2 - 2]
cmp word [eax], 0x22
jne 0x40df74
and word [eax], 0
push ebx
push dword [ebp + 0xc]
call edi
push 0x482a94
push ebx
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
jne 0x40df94
push 0x482a88
push dword [ebp + 0xc]
call edi
mov eax, dword [ebp + 8]
mov ax, word [eax]
mov esi, str..D:
lea edi, [ebp - 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0xc], 8
mov word [ebp - 0x28], ax
mov dword [ebp + 8], 0x12b
mov ebx, 0x496eb8
xor edi, edi
push edi
push edi
push 3
push edi
push edi
push 0x80000000
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
jne 0x40dfef
push 0x64
mov ecx, ebx
call fcn.0040b816
dec dword [ebp + 8]
jns 0x40dfbd
jmp 0x40dff2
push eax
call esi
mov dword [ebp - 0x10], 2
mov dword [ebp + 8], 0x1d
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x74]
push eax
push edi
push edi
push edi
push 1
push edi
push edi
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x40e032
push str.Cannot_format_drive:
call fcn.0040d815
dec dword [ebp - 0x10]
pop ecx
jns 0x40e062
push 8
pop esi
jmp 0x40e073
push dword [ebp - 0x1c]
call esi
push 0xffffffffffffffff
push dword [ebp - 0x20]
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov eax, dword [ebp - 4]
push dword [ebp - 0x20]
mov dword [ebp - 0xc], eax
call esi
cmp dword [ebp - 4], edi
je 0x40e070
push 0x64
mov ecx, ebx
call fcn.0040b816
dec dword [ebp + 8]
jns 0x40e000
mov esi, dword [ebp - 0xc]
lea ecx, [ebp - 8]
call fcn.00427365
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret