joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40e5ee
Capabilities:
Acquire debug privileges

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

Function at 0x40e622
Capabilities:
Acquire debug privileges

Disassembly:
cmp byte [ecx], 0
je 0x40e63c
and byte [0x48b16c], 0xfb
push 4
push str.SeDebugPrivilege
call fcn.0040c09f
pop ecx
pop ecx
ret

Function at 0x40e63d
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
mov ebx, 0x48b5d4
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
and dword [ebp - 8], 0
lea eax, [ebp - 8]
push eax
call fcn.00402e81
mov edi, dword [sym.imp.SHLWAPI.dll_StrChrW]
pop ecx
push 0x5c
push dword [ebp + 8]
mov byte [ebp - 4], al
jmp 0x40e695
push dword [ebp + 8]
and word [esi], 0
call fcn.0046132c
test eax, eax
pop ecx
jne 0x40e68a
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov word [esi], 0x5c
push 0x5c
add esi, 2
push esi
call edi
mov esi, eax
test esi, esi
jne 0x40e66f
cmp byte [ebp - 4], al
je 0x40e6ab
push dword [ebp - 8]
call fcn.00402e92
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
xor eax, eax
pop esi
inc eax
pop ebx
leave
ret

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

Disassembly:
push esi
mov esi, ecx
cmp dword [esi + 8], 0
jne 0x40e746
push dword [esp + 0xc]
push dword [esp + 0xc]
call fcn.0040a3ba
test eax, eax
je 0x40e746
call fcn.0040a441
test eax, eax
mov dword [esp + 0xc], eax
jne 0x40e74d
xor eax, eax
jmp 0x40e80f
mov ecx, dword [esi + 0x10]
mov ecx, dword [ecx + 0x34]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push ebp
push edi
push 0x40
mov ebp, 0x3000
push ebp
push eax
push ecx
call ebx
mov edi, eax
test edi, edi
jne 0x40e785
push 0x40
push ebp
push dword [esp + 0x20]
push eax
call ebx
mov edi, eax
test edi, edi
jne 0x40e785
xor eax, eax
jmp 0x40e80c
push dword [esp + 0x14]
mov ecx, esi
push edi
call fcn.0040a4b2
mov eax, dword [esi + 0x10]
xor ebx, ebx
cmp dword [eax + 0xa0], ebx
jbe 0x40e7b2
cmp dword [eax + 0xa4], ebx
jbe 0x40e7b2
push edi
mov ecx, esi
call fcn.0040a27c
test eax, eax
je 0x40e77e
push edi
mov ecx, esi
call fcn.0040a2db
test eax, eax
jne 0x40e7cd
push 0x8000
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x40e77e
mov eax, dword [esi + 0x10]
mov dword [eax + 0x34], edi
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 0x28]
push ebx
xor ebp, ebp
inc ebp
push ebp
add eax, edi
push edi
mov dword [esi + 4], eax
call eax
test eax, eax
jne 0x40e805
push ebx
push ebx
push edi
call dword [esi + 4]
push 0x8000
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [esi + 4], ebx
jmp 0x40e77e
mov dword [esi], ebp
mov dword [esi + 8], edi
mov eax, ebp
pop edi
pop ebp
pop ebx
pop esi
ret 8
Function at 0x40e8d9
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push 0x40
lea eax, [ebp - 0x40]
push 0
push eax
call fcn.00461780
add esp, 0xc
lea eax, [ebp - 0x40]
push eax
mov dword [ebp - 0x40], 0x40
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
cmp dword [ebp + 8], 0
je 0x40e90e
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
leave
ret
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
leave
ret

Function at 0x40e9a5
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
je 0x40e9d1
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
jmp 0x40e9d3
xor edi, edi
test esi, esi
je 0x40e9e3
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
jmp 0x40e9e5
xor eax, eax
test byte [ebp + 0x18], 1
je 0x40e9fa
test eax, eax
je 0x40eaa8
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
je 0x40eaa8
test edi, edi
jle 0x40eaa8
test byte [ebp + 0x18], 2
jne 0x40ea6a
push 0
push edi
push ebx
call fcn.00426ea7
add esp, 0xc
test al, al
je 0x40ea6a
test byte [ebp + 0x18], 0x20
je 0x40ea2c
test al, 2
jne 0x40eaa8
push 0
lea ecx, [ebp - 0xc]
call fcn.0042a0e9
mov esi, dword [ebp + 0x14]
lea eax, [ebp - 0xc]
push esi
push eax
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
call fcn.0042ebe9
mov eax, dword [esi + 4]
pop ecx
pop ecx
add eax, 6
push eax
mov ecx, esi
call fcn.0042459d
and dword [ebp - 0xc], 0
lea ecx, [ebp - 0xc]
call fcn.00424686
jmp 0x40ea8a
mov esi, dword [ebp + 0x14]
lea eax, [edi + 6]
push eax
mov ecx, esi
call fcn.0042459d
push edi
push ebx
push dword [esi]
mov dword [esi + 8], edi
mov dword [esi + 4], edi
call fcn.00461a50
add esp, 0xc
mov eax, dword [esi + 4]
lea ecx, [eax + 6]
mov dword [esi + 8], ecx
mov ecx, dword [esi]
push 6
add ecx, eax
push 0
push ecx
call fcn.00461780
mov eax, dword [esi]
add esp, 0xc
jmp 0x40eaaa
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40eaaf
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push 3
push 0x80000000
push dword [ebp + 8]
lea ecx, [ebp - 8]
mov dword [ebp - 8], ebx
call fcn.00403993
cmp dword [ebp - 8], ebx
jne 0x40eae0
push 0xfffffffffffffffe
pop esi
jmp 0x40eba3
push edi
push dword [ebp - 8]
call fcn.00429d9b
push ebx
push ebx
push ebx
push dword [ebp - 8]
mov esi, eax
mov dword [ebp - 0x10], esi
call fcn.0042572e
add esp, 0x14
add esi, 0xc
push esi
mov esi, dword [ebp + 0xc]
mov ecx, esi
call fcn.0042459d
mov edi, dword [esi]
push ebx
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x10]
mov dword [ebp - 0xc], ebx
push edi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0xc]
push 6
add eax, edi
push ebx
push eax
call fcn.00461780
mov eax, dword [ebp - 0xc]
push dword [ebp + 0x10]
mov dword [esi + 8], eax
push eax
push edi
mov dword [esi + 4], eax
call fcn.00426ea7
add esp, 0x18
cmp al, 1
mov byte [ebp - 1], al
pop edi
jne 0x40eb8c
push dword [0x48ae9c]
lea ecx, [ebp - 0x1c]
push esi
call fcn.00409623
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x1c]
push esi
push eax
call fcn.0042ebe9
push dword [esi]
call fcn.004617f0
add esp, 0xc
add eax, 6
push eax
mov ecx, esi
call fcn.0042459d
lea ecx, [ebp - 0x1c]
call fcn.00424686
push 1
push esi
call fcn.00433ac4
cmp byte [ebp - 1], bl
pop ecx
pop ecx
jge 0x40eba0
or esi, 0xffffffff
jmp 0x40eba3
mov esi, dword [esi + 4]
lea ecx, [ebp - 8]
call fcn.00402905
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4119ac
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.0042460b
lea ecx, [ebp - 4]
call fcn.0042460b
push 0x2c
push dword [ebp + 8]
call dword [sym.imp.SHLWAPI.dll_StrChrW]
mov edi, eax
test edi, edi
je 0x411a8d
and word [edi], 0
push ebx
push 1
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov esi, 0x48aec0
mov ecx, esi
call fcn.0043dcfa
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.0043dcfa
cmp byte [ebp + 0xc], 0
mov esi, dword [ebp - 4]
mov dword [ebp - 0xc], esi
je 0x411a44
lea ecx, [ebp + 8]
call fcn.0040e58b
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 str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push 0x80000002
jmp 0x411a80
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.00425503
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.00425503
add esp, 0x18
xor esi, esi
pop ebx
jmp 0x411a90
xor esi, esi
inc esi
lea ecx, [ebp - 4]
call fcn.00424686
lea ecx, [ebp - 8]
call fcn.00424686
pop edi
mov eax, esi
pop esi
leave
ret
Function at 0x412131
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
mov ebx, ecx
push 0x41c
lea ecx, [ebp - 4]
call fcn.0042465d
mov eax, dword [ebp - 4]
mov esi, eax
push esi
xor edi, edi
push 0x208
mov word [eax], di
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push esi
push str.__OldDir
mov ecx, ebx
call fcn.00428e1b
mov esi, dword [ebp + 8]
cmp esi, edi
je 0x41217f
cmp word [esi], 0x2a
jne 0x4121a1
inc esi
inc esi
mov dword [ebp + 8], esi
je 0x4121a1
push 0x104
push dword [ebp - 4]
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp esi, edi
je 0x41219b
push esi
lea ecx, [ebp - 4]
call fcn.004246c0
mov eax, dword [ebp - 4]
mov dword [ebp + 8], eax
lea ecx, [ebp + 8]
call fcn.0040e58b
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov dword [ebp - 8], edi
call fcn.0040c061
pop ecx
pop ecx
mov edi, eax
push 0x20
push edi
call dword [sym.imp.SHLWAPI.dll_StrChrW]
test eax, eax
push edi
je 0x412235
call fcn.0046176a
mov esi, eax
pop ecx
lea eax, [esi + 9]
push eax
lea ecx, [ebp + 8]
call fcn.0042465d
mov eax, dword [ebp + 8]
mov word [eax], 0x22
lea eax, [esi + 1]
push eax
mov eax, dword [ebp + 8]
add eax, 2
push edi
push eax
call fcn.0040391f
mov eax, dword [ebp + 8]
mov word [eax + esi*2 + 2], 0x22
mov eax, dword [ebp + 8]
and word [eax + esi*2 + 4], 0
add esp, 0xc
push dword [ebp + 8]
mov ecx, ebx
push 0x477f94
call fcn.00428e1b
push dword [ebp + 8]
mov ecx, ebx
push 0x477f98
call fcn.00428e1b
lea ecx, [ebp + 8]
call fcn.00424686
jmp 0x41224e
push 0x477f94
mov ecx, ebx
call fcn.00428e1b
push edi
push 0x477f98
mov ecx, ebx
call fcn.00428e1b
push 0x5c
push 0
push edi
call dword [sym.imp.SHLWAPI.dll_StrRChrW]
mov esi, eax
and word [esi + 2], 0
cmp dword [ebp + 0xc], 0
jne 0x41226d
push edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
and word [esi], 0
push edi
push 0x477f80
mov ecx, ebx
call fcn.00428e1b
push edi
push 0x477f84
mov ecx, ebx
call fcn.00428e1b
call fcn.0040a118
and word [edi + 4], 0
push edi
push 0x477f6c
mov ecx, ebx
call fcn.00428e1b
push edi
push 0x477f70
mov ecx, ebx
call fcn.00428e1b
lea ecx, [ebp - 8]
call fcn.00424686
lea ecx, [ebp - 4]
call fcn.00424686
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 8
Function at 0x4128e6
Capabilities:
Log keystrokes via application hook

Disassembly:
sub esp, 0x1c
push ebx
push esi
mov ebx, 0x48b5d4
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor esi, esi
test byte [esp + 0x2e], 1
jne 0x41290e
cmp dword [0x48ae68], esi
jne 0x41290e
mov dword [0x48ae64], esi
movzx eax, byte [esp + 0x2c]
inc dword [0x48ae68]
cmp dword [0x48ae60], esi
mov dword [esp + 0x2c], eax
jne 0x41294f
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
push 0x4127e7
push 0xd
call dword [sym.imp.USER32.dll_SetWindowsHookExW]
cmp eax, esi
mov dword [0x48ae60], eax
jne 0x41294f
dec dword [0x48ae68]
jmp 0x412a48
push ebp
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebp
mov esi, dword [esp + 0x30]
mov edi, eax
add edi, esi
cmp esi, 0x3e8
jb 0x412978
push 0
call fcn.004261c6
pop ecx
cmp dword [esp + 0x34], 2
jne 0x412a1c
test esi, esi
jne 0x412a1c
push 0xa
pop esi
jmp 0x412a1c
cmp dword [esp + 0x34], 2
je 0x4129a8
call ebp
mov esi, edi
sub esi, eax
test esi, esi
jle 0x412a29
cmp byte [0x4892b4], 0
jle 0x412a29
push 0xa
pop eax
cmp esi, eax
ja 0x4129ba
mov eax, esi
push 0x4bf
push eax
xor eax, eax
push eax
push eax
push eax
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
jmp 0x412a13
cmp dword [0x48ae64], 0
jne 0x412a29
cmp dword [esp + 0x34], 2
je 0x4129e7
call ebp
mov esi, edi
sub esi, eax
test esi, esi
jle 0x412a1c
push 1
xor eax, eax
push eax
push eax
push eax
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x412a1c
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
cmp byte [0x4892b4], 0
jg 0x4129cd
cmp dword [0x48ae64], 0
je 0x412993
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
dec dword [0x48ae68]
mov eax, dword [0x48ae64]
pop edi
pop ebp
jne 0x412a46
and dword [0x48ae64], 0
mov esi, eax
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
pop esi
pop ebx
add esp, 0x1c
ret
Function at 0x4147aa
Capabilities:
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
xor ebx, ebx
push 0xf003f
push ebx
push ebx
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
cmp eax, ebx
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xc], eax
je 0x414857
mov ecx, dword [ebp + 8]
xor eax, eax
cmp word [ecx], 0x21
sete al
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x4147f4
add dword [ebp + 8], 2
lea ecx, [ebp + 8]
call fcn.0040e58b
push edi
push dword [ebp + 8]
call fcn.00412d51
pop ecx
push 0x30
push eax
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
xor eax, eax
cmp edi, eax
je 0x414844
cmp dword [ebp - 8], eax
je 0x414828
lea eax, [ebp - 0x28]
xor ebx, ebx
push eax
inc ebx
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
jmp 0x414838
push eax
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
mov ebx, eax
test ebx, ebx
jne 0x41483d
inc ebx
call esi
mov dword [ebp - 4], eax
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test ebx, ebx
pop edi
je 0x414857
mov eax, dword [ebp - 4]
jmp 0x414859
call esi
pop esi
pop ebx
leave
ret
Function at 0x417d15
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push ebx
call fcn.0046176a
mov esi, eax
pop ecx
add esi, 0x84
lea eax, [esi + 0x325]
push eax
lea ecx, [ebp - 0xc]
call fcn.0042465d
cmp word [ebx], 0x5c
mov eax, dword [ebp - 0xc]
mov dword [ebp - 4], eax
lea edi, [eax + esi*2]
mov dword [ebp - 8], 2
jne 0x417dee
and dword [ebp + 8], 0
push 0x2c
push ebx
call dword [sym.imp.SHLWAPI.dll_StrChrW]
mov esi, eax
test esi, esi
je 0x417d84
and word [esi], 0
inc esi
inc esi
push esi
call dword [sym.imp.USER32.dll_CharUpperW]
movzx esi, word [esi]
test si, si
je 0x417d84
mov dword [ebp + 8], esi
push edi
inc ebx
push 0x324
inc ebx
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
cmp word [edi], 0
mov esi, edi
je 0x417e55
mov ax, word [ebp + 8]
cmp word [esi], ax
jb 0x417ddb
mov edi, dword [ebp - 4]
push ebx
push esi
push str._s_sFonts
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
push edi
call fcn.0046132c
add esp, 0x14
test eax, eax
je 0x417ddb
push 0x477ccc
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push edi
call fcn.004118f4
pop ecx
mov dword [ebp - 8], eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2 + 2]
cmp word [esi], 0
jne 0x417d9e
jmp 0x417e55
push ebx
call fcn.00412d51
and dword [ebp + 8], 0
mov esi, eax
push esi
call fcn.0046132c
test eax, eax
pop ecx
pop ecx
je 0x417e1f
push esi
lea ecx, [ebp + 8]
call fcn.00424710
push 0x477ccc
lea ecx, [ebp + 8]
call fcn.004246c0
mov esi, dword [ebp + 8]
push esi
push 0x478598
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_wsprintfW]
push esi
call fcn.00409e39
push esi
call fcn.0046132c
add esp, 0x14
test eax, eax
je 0x417e4d
push dword [ebp - 4]
call fcn.004118f4
pop ecx
mov dword [ebp - 8], eax
lea ecx, [ebp + 8]
call fcn.00424686
lea ecx, [ebp - 0xc]
call fcn.00424686
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x418ae9
Capabilities:
Delete file
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
push ebx
push esi
mov dword [ebp - 0xc], ecx
push edi
lea ecx, [ebp - 4]
call fcn.0042460b
push dword [ebp + 8]
lea ecx, [ebp - 0x1c]
call fcn.0042a183
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 0x10]
and dword [ebp + 0x10], 1
push 0x476d74
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x18], eax
and esi, 0xfffffffe
and edi, 0x40
call fcn.0042a183
push dword [ebp - 0xc]
lea ecx, [ebp - 0x78]
call fcn.0040a005
push dword [ebp - 0xc]
lea ecx, [ebp - 0x78]
call fcn.0040a5fd
push dword [ebp + 8]
dec dword [ebp - 0x64]
lea ecx, [ebp - 8]
call fcn.0042a183
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x14], ebx
call fcn.0042921d
mov eax, dword [ebp - 0x14]
add esp, 0xc
cmp eax, ebx
je 0x418b72
mov word [eax - 2], bx
push dword [ebp - 8]
lea ecx, [ebp - 0x78]
push 0x477f80
call fcn.00428e1b
push dword [ebp - 8]
lea ecx, [ebp - 0x78]
push 0x477f84
call fcn.00428e1b
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x18]
lea eax, [ebp - 4]
push ebx
push eax
call fcn.004182a4
add esp, 0x14
push ebx
lea ecx, [ebp - 0x10]
call fcn.0042a1b7
mov eax, dword [ebp - 4]
push 0x48b5d4
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x40], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp - 0xc]
push 0xffffffffffffffff
push ebx
push 0x477ff4
call fcn.0040e8be
cmp eax, ebx
je 0x418be8
push dword [eax]
push str.CurDir
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push 0x48b5d4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ecx, [ebp - 8]
call fcn.00424686
push ebx
lea ecx, [ebp - 0x78]
call fcn.0040e851
lea ecx, [ebp - 0x44]
call fcn.00424686
cmp dword [ebp + 0x10], ebx
je 0x418c1a
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x20], ebx
jne 0x418c24
xor ebx, ebx
inc ebx
jmp 0x418c6e
cmp byte [0x4892a8], bl
jge 0x418c33
mov byte [0x4892a8], 1
push dword [ebp + 0xc]
lea eax, [ebp - 4]
push dword [ebp + 0x14]
push eax
call fcn.00418a37
push esi
push dword [ebp + 0x18]
mov dword [ebp + 0x10], eax
lea eax, [ebp - 4]
push eax
call fcn.0040b814
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
add esp, 0x18
push dword [ebp + 0x10]
mov dword [ebp - 4], ebx
push edi
push dword [ebp - 0x18]
push dword [ebp + 0xc]
push eax
call fcn.004574bd
lea ecx, [ebp - 0x10]
call fcn.00424686
lea ecx, [ebp - 0x1c]
call fcn.00424686
lea ecx, [ebp - 4]
call fcn.00424686
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 0x14
Function at 0x41bd08
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov ecx, dword [ebp + 8]
mov ax, word [ecx]
cmp ax, 0x40
jne 0x41bd32
add ecx, 2
push ecx
call fcn.00412d51
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call fcn.0040a118
jmp 0x41bd78
cmp ax, 0x23
jne 0x41bd44
add ecx, 2
push ecx
call fcn.00410564
pop ecx
jmp 0x41bd78
xor edx, edx
cmp ax, dx
je 0x41bd54
push ecx
call fcn.0041bcd7
pop ecx
leave
ret
push esi
push edi
push 0x10
pop ecx
mov esi, str.PATH____SystemRoot_SYSTEM32
lea edi, [ebp - 0x44]
rep movsd dword es:[edi], dword [esi]
push edx
push edx
push edx
lea eax, [ebp - 0x44]
push eax
mov ecx, 0x48aec0
movsw word es:[edi], word [esi]
call fcn.0041e84e
pop edi
pop esi
xor eax, eax
leave
ret
Function at 0x41c211
Capabilities:
Create directory

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi]
cmp word [eax], 0
jne 0x41c2c4
push ebx
push ebp
push edi
push dword [esp + 0x14]
call fcn.0046176a
pop ecx
push dword [esp + 0x14]
mov ecx, esi
mov edi, eax
call fcn.00424710
lea eax, [edi + 0x3c]
push eax
mov ecx, esi
call fcn.00424699
push dword [esi]
call fcn.0046132c
test eax, eax
pop ecx
jne 0x41c259
push dword [esi]
call fcn.0041bcd7
pop ecx
and dword [esp + 0x14], 0
lea ebx, [edi + edi]
mov edi, dword [esi]
add edi, ebx
call fcn.004264c1
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add ebp, eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push str.PECMDDEVI_lu_lu.tmp.dir
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [esi]
add esp, 0x10
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x41c2a5
inc dword [esp + 0x14]
cmp dword [esp + 0x14], 0x64
jl 0x41c261
push dword [esi]
call fcn.0046176a
pop ecx
mov ecx, dword [esi]
add eax, eax
mov word [eax + ecx], 0x5c
mov ecx, dword [esi]
and word [eax + ecx + 2], 0
mov eax, dword [esi]
pop edi
pop ebp
pop ebx
pop esi
ret 4
Function at 0x41d97e
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push 0x20a
lea ecx, [ebp - 4]
call fcn.0042465d
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.004246c0
mov cl, byte [ebp + 0xc]
test cl, 0x20
mov eax, str.unknown
je 0x41d9d5
mov eax, 0x475e5c
test cl, 0x10
je 0x41d9df
mov eax, str.reboot
test cl, 2
je 0x41d9e9
mov eax, str.logout
test cl, 4
je 0x41d9f3
mov eax, str.suspend
test cl, 8
je 0x41d9fd
mov eax, str.hiber
test cl, 0x40
je 0x41da07
mov eax, str.poweroff
test cl, cl
jns 0x41da10
mov eax, str.lock
push eax
lea ecx, [ebp - 4]
call fcn.004246c0
push 0x476010
lea ecx, [ebp - 4]
call fcn.004246c0
push dword [ebp + 8]
lea ecx, [ebp - 4]
call fcn.004246c0
push dword [ebp - 4]
mov ecx, 0x48aec0
call fcn.00418c8f
lea ecx, [ebp - 4]
call fcn.00424686
leave
ret

Function at 0x41da48
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.0041d97e
push 2
push str.SeShutdownPrivilege
and esi, 0x4000
call fcn.0040c09f
push 2
push str.SeRemoteShutdownPrivilege
call fcn.0040c09f
add esp, 0x18
call fcn.0040b038
xor edi, edi
test byte [ebp + 0xc], 1
jne 0x41daac
cmp eax, 0x60002
jb 0x41daac
xor eax, eax
cmp dword [ebp + 8], edi
setne al
push eax
push 1
push edi
push 0x4758e0
push edi
call dword [sym.imp.ADVAPI32.dll_InitiateSystemShutdownW]
cmp esi, edi
mov dword [ebp - 4], edi
jne 0x41dacb
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 0x41daf7
xor eax, eax
cmp dword [ebp + 8], edi
sete al
inc eax
push eax
call ecx
pop edi
pop esi
leave
ret