joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403c1b
Capabilities:
Set registry value

Disassembly:
push esi
push dword [esp + 8]
mov esi, ecx
call dword [sym.imp.mssws.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push dword [esp + 0xc]
push 1
push 0
push dword [esp + 0x1c]
push dword [esi]
call dword [sym.imp.mssws.dll_RegSetValueExW]
pop esi
ret 8

Function at 0x40419d
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4010
call fcn.004086b0
push ebx
push esi
push edi
lea eax, [ebp - 0x4010]
mov esi, ecx
push eax
mov dword [ebp - 0x10], esi
call fcn.004040ab
test eax, eax
jl 0x404306
lea eax, [ebp - 2]
push eax
lea eax, [ebp - 0x4010]
push eax
call fcn.00403f3e
test eax, eax
jne 0x4041e4
mov eax, 0x80020009
jmp 0x404306
mov ecx, esi
call fcn.00404089
lea eax, [ebp - 0x2010]
push eax
mov ecx, esi
call fcn.004040ab
test eax, eax
jl 0x404306
movzx eax, word [ebp - 2]
sub eax, 8
je 0x4042e3
sub eax, 9
je 0x404243
dec eax
dec eax
jne 0x4042f5
lea eax, [ebp - 0xc]
push eax
push 0
push 0
lea eax, [ebp - 0x2010]
push eax
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
push dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push dword [ebp - 0xc]
call fcn.00403c01
jmp 0x4042f5
lea eax, [ebp - 0x2010]
push eax
call dword [sym.imp.mssws.dll_lstrlenW]
test al, 1
mov dword [ebp - 8], eax
jne 0x404288
cdq
sub eax, edx
mov ebx, eax
sar ebx, 1
mov eax, ebx
add eax, 3
and eax, 0xfffffffc
call fcn.004086b0
mov ecx, ebx
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, esp
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
xor edi, edi
cmp esp, edi
mov dword [ebp - 4], esp
jne 0x40428f
mov eax, 0x80004005
jmp 0x404306
cmp dword [ebp - 8], edi
jle 0x4042ca
mov ecx, dword [ebp - 4]
mov eax, edi
cdq
sub eax, edx
sar eax, 1
lea esi, [eax + ecx]
xor eax, eax
mov ax, word [ebp + edi*2 - 0x2010]
push eax
call fcn.00403fd9
mov ecx, edi
and ecx, 1
shl ecx, 2
mov edx, ecx
push 4
pop ecx
sub ecx, edx
shl al, cl
or byte [esi], al
inc edi
cmp edi, dword [ebp - 8]
jl 0x404294
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push ebx
push dword [ebp - 4]
push 3
push 0
push dword [ebp + 0xc]
push eax
call dword [sym.imp.mssws.dll_RegSetValueExW]
jmp 0x4042f5
push dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x2010]
push eax
call fcn.00403c1b
push dword [ebp + 0x10]
mov ecx, dword [ebp - 0x10]
call fcn.004040ab
test eax, eax
jl 0x404306
xor eax, eax
lea esp, [ebp - 0x401c]
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x404955
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, 0x40ccbc
call sub.MSVCRT.dll__EH_prolog
push ecx
push esi
mov esi, ecx
mov dword [ebp - 0x10], esi
mov dword [esi], 0x4015c0
mov dword [esi + 4], 0x4015ac
mov dword [esi + 8], 0x401594
mov dword [esi + 0xc], 0x401584
mov dword [esi + 0x10], 0x4016ac
mov dword [ebp - 4], 2
lea ecx, [esi + 0x30]
call fcn.004046ba
mov byte [ebp - 4], 1
lea ecx, [esi + 0x2c]
call fcn.004046ba
and byte [ebp - 4], 0
lea ecx, [esi + 0x28]
call fcn.004046ba
or dword [ebp - 4], 0xffffffff
lea ecx, [esi + 0x24]
call fcn.004046ba
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
leave
ret
Function at 0x4053d4
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
mov eax, 0x40ca64
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x210
push ebx
push esi
xor esi, esi
mov ebx, ecx
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], esi
push 0x2001f
push dword [ebp + 8]
lea ecx, [ebp - 0x10]
push dword [ebx]
call fcn.00403bcc
cmp eax, esi
jne 0x405456
push edi
mov edi, dword [sym.imp.mssws.dll_RegEnumKeyExW]
jmp 0x40541f
lea eax, [ebp - 0x21c]
push eax
call fcn.004053d4
cmp eax, esi
jne 0x405455
lea eax, [ebp - 0x1c]
push eax
push esi
push esi
push esi
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x21c]
push eax
push esi
push dword [ebp - 0x10]
mov dword [ebp - 0x14], 0x100
call edi
test eax, eax
lea ecx, [ebp - 0x10]
je 0x40540f
call fcn.00403b67
push dword [ebp + 8]
push dword [ebx]
call dword [sym.imp.mssws.dll_RegDeleteKeyW]
pop edi
mov esi, eax
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00403b67
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4
Function at 0x406df6
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 0xc], 0
push ebx
push esi
push edi
push 2
push 0
push dword [ebp + 8]
mov dword [ebp - 8], ecx
call dword [sym.imp.mssws.dll_LoadLibraryExW]
mov ebx, eax
test ebx, ebx
mov dword [ebp - 4], ebx
jne 0x406e46
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x406e31
call esi
mov esi, eax
jmp 0x406f0e
call esi
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
jmp 0x406f0e
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.mssws.dll_FindResourceW]
mov edi, eax
test edi, edi
je 0x406e67
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
jne 0x406e8c
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x406e7a
call esi
jmp 0x406f03
call esi
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
jmp 0x406f05
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
cmp byte [ebx + esi], 0
mov edi, esi
je 0x406ecb
lea edi, [ebx + 1]
mov eax, edi
add eax, 3
and eax, 0xfffffffc
call fcn.004086b0
mov ecx, edi
mov edx, ecx
mov eax, esp
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
and byte [eax + ebx], 0
mov dword [ebp + 8], eax
mov edi, esp
test edi, edi
jne 0x406ed3
xor eax, eax
jmp 0x406ef7
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea eax, [esi + esi]
add eax, 3
and eax, 0xfffffffc
call fcn.004086b0
mov eax, esp
push 0
push esi
push edi
push eax
call fcn.00403af8
push dword [ebp + 0x14]
lea ecx, [ebp - 0xc]
push eax
call fcn.004063ac
mov esi, eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, esi
lea esp, [ebp - 0x18]
pop edi
pop esi
pop ebx
leave
ret 0x10

Function at 0x4073b8
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
mov eax, 0x40ccbc
call sub.MSVCRT.dll__EH_prolog
push ecx
mov eax, ecx
xor ecx, ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x14], ecx
mov dword [ebp - 0x10], eax
mov dword [eax + 0x24], ecx
mov dword [ebp - 4], ecx
mov dword [eax + 0x28], ecx
mov byte [ebp - 4], 1
mov dword [eax + 0x2c], ecx
mov byte [ebp - 4], 2
mov dword [eax + 0x30], ecx
mov byte [ebp - 4], 3
mov dword [eax], 0x4015c0
mov dword [eax + 4], 0x4015ac
mov dword [eax + 8], 0x401594
mov dword [eax + 0xc], 0x401584
mov dword [eax + 0x10], 0x4016ac
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
leave
ret
Function at 0x4092be
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push esi
push 0xf003f
push 0
push 0
mov esi, ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test eax, eax
mov dword [ebp - 4], eax
jne 0x409301
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x4092f0
call esi
jmp 0x4093b2
call esi
and eax, 0xffff
or eax, 0x80070000
jmp 0x4093b2
mov eax, dword [esi + 0x8c]
push edi
push 0xf01ff
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
jne 0x409324
xor esi, esi
jmp 0x4093a6
lea eax, [ebp - 0x20]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x409370
mov esi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea eax, [ebp - 0x20]
push eax
push edi
call esi
test eax, eax
je 0x409370
cmp dword [ebp - 0x1c], 1
je 0x409370
push ebx
push dword [ebp - 8]
mov ebx, dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x20]
push eax
push edi
call esi
test eax, eax
je 0x40936f
cmp ebx, dword [ebp - 0xc]
jae 0x40936f
cmp dword [ebp - 0x1c], 1
jne 0x40934d
pop ebx
push edi
xor esi, esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x40939f
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x40938f
call esi
mov esi, eax
jmp 0x40939f
call esi
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
pop edi
pop esi
leave
ret
Function at 0x409c43
Capabilities:
Create service
Modify service

Disassembly:
mov eax, 0x40ce73
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x228
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
cmp edi, ebx
mov esi, ecx
mov dword [ebp - 0x18], 0x20
je 0x409c9c
cmp word [edi], bx
je 0x409c9c
push ebx
push 0x40219c
push edi
call fcn.0040af94
cmp eax, ebx
jl 0x409e1d
push ebx
push 0x40217c
push edi
call fcn.0040af94
cmp eax, ebx
jl 0x409e1d
mov dword [ebp - 0x18], 0x10
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
cmp eax, ebx
mov dword [ebp - 0x14], eax
jne 0x409cd4
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x409cc3
call esi
jmp 0x409e1d
call esi
and eax, 0xffff
or eax, 0x80070000
jmp 0x409e1d
mov edi, 0x402178
push edi
lea ecx, [ebp - 0x234]
call fcn.004093b5
mov dword [ebp - 4], ebx
push dword [esi + 0x6d0]
lea ecx, [ebp - 0x234]
push dword [esi + 0x6c8]
call fcn.004091b7
push 0xffffffffffffffff
push edi
lea ecx, [ebp - 0x234]
call fcn.004091b7
mov eax, dword [esi + 0x8c]
mov edi, 0xf01ff
push edi
push eax
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
cmp eax, ebx
mov dword [ebp - 0x10], eax
jne 0x409d64
mov edx, dword [ebp + 0x10]
mov eax, dword [esi + 0x2a0]
push ebx
mov ecx, dword [esi + 0x8c]
push ebx
push 0x402158
push ebx
push ebx
push dword [ebp - 0x230]
neg edx
push 1
sbb edx, edx
add edx, 3
push edx
push dword [ebp - 0x18]
push edi
push eax
push ecx
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov dword [ebp - 0x10], eax
push dword [ebp - 0x14]
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
cmp dword [ebp - 0x10], ebx
je 0x409dc8
cmp dword [ebp + 8], ebx
je 0x409d7e
mov eax, dword [ebp - 0x18]
jmp 0x409d81
or eax, 0xffffffff
push dword [esi + 0x2a0]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
push ebx
push ebx
push dword [ebp - 0x230]
push 0xffffffffffffffff
push 0xffffffffffffffff
push eax
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x409de8
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x409db8
call esi
jmp 0x409dc4
call esi
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
jmp 0x409e07
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x409dd8
call esi
jmp 0x409de4
call esi
and eax, 0xffff
or eax, 0x80070000
mov ebx, eax
jmp 0x409e0c
push 0x402140
call fcn.00409b75
cmp eax, ebx
je 0x409e07
mov ecx, dword [ebp + 0x14]
mov dword [ebp + 8], ecx
lea ecx, [ebp + 8]
push ecx
push 1
push dword [ebp - 0x10]
call eax
push dword [ebp - 0x10]
call edi
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x234]
call fcn.004055e7
mov eax, ebx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x10
Function at 0x40a17a
Capabilities:
Query environment variable
Set environment variable

Disassembly:
mov eax, 0x40cebf
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x81c
mov ecx, dword [ebp + 8]
xor eax, eax
cmp ecx, eax
push edi
je 0x40a251
cmp word [ecx], ax
je 0x40a251
mov edi, dword [sym.imp.mssws.dll_GetEnvironmentVariableW]
push ebx
push esi
push eax
push eax
mov esi, 0x4021f0
push esi
call edi
push dword [ebp + 8]
mov ebx, eax
call dword [sym.imp.MSVCRT.dll_wcslen]
pop ecx
lea ecx, [ebp - 0x828]
lea ebx, [eax + ebx + 0x104]
call fcn.0040a136
and dword [ebp - 4], 0
push ebx
push ebx
lea ecx, [ebp - 0x828]
call fcn.0040a0be
push eax
push esi
call edi
or edi, 0xffffffff
push edi
lea ecx, [ebp - 0x828]
call fcn.0040a0d6
push edi
push 0x4021ec
lea ecx, [ebp - 0x828]
call fcn.004091b7
push edi
push dword [ebp + 8]
lea ecx, [ebp - 0x828]
call fcn.004091b7
push dword [ebp - 0x824]
push esi
call dword [sym.imp.mssws.dll_SetEnvironmentVariableW]
test eax, eax
pop esi
pop ebx
jne 0x40a243
mov eax, 0x8000ffff
mov dword [ebp - 0x14], eax
push 0x40d344
lea eax, [ebp - 0x14]
xor ecx, ecx
push eax
mov dword [ebp - 0x10], ecx
call sub.MSVCRT.dll__CxxThrowException
mov dword [ebp - 4], edi
lea ecx, [ebp - 0x828]
call fcn.00405ac7
mov ecx, dword [ebp - 0xc]
xor eax, eax
pop edi
mov dword fs:[0], ecx
leave
ret 4

Function at 0x40a38e
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
cmp dword [0x40fb60], 0
je 0x40a3a2
xor eax, eax
inc eax
leave
ret
push esi
mov esi, dword [ebp + 8]
mov ecx, esi
call fcn.0040a348
test eax, eax
je 0x40a3f8
xor edx, edx
lea ecx, [ebp + 0xc]
push ebx
add ecx, 4
mov eax, dword [ecx]
test eax, eax
movzx ebx, dx
mov dword [ebp + ebx*4 - 0x28], eax
je 0x40a3ce
inc edx
cmp dx, 0xa
jb 0x40a3b7
push 0
lea eax, [ebp - 0x28]
push eax
push 0
push edx
xor eax, eax
mov ax, word [esi + 0x118]
push 0
push dword [ebp + 0xc]
push eax
push 4
push dword [esi + 0x114]
call dword [sym.imp.mssws.dll_ReportEventW]
xor eax, eax
inc eax
pop ebx
pop esi
leave
ret
Function at 0x40ae39
Capabilities:
Get user security identifier

Disassembly:
mov eax, 0x40cf70
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x20
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
xor ebx, ebx
cmp dword [0x40f194], ebx
jne 0x40ae5e
xor eax, eax
inc eax
jmp 0x40af83
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], 0x80
mov dword [ebp - 0x1c], 0x10
mov dword [ebp - 0x20], ebx
mov dword [ebp - 4], ebx
push dword [ebp - 0x18]
push ebx
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, dword [ebp + 0x10]
mov dword [edi], eax
cmp eax, ebx
je 0x40af29
mov eax, dword [ebp - 0x1c]
add eax, eax
push eax
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x14], eax
cmp eax, ebx
je 0x40af29
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x14]
lea eax, [ebp - 0x18]
push eax
push dword [edi]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.mssws.dll_LookupAccountNameW]
test eax, eax
jne 0x40af35
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40af31
push dword [ebp - 0x18]
push dword [edi]
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov dword [edi], eax
cmp eax, ebx
je 0x40af29
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x1c]
add ecx, ecx
push ecx
push eax
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov dword [ebp - 0x14], eax
cmp eax, ebx
jne 0x40aeac
push dword [ebp - 0x28]
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [edi]
cmp edi, ebx
je 0x40af29
push edi
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40af83
mov dword [ebp - 0x20], 1
jmp 0x40af57
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x14]
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 0x20], ebx
jne 0x40af80
mov eax, dword [edi]
cmp eax, ebx
je 0x40af80
push eax
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [edi], ebx
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x40af94
Capabilities:
Get domain controller name

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push edi
xor edi, edi
cmp dword [0x40f194], edi
jne 0x40afac
xor eax, eax
jmp 0x40b0c1
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push ebx
push 0x10
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
call fcn.0040a8f3
test eax, eax
je 0x40afce
lea eax, [ebp - 8]
push eax
push edi
push ebx
call sub.NETAPI32.dll_NetGetDCName
lea eax, [ebp - 0xc]
push eax
push 0x811
push dword [ebp - 8]
call fcn.0040a867
test eax, eax
je 0x40aff0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x40b0a0
lea eax, [ebp + 8]
push eax
push dword [ebp + 8]
push edi
call fcn.0040ae39
test eax, eax
je 0x40afe3
mov esi, dword [ebp + 8]
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp - 4]
push eax
push esi
push dword [ebp - 0xc]
call sub.mssws.dll_LsaEnumerateAccountRights
test eax, eax
jne 0x40b03f
jmp 0x40b037
push dword [ebp + 0xc]
mov eax, dword [ebp - 4]
dec dword [ebp + 0x10]
push dword [eax + 4]
call dword [sym.imp.MSVCRT.dll_wcscmp]
test eax, eax
pop ecx
pop ecx
je 0x40b083
add dword [ebp - 4], 8
cmp dword [ebp + 0x10], edi
jne 0x40b01b
dec dword [ebp + 0x10]
push 1
push dword [ebp + 0xc]
push esi
push dword [ebp - 0xc]
call fcn.0040a8ab
cmp eax, edi
jge 0x40b059
push eax
call sub.mssws.dll_LsaNtStatusToWinError
jmp 0x40afe9
push ebx
push 0x10
call fcn.0040a8f3
test eax, eax
je 0x40b083
lea eax, [ebp + 0xc]
push eax
push 1
push 2
push ebx
mov dword [ebp + 0xc], edi
call sub.NETAPI32.dll_I_NetLogonControl
cmp dword [ebp + 0xc], edi
je 0x40b083
push dword [ebp + 0xc]
call sub.NETAPI32.dll_NetApiBufferFree
push dword [ebp - 0xc]
call sub.mssws.dll_LsaClose
cmp esi, edi
je 0x40b09e
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor esi, esi
cmp dword [ebp - 8], edi
je 0x40b0ad
push dword [ebp - 8]
call sub.NETAPI32.dll_NetApiBufferFree
cmp esi, edi
jle 0x40b0bd
and esi, 0xffff
or esi, 0x80070000
mov eax, esi
pop esi
pop ebx
pop edi
leave
ret 0xc
Function at 0x40b16d
Capabilities:
Get token privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
xor edi, edi
cmp dword [0x40f194], edi
mov dword [ebp - 8], ecx
je 0x40b22a
mov esi, dword [sym.imp.mssws.dll_GetTokenInformation]
lea eax, [ebp - 4]
push eax
push edi
push edi
push 1
push dword [ebp + 8]
mov dword [ebp - 4], edi
call esi
mov eax, dword [ebp - 4]
add eax, 3
and eax, 0xfffffffc
call fcn.004086b0
mov ebx, esp
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push ebx
push 1
push dword [ebp + 8]
call esi
test eax, eax
je 0x40b1fe
mov ecx, dword [ebp - 8]
push edi
push dword [ebx]
call fcn.0040b0c6
lea eax, [ebp - 4]
push eax
push edi
push edi
push 5
push dword [ebp + 8]
mov dword [ebp - 4], edi
call esi
mov eax, dword [ebp - 4]
add eax, 3
and eax, 0xfffffffc
call fcn.004086b0
mov ebx, esp
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push ebx
push 5
push dword [ebp + 8]
call esi
test eax, eax
jne 0x40b21f
lea ecx, [ebp - 0x14]
call fcn.00404716
mov ecx, dword [eax]
mov dword [ebp - 0xc], ecx
mov eax, dword [eax + 4]
mov dword [ebp - 8], eax
push 0x40d344
lea eax, [ebp - 0xc]
push eax
call sub.MSVCRT.dll__CxxThrowException
mov ecx, dword [ebp - 8]
push edi
push dword [ebx]
call fcn.0040b115
lea esp, [ebp - 0x20]
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x40b234
Capabilities:
Get token privileges

Disassembly:
mov eax, 0x40cf84
call sub.MSVCRT.dll__EH_prolog
push ecx
push ecx
push ebx
push esi
xor esi, esi
cmp dword [0x40f194], esi
push edi
jne 0x40b254
xor eax, eax
jmp 0x40b373
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], esi
lea eax, [ebp - 0x10]
push eax
push 0x88
push dword [ebp + 8]
call dword [sym.imp.mssws.dll_OpenProcessToken]
test eax, eax
jne 0x40b293
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x40b280
call esi
jmp 0x40b28c
call esi
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
jmp 0x40b365
lea eax, [ebp - 0x14]
push eax
push esi
push esi
push 6
push dword [ebp - 0x10]
call dword [sym.imp.mssws.dll_GetTokenInformation]
test eax, eax
jne 0x40b360
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x7a
je 0x40b2bf
cmp eax, esi
jle 0x40b28c
jmp 0x40b282
push dword [ebp + 0xc]
mov ebx, dword [sym.imp.mssws.dll_GetLengthSid]
call ebx
mov ecx, dword [ebp - 0x14]
lea eax, [ecx + eax + 0xc]
mov dword [ebp - 0x14], eax
add eax, 3
and eax, 0xfffffffc
call fcn.004086b0
mov esi, esp
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x14]
push esi
push 6
push dword [ebp - 0x10]
call dword [sym.imp.mssws.dll_GetTokenInformation]
test eax, eax
je 0x40b348
cmp dword [esi], 0
je 0x40b360
mov eax, dword [esi]
push dword [ebp + 0xc]
mov dword [ebp + 8], eax
call ebx
push dword [ebp + 0xc]
mov ecx, eax
mov eax, dword [ebp + 8]
push 0x10000000
add ecx, 8
add word [eax + 2], cx
push 2
push dword [esi]
call dword [sym.imp.mssws.dll_AddAccessAllowedAce]
test eax, eax
je 0x40b348
push dword [esi]
call dword [sym.imp.mssws.dll_IsValidAcl]
mov eax, dword [esi]
movzx eax, word [eax + 2]
push eax
push esi
push 6
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
jne 0x40b35c
call edi
test eax, eax
jg 0x40b355
call edi
jmp 0x40b28c
call edi
jmp 0x40b282
xor esi, esi
jmp 0x40b365
mov esi, 0x80004005
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00404807
mov eax, esi
lea esp, [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x40ba05
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push ebp
push esi
push edi
push 0x7d0
call dword [sym.imp.mssws.dll_GetCommandLineW]
push eax
mov esi, 0x40fb80
push esi
call dword [sym.imp.MSVCRT.dll_wcsncpy]
mov ebx, dword [esp + 0x20]
xor ebp, ebp
mov word [0x410b1e], bp
add esp, 0xc
mov dword [ebx], ebp
cmp word [0x40fb80], bp
mov edi, esi
je 0x40bab9
jmp 0x40ba47
cmp word [edi], bp
je 0x40baa1
inc edi
inc edi
xor eax, eax
mov ax, word [edi]
push eax
call dword [sym.imp.MSVCRT.dll_iswspace]
test eax, eax
pop ecx
jne 0x40ba40
mov ax, word [edi]
cmp ax, bp
je 0x40baa1
cmp ax, 0x22
jne 0x40ba91
push 0x22
add edi, 2
push edi
call dword [sym.imp.MSVCRT.dll_wcschr]
mov edi, eax
cmp edi, ebp
pop ecx
pop ecx
je 0x40ba9f
inc edi
inc edi
inc dword [ebx]
cmp word [edi], bp
jne 0x40ba47
jmp 0x40baa1
cmp word [edi], bp
je 0x40ba7c
inc edi
inc edi
xor eax, eax
mov ax, word [edi]
push eax
call dword [sym.imp.MSVCRT.dll_iswspace]
test eax, eax
pop ecx
je 0x40ba85
jmp 0x40ba7c
inc dword [ebx]
mov ebx, dword [ebx]
cmp ebx, ebp
je 0x40bab9
mov eax, ebx
shl eax, 2
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
cmp ebx, ebp
pop ecx
jne 0x40babd
xor eax, eax
jmp 0x40bb2c
cmp word [0x40fb80], bp
je 0x40bb2a
mov edi, ebx
jmp 0x40bad1
cmp word [esi], bp
je 0x40bb2a
inc esi
inc esi
xor eax, eax
mov ax, word [esi]
push eax
call dword [sym.imp.MSVCRT.dll_iswspace]
test eax, eax
pop ecx
jne 0x40baca
mov ax, word [esi]
cmp ax, bp
je 0x40bb2a
cmp ax, 0x22
jne 0x40baf7
lea eax, [esi + 2]
mov dword [edi], eax
jmp 0x40baf9
mov dword [edi], esi
xor eax, eax
mov ax, word [esi]
add edi, 4
cmp ax, 0x22
jne 0x40bb3f
push 0x22
add esi, 2
push esi
call dword [sym.imp.MSVCRT.dll_wcschr]
mov esi, eax
cmp esi, ebp
pop ecx
pop ecx
je 0x40bb2a
cmp word [esi], bp
je 0x40bb2a
mov word [esi], bp
inc esi
inc esi
cmp word [esi], bp
jne 0x40bad1
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret 4
cmp word [esi], bp
je 0x40bb2a
inc esi
inc esi
xor eax, eax
mov ax, word [esi]
push eax
call dword [sym.imp.MSVCRT.dll_iswspace]
pop ecx
test eax, eax
je 0x40bb33
jmp 0x40bb1b

Function at 0x40bcef
Capabilities:
Delete registry key

Disassembly:
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
push edi
push 0
mov edi, ecx
call esi
mov eax, dword [edi + 0x224]
test eax, eax
jne 0x40bd0b
push 6
jmp 0x40bd1b
push dword [esp + 0xc]
push eax
call dword [sym.imp.mssws.dll_RegDeleteKeyW]
test eax, eax
je 0x40bd21
push eax
call esi
xor eax, eax
jmp 0x40bd24
xor eax, eax
inc eax
pop edi
pop esi
ret 4