joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41cfe4
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x6c]
sub esp, 0x9c
push ebx
push esi
mov esi, dword [ebp + 0x7c]
push edi
push 0x481f9c
lea ecx, [ebp + 0x64]
sar esi, 0x10
call fcn.004365ba
mov edi, dword [ebp + 0x74]
push esi
push dword [edi]
call fcn.0040c7d6
pop ecx
pop ecx
push 0x20a
lea ecx, [ebp + 0x68]
mov dword [ebp + 0x74], eax
call fcn.0042c827
push dword [ebp + 0x68]
push 0x208
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ebx, dword [ebp + 0x78]
push ebx
lea ecx, [ebp - 0x30]
call fcn.0040a933
push ebx
lea ecx, [ebp - 0x30]
call fcn.0040afa5
push dword [ebp + 0x68]
mov eax, dword [ebx + 0x18]
push 0x48334c
mov dword [ebp - 0x18], eax
call fcn.0042b2cd
movzx eax, si
push eax
lea ecx, [ebp - 0x30]
mov word [ebp - 0x28], si
call fcn.0042aa5e
mov ecx, dword [ebp + 0x7c]
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp + 0x64]
push eax
push dword [ebp + 0x74]
push 0
push edi
call fcn.0041bfb0
movzx esi, ax
or esi, dword [ebp + 0x7c]
add esp, 0x14
mov edi, 0x4975e4
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0xffffffffffffffff
push 0
push 0x4833c0
mov ecx, ebx
call fcn.0040f2f5
and dword [ebp + 0x10], 0
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0
lea ecx, [ebp - 0x30]
call fcn.0041c72f
lea ecx, [ebp + 0xc]
call fcn.00427365
lea ecx, [ebp + 0x68]
call fcn.00427365
lea ecx, [ebp + 0x64]
call fcn.00427365
pop edi
mov eax, esi
pop esi
pop ebx
add ebp, 0x6c
leave
ret
Function at 0x41e345
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push 0x20a
lea ecx, [ebp - 4]
call fcn.0042c827
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.0042c877
mov cl, byte [ebp + 0xc]
test cl, 0x20
mov eax, str.unknown
je 0x41e39e
mov eax, 0x480ee8
test cl, 0x10
je 0x41e3a8
mov eax, str.reboot
test cl, 2
je 0x41e3b2
mov eax, str.logout
test cl, 4
je 0x41e3bc
mov eax, str.suspend
test cl, 8
je 0x41e3c6
mov eax, str.hiber
test cl, 0x40
je 0x41e3d0
mov eax, str.poweroff
test cl, cl
jns 0x41e3d9
mov eax, str.lock
push ebx
push esi
push edi
push eax
lea ecx, [ebp - 4]
call fcn.0042c877
push 0x48109c
lea ecx, [ebp - 4]
call fcn.0042c877
push dword [ebp + 8]
lea ecx, [ebp - 4]
call fcn.0042c877
push dword [ebp - 4]
mov ebx, 0x496eb8
mov ecx, ebx
call fcn.0041d2d9
test byte [ebp + 0xc], 0x70
push 6
pop ecx
mov esi, str._25INDATA
lea edi, [ebp - 0x1c]
rep movsd dword es:[edi], dword [esi]
je 0x41e42a
lea eax, [ebp - 0x1c]
push eax
mov ecx, ebx
call fcn.0041d2d9
lea ecx, [ebp - 4]
call fcn.00427365
pop edi
pop esi
pop ebx
leave
ret

Function at 0x41e437
Capabilities:
Shutdown system

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 0xc]
mov eax, esi
push edi
and eax, 0xfffffffe
push eax
push dword [ebp + 0x10]
call fcn.0041e345
push 2
push str.SeShutdownPrivilege
and esi, 0x4000
call fcn.0040d55a
push 2
push str.SeRemoteShutdownPrivilege
call fcn.0040d55a
add esp, 0x18
call fcn.0040bbb1
xor edi, edi
test byte [ebp + 0xc], 1
jne 0x41e49b
cmp eax, 0x60002
jb 0x41e49b
xor eax, eax
cmp dword [ebp + 8], edi
setne al
push eax
push 1
push edi
push 0x480934
push edi
call dword [sym.imp.ADVAPI32.dll_InitiateSystemShutdownW]
cmp esi, edi
mov dword [ebp - 4], edi
jne 0x41e4ba
lea eax, [ebp - 4]
push eax
push 1
push 2
push edi
push 1
push 0x16
push 0xffff
call dword [sym.imp.USER32.dll_SendMessageTimeoutW]
push str.NtShutdownSystem
push str.NTDLL
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, eax
xor eax, eax
inc eax
cmp ecx, edi
je 0x41e4e6
xor eax, eax
cmp dword [ebp + 8], edi
sete al
inc eax
push eax
call ecx
pop edi
pop esi
leave
ret
Function at 0x427378
Capabilities:
Acquire debug privileges

Disassembly:
cmp byte [esp + 4], 0
push esi
mov esi, ecx
mov byte [esi], 0
je 0x4273a6
test byte [0x4971a8], 4
jne 0x4273a6
push 2
mov byte [esi], 1
or byte [0x4971a8], 4
push str.SeDebugPrivilege
call fcn.0040d55a
pop ecx
pop ecx
mov eax, esi
pop esi
ret 4

Function at 0x428081
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ax, word [0x496b68]
push esi
xor esi, esi
cmp ax, si
jne 0x4280ad
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [0x496d5c]
jmp 0x4280f5
push esi
lea ecx, [ebp - 4]
push ecx
push esi
movzx eax, ax
or eax, 0x20019
push eax
push esi
push esi
push esi
push dword [ebp + 0xc]
mov dword [ebp - 4], esi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp eax, esi
jne 0x4280f5
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
leave
ret

Function at 0x4280f8
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ax, word [0x496b68]
push esi
xor esi, esi
cmp ax, si
jne 0x428124
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [0x496fd0]
jmp 0x42816c
push esi
lea ecx, [ebp - 4]
push ecx
push esi
movzx eax, ax
or eax, 0x20006
push eax
push esi
push esi
push esi
push dword [ebp + 0xc]
mov dword [ebp - 4], esi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp eax, esi
jne 0x42816c
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
leave
ret

Function at 0x42816f
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ax, word [0x496b68]
test ax, ax
jne 0x42818f
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [0x496fd4]
leave
ret
and dword [ebp - 4], 0
movzx eax, ax
lea ecx, [ebp - 4]
push ecx
or eax, 2
push eax
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4281cb
push esi
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
leave
ret
Function at 0x428779
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [0x497030], 0
push edi
mov edi, ecx
jne 0x4289a8
and dword [ebp - 4], 0
test byte [0x4971a8], 4
jne 0x4287af
or byte [0x4971a8], 8
push 2
push str.SeDebugPrivilege
call fcn.0040d55a
pop ecx
pop ecx
push esi
lea eax, [ebp - 4]
push eax
push 0x49702c
mov esi, str.WS2_32.DLL
push esi
push str.WSAStartup
call fcn.004282c3
lea eax, [ebp - 4]
push eax
push 0x497034
push esi
push str.shutdown
call fcn.004282c3
lea eax, [ebp - 4]
push eax
push 0x497038
push esi
push str.closesocket
call fcn.004282c3
lea eax, [ebp - 4]
push eax
push 0x49703c
push esi
push str.connect
call fcn.004282c3
add esp, 0x40
lea eax, [ebp - 4]
push eax
push 0x497040
push esi
push str.send
call fcn.004282c3
lea eax, [ebp - 4]
push eax
push 0x497044
push esi
push str.select
call fcn.004282c3
lea eax, [ebp - 4]
push eax
push 0x497048
push esi
push str.recvfrom
call fcn.004282c3
lea eax, [ebp - 4]
push eax
push 0x49704c
push esi
push str.sendto
call fcn.004282c3
add esp, 0x40
lea eax, [ebp - 4]
push eax
push 0x497050
push esi
push str.bind
call fcn.004282c3
lea eax, [ebp - 4]
push eax
push 0x497054
push esi
push str.listen
call fcn.004282c3
lea eax, [ebp - 4]
push eax
push 0x497058
push esi
push str.accept
call fcn.004282c3
lea eax, [ebp - 4]
push eax
push 0x497060
push esi
push str.getsockname
call fcn.004282c3
add esp, 0x40
lea eax, [ebp - 4]
push eax
push 0x49705c
push esi
push str.getpeername
call fcn.004282c3
lea eax, [ebp - 4]
push eax
push 0x497064
push esi
push str.ioctlsocket
call fcn.004282c3
lea eax, [ebp - 4]
push eax
push 0x497068
push esi
push str.setsockopt
call fcn.004282c3
lea eax, [ebp - 4]
push eax
push 0x49706c
push esi
push str.ntohl
call fcn.004282c3
add esp, 0x40
lea eax, [ebp - 4]
push eax
push 0x497070
push esi
push str.htonl
call fcn.004282c3
lea eax, [ebp - 4]
push eax
push 0x497074
push esi
push str.htons
call fcn.004282c3
lea eax, [ebp - 4]
push eax
push 0x497078
push esi
push str.inet_addr
call fcn.004282c3
lea eax, [ebp - 4]
push eax
push 0x49707c
push esi
push str.gethostbyname
call fcn.004282c3
add esp, 0x40
lea eax, [ebp - 4]
push eax
push 0x497080
push esi
push str.inet_ntoa
call fcn.004282c3
lea eax, [ebp - 4]
push eax
push 0x497084
push esi
push str.WSAGetLastError
call fcn.004282c3
lea eax, [ebp - 4]
push eax
push 0x497088
push esi
push str.__WSAFDIsSet
call fcn.004282c3
lea eax, [ebp - 4]
push eax
push 0x497030
push esi
push str.socket
call fcn.004282c3
add esp, 0x40
pop esi
mov eax, edi
pop edi
leave
ret
Function at 0x428fcb
Capabilities:
Log keystrokes

Disassembly:
push esi
push edi
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov esi, dword [sym.imp.USER32.dll_IsWindow]
mov edi, eax
push edi
call esi
test eax, eax
je 0x429036
cmp edi, dword [esp + 0xc]
je 0x429036
mov eax, dword [0x49715c]
cmp eax, edi
je 0x429036
push ebx
push ebp
push eax
call esi
mov ebx, dword [sym.imp.USER32.dll_AttachThreadInput]
mov esi, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
xor ebp, ebp
test eax, eax
je 0x42901d
push ebp
push ebp
push dword [0x49715c]
call esi
push eax
push ebp
push dword [esp + 0x20]
call esi
push eax
call ebx
push 1
push ebp
push edi
mov dword [0x49715c], edi
call esi
push eax
push ebp
push dword [esp + 0x20]
call esi
push eax
call ebx
pop ebp
pop ebx
pop edi
pop esi
ret

Function at 0x42957a
Capabilities:
Find taskbar

Disassembly:
push 0
push str.Shell_TrayWnd
call dword [sym.imp.USER32.dll_FindWindowA]
push 0
push str.TrayNotifyWnd
push 0
push eax
call dword [sym.imp.USER32.dll_FindWindowExA]
ret

Function at 0x429815
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
mov edi, dword [ebp + 0x10]
test edi, edi
mov esi, ecx
jne 0x429826
lea edi, [ebp + 0x10]
mov eax, dword [esi + 8]
cmp eax, dword [esi + 0xc]
jl 0x429852
and dword [esi + 8], 0
and dword [ebp + 0x10], 0
push 0
lea eax, [ebp + 0x10]
push eax
push 0x1000
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp + 0x10]
mov dword [esi + 0xc], eax
mov eax, dword [esi + 8]
cmp eax, dword [esi + 0xc]
jge 0x429872
lea ecx, [eax + 1]
mov dword [esi + 8], ecx
mov ecx, dword [esi + 4]
mov al, byte [eax + ecx]
mov ecx, dword [ebp + 8]
mov byte [ecx], al
xor eax, eax
inc eax
mov dword [edi], eax
jmp 0x429877
and dword [edi], 0
xor eax, eax
pop edi
pop esi
pop ebp
ret 0xc

Function at 0x429c34
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push edi
xor edi, edi
push edi
lea eax, [ebp - 4]
push eax
push 8
lea eax, [ebp - 0x10]
push eax
push edi
push edi
push 0x7405c
push dword [ebp + 8]
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], edi
call ebx
push edi
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 0x18
push esi
push edi
push edi
push 0x70000
push dword [ebp + 8]
mov dword [esi], edi
mov dword [esi + 4], edi
mov dword [esi + 0x18], edi
mov dword [esi + 0x1c], edi
call ebx
cmp dword [ebp - 8], edi
je 0x429c93
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
jmp 0x429cb0
mov eax, dword [esi + 0x14]
mul dword [esi + 0x10]
push edi
push dword [esi + 0xc]
push edx
push eax
call fcn.0046d9d0
push dword [esi + 4]
push dword [esi]
push edx
push eax
call fcn.0046d9d0
pop edi
pop ebx
leave
ret
Function at 0x429e9b
Capabilities:
Get disk information via ioctl

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 0x10]
xor esi, esi
push 0xc0
push esi
push ebx
mov dword [edi], esi
call fcn.0046c9b0
add esp, 0xc
push esi
lea eax, [ebp + 0x10]
push eax
push 0x100000
push ebx
push esi
push esi
push 0x70050
push dword [ebp + 8]
mov dword [ebp + 0x10], esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x429ee3
mov eax, dword [ebx + 4]
mov dword [edi], eax
mov eax, ebx
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x42a0e3
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push 0
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x42a140
push esi
push edi
call dword [sym.imp.USER32.dll_EmptyClipboard]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [eax + eax + 2]
push esi
push 0x2000
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push esi
push dword [esp + 0x10]
push eax
call fcn.0046cbf0
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
push 0xd
call dword [sym.imp.USER32.dll_SetClipboardData]
pop edi
pop esi
jmp dword [sym.imp.USER32.dll_CloseClipboard]
ret

Function at 0x42a176
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
push esi
push edi
lea eax, [ebp - 4]
push eax
push 0x40
mov esi, ecx
push 0xc
push dword [esi]
lea edi, [esi + 4]
call ebx
lea eax, [ebp - 4]
push eax
push 0x40
push 0x12
push edi
call ebx
push 0x12
push 0x484f3c
push edi
call fcn.0046cbf0
mov ecx, dword [ebp + 8]
lea eax, [edi + 0xe]
sub ecx, eax
sub ecx, 4
mov dword [eax], ecx
mov esi, dword [esi + 0x18]
add esp, 0xc
test esi, esi
je 0x42a1da
push edi
push 0xfffffffffffffffc
push esi
call dword [sym.imp.USER32.dll_SetWindowLongW]
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x42a1da
mov dword [ecx], eax
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x42a840
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 0x14]
and dword [esi], 0
push edi
mov edi, dword [ebp + 0x10]
test edi, edi
mov dword [ebp + 0x14], 0x80
jbe 0x42a8cf
push ebx
mov ebx, 0x200
push dword [ebp + 0x18]
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x42a899
mov eax, dword [ebp - 4]
test eax, eax
jne 0x42a88f
cmp dword [ebp + 0x14], eax
jg 0x42a88c
mov eax, edi
jmp 0x42a88f
dec dword [ebp + 0x14]
add dword [esi], eax
add dword [ebp + 0xc], eax
sub dword [ebp + 0x10], eax
jmp 0x42a8c8
and dword [ebp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x70
jne 0x42a8ce
cmp edi, ebx
jbe 0x42a8ce
cmp dword [ebp + 0x10], ebx
jbe 0x42a8c5
add edi, 0x1ff
shr edi, 1
cmp edi, ebx
jbe 0x42a8c8
and edi, 0xfffffe00
jmp 0x42a8c8
mov edi, dword [ebp + 0x10]
cmp dword [ebp + 0x10], 0
ja 0x42a860
pop ebx
xor eax, eax
cmp eax, dword [esi]
pop edi
sbb eax, eax
neg eax
pop esi
leave
ret

Function at 0x42a94a
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x100
and dword [0x49718c], 0
lea eax, [ebp - 0x100]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardState]
test byte [ebp - 0xef], 0x80
je 0x42a977
or dword [0x49718c], 2
test byte [ebp - 0xf0], 0x80
je 0x42a987
or dword [0x49718c], 4
test byte [ebp - 0xee], 0x80
je 0x42a997
or dword [0x49718c], 1
test byte [ebp - 0xa5], 0x80
je 0x42a9a7
or dword [0x49718c], 8
test byte [ebp - 0xa4], 0x80
je 0x42a9b7
or dword [0x49718c], 8
leave
ret
Function at 0x42b02b
Capabilities:
Get disk information via ioctl

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x474
cmp dword [ebp + 0xc], 2
push ebx
push esi
push edi
jb 0x42b1a4
cmp dword [ebp + 0xc], 3
jbe 0x42b05a
cmp dword [ebp + 0xc], 5
jne 0x42b1a4
mov dword [ebp - 8], 0x481554
jmp 0x42b061
mov dword [ebp - 8], 0x481564
push 0x12
xor esi, esi
push esi
push esi
push dword [ebp - 8]
call dword [0x496d98]
cmp eax, 0xffffffff
mov dword [ebp + 0xc], eax
je 0x42b1a4
push 0x1c
pop ecx
xor eax, eax
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], esi
lea edi, [ebp - 0x28]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov edi, dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
lea eax, [ebp - 0x30]
push eax
push esi
push dword [ebp - 8]
mov dword [ebp - 0xc], esi
push esi
push dword [ebp + 0xc]
mov dword [ebp - 4], esi
mov dword [ebp - 0x58], ecx
call edi
test eax, eax
je 0x42b19b
mov ebx, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
lea eax, [ebp - 0x58]
push eax
push dword [ebp - 0xc]
push dword [ebp - 8]
push esi
push dword [ebp + 0xc]
call edi
push esi
lea eax, [ebp - 4]
push eax
push esi
push esi
lea eax, [ebp - 0x58]
push eax
push dword [ebp + 0xc]
mov dword [ebp - 4], esi
call ebx
cmp dword [ebp - 4], esi
je 0x42b180
cmp dword [ebp - 4], 0x400
ja 0x42b180
push 0x1c
lea eax, [ebp - 0x74]
push esi
push eax
mov dword [ebp - 0x474], 6
call fcn.0046c9b0
add esp, 0xc
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
lea eax, [ebp - 0x474]
push eax
lea eax, [ebp - 0x58]
push eax
push dword [ebp + 0xc]
mov dword [ebp - 0x74], 0x1c
call ebx
test eax, eax
je 0x42b180
push esi
push esi
push 3
push esi
push 3
push esi
lea eax, [ebp - 0x470]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
je 0x42b180
push esi
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x3c]
push ecx
push esi
push esi
push 0x2d1080
push eax
mov dword [ebp - 0x14], esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x42b177
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 0x38]
je 0x42b1ab
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [ebp - 0xc]
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0xc]
push dword [ebp - 8]
push esi
push dword [ebp + 0xc]
call edi
test eax, eax
jne 0x42b0ba
push dword [ebp + 0xc]
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 0xc]
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov eax, dword [ebp - 0x60]
jmp 0x42b1a6

Function at 0x42b31d
Capabilities:
Set environment variable

Disassembly:
push esi
push dword [esp + 0xc]
mov esi, dword [esp + 0xc]
push esi
call fcn.0042b2cd
push dword [esp + 0xc]
add esi, 4
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
pop esi
ret 8
Function at 0x42b64e
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
add eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x10]
adc ecx, dword [ebp + 0x1c]
push esi
mov esi, dword [ebp + 0x14]
push edi
push dword [ebp + 0x20]
push eax
push ecx
push esi
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov edi, eax
test edi, edi
je 0x42b69c
push 0
push dword [ebp + 0x18]
and esi, 4
push dword [ebp + 0x1c]
or esi, 8
shr esi, 1
push esi
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebp
ret

Function at 0x42b9c6
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
movzx edx, word [ebp + 0x1c]
mov eax, dword [ebp + 0x1c]
and eax, 0x1000000
test edx, edx
mov dword [ebp - 0xc], eax
mov dword [ebp + 0x1c], edx
jne 0x42b9fb
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push 8
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
leave
ret
mov eax, dword [ebp + 0x10]
and dword [ebp - 4], 0
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov bl, dl
add eax, esi
xor bl, 0xa
cmp esi, eax
push edi
mov dword [ebp - 8], eax
jae 0x42ba7a
mov edi, dword [ebp + 0x14]
jmp 0x42ba1e
mov edx, dword [ebp + 0x1c]
mov ecx, esi
jmp 0x42ba29
mov al, byte [esi]
inc esi
cmp bl, al
je 0x42ba2e
cmp esi, dword [ebp - 8]
jb 0x42ba22
cmp ecx, esi
mov eax, ecx
jae 0x42ba3b
xor byte [eax], dl
inc eax
cmp eax, esi
jb 0x42ba34
mov eax, dword [ebp + 0x18]
sub eax, dword [ebp - 4]
push eax
push edi
mov eax, esi
sub eax, ecx
push eax
push ecx
push 8
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jg 0x42ba62
cmp dword [ebp - 0xc], 0
je 0x42ba75
xor eax, eax
jmp 0x42ba7d
add dword [ebp - 4], eax
dec eax
js 0x42ba75
inc eax
mov cx, word [ebp + 0x1c]
xor word [edi], cx
inc edi
inc edi
dec eax
jne 0x42ba69
cmp esi, dword [ebp - 8]
jb 0x42ba1b
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x42ce02
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
push esi
mov esi, dword [ebp + 8]
cmp word [esi], 0x7a
push edi
jbe 0x42ceb6
cmp word [esi + 2], 0x3a
jne 0x42ceb6
cmp word [esi + 4], 0
jne 0x42ceb6
and word [ebp - 0x208], 0
lea eax, [ebp - 0x208]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ax, word [esi]
cmp ax, word [ebp - 0x208]
jne 0x42ce8f
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
inc edi
cmp edi, 4
jbe 0x42ce8f
cmp dword [ebp + 0xc], edi
jae 0x42ce74
mov eax, edi
jmp 0x42cec6
lea eax, [edi + edi]
push eax
lea eax, [ebp - 0x208]
push eax
push dword [ebp + 0x10]
call fcn.0046cbf0
add esp, 0xc
lea eax, [edi - 1]
jmp 0x42cec6
push 4
pop eax
cmp dword [ebp + 0xc], eax
jb 0x42cec6
mov eax, dword [ebp + 0x10]
mov cx, word [esi]
and word [eax + 6], 0
push 3
mov word [eax], cx
mov word [eax + 2], 0x3a
mov word [eax + 4], 0x5c
pop eax
jmp 0x42cec6
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
pop edi
pop esi
leave
ret

Function at 0x42e0d5
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov edx, dword [ebp + 0xc]
push esi
xor esi, esi
cmp edx, esi
push edi
mov dword [ebp - 4], esi
jne 0x42e129
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push esi
push esi
push 3
push esi
push 3
push 0x80000000
push dword [ebp + 8]
call edi
cmp eax, 0xffffffff
jne 0x42e107
xor eax, eax
cmp eax, esi
mov dword [ebp - 4], eax
mov edx, eax
jne 0x42e129
push esi
push esi
push 3
push esi
push 3
push esi
push dword [ebp + 8]
call edi
cmp eax, 0xffffffff
jne 0x42e124
xor eax, eax
mov dword [ebp - 4], eax
mov edx, eax
cmp edx, 0xffffffff
je 0x42e173
cmp edx, esi
je 0x42e173
push 9
pop ecx
xor eax, eax
push 0x28
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
lea edi, [ebp - 8]
stosd dword es:[edi], eax
mov dword [ebp - 0x38], esi
lea edi, [ebp - 0x34]
rep stosd dword es:[edi], eax
pop eax
push esi
lea ecx, [ebp + 0xc]
push ecx
push eax
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x38]
push eax
push 0xc
lea eax, [ebp - 0x10]
push eax
push 0x2d1400
push edx
mov dword [ebp + 0xc], esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov esi, dword [ebp - 0x1c]
jmp 0x42e176
or esi, 0xffffffff
lea ecx, [ebp - 4]
call fcn.00402a26
pop edi
mov eax, esi
pop esi
leave
ret