joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100116e0
Capabilities:
Delete directory
Enumerate files on windows
Enumerate files recursively

Disassembly:
sub esp, 0x14c
push esi
mov esi, dword [esp + 0x154]
test esi, esi
push edi
jne 0x100116fe
pop edi
xor eax, eax
pop esi
add esp, 0x14c
ret
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 3
ja 0x10011718
pop edi
pop esi
add esp, 0x14c
ret
mov eax, dword [esp + 0x15c]
test eax, eax
je 0x10011740
push eax
push esi
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
test eax, eax
jne 0x10011740
pop edi
mov eax, 1
pop esi
add esp, 0x14c
ret
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ebp
mov ebp, ecx
mov ecx, 0x50
lea edi, [esp + 0x1c]
mov dword [esp + 0x18], ebp
lea ebx, [ebp + 5]
rep stosd dword es:[edi], eax
push ebx
call dword [sym.imp.MSVCRT.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x10], edi
je 0x100118bb
test ebx, ebx
jle 0x10011794
lea eax, [ebp + 4]
push eax
push esi
push edi
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
mov byte [edi + ebp + 4], 0
test ebx, ebx
mov ebx, dword [sym.imp.MSVCRT.dll_strncat]
jle 0x100117b0
lea ecx, [ebp + 4]
push ecx
push str..
push edi
call ebx
add esp, 0xc
mov byte [edi + ebp + 4], 0
lea edx, [esp + 0x1c]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x14], esi
je 0x100118aa
lea eax, [esp + 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x100118a3
cmp byte [esp + 0x48], 0x2e
je 0x1001188f
lea edi, [esp + 0x48]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [ecx + ebp + 2]
push edi
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
je 0x10011887
test edi, edi
mov byte [esi], 0
jle 0x1001184a
mov ecx, dword [esp + 0x160]
lea ebp, [edi - 1]
push ebp
push ecx
push esi
call ebx
push ebp
push 0x100bee18
push esi
mov byte [esi + edi - 1], 0
call ebx
lea edx, [esp + 0x60]
push ebp
push edx
push esi
mov byte [esi + edi - 1], 0
call ebx
mov ebp, dword [esp + 0x3c]
add esp, 0x24
mov byte [esi + edi - 1], 0
test byte [esp + 0x1c], 0x10
je 0x1001186c
mov eax, dword [esp + 0x168]
mov ecx, dword [esp + 0x164]
push eax
push ecx
push esi
call fcn.100116e0
add esp, 0xc
jmp 0x1001187d
mov edx, dword [esp + 0x168]
push edx
push esi
call fcn.10011120
add esp, 8
push esi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x100117df
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
push edi
call dword [sym.imp.MSVCRT.dll_free]
mov esi, dword [esp + 0x164]
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
pop ebp
pop ebx
pop edi
mov eax, 1
pop esi
add esp, 0x14c
ret
Function at 0x10011ad0
Capabilities:
Check os version

Disassembly:
sub esp, 0x9c
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push edi
mov ecx, 0x26
xor eax, eax
lea edi, [esp + 0xc]
rep stosd dword es:[edi], eax
lea eax, [esp + 8]
mov dword [esp + 8], 0x9c
push eax
call esi
test eax, eax
jne 0x10011b1b
lea ecx, [esp + 8]
mov dword [esp + 8], 0x94
push ecx
call esi
pop edi
mov eax, 1
pop esi
add esp, 0x9c
ret
mov eax, dword [esp + 0x18]
mov ecx, 2
cmp eax, ecx
jne 0x10011b47
mov eax, dword [esp + 0xc]
cmp eax, 5
jb 0x10011b47
jne 0x10011b47
cmp dword [esp + 0x10], ecx
jae 0x10011b47
pop edi
mov eax, 1
pop esi
add esp, 0x9c
ret
pop edi
xor eax, eax
pop esi
add esp, 0x9c
ret
Function at 0x10012210
Capabilities:
Create directory

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
push edi
jne 0x1001221f
pop edi
xor eax, eax
pop esi
ret
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x10012230
pop edi
pop esi
ret
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
xor edi, edi
mov ebx, ecx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test ebx, ebx
jle 0x10012271
cmp byte [edi + esi], 0x5c
jne 0x1001226c
push 0
push esi
mov byte [edi + esi], 0
call ebp
test eax, eax
je 0x10012268
push esi
call fcn.10010d90
add esp, 4
mov byte [edi + esi], 0x5c
inc edi
cmp edi, ebx
jl 0x1001224c
push 0
push esi
call ebp
pop ebp
pop ebx
test eax, eax
je 0x10012285
push esi
call fcn.10010d90
add esp, 4
pop edi
mov eax, 1
pop esi
ret

Function at 0x10012950
Capabilities:
Create service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10084604
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
xor edi, edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 4], edi
mov esi, dword [ebp + 8]
push esi
call fcn.100128e0
add esp, 4
test eax, eax
je 0x1001299c
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.100127a0
push edi
push edi
push edi
push edi
push str.NDIS
mov eax, dword [ebp + 0xc]
push eax
push edi
push 3
push 1
push 0xf01ff
mov ecx, dword [ebp + 0x10]
push ecx
push esi
mov edx, dword [0x100c63c8]
push edx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov dword [0x100c63cc], eax
cmp eax, edi
je 0x100129df
call fcn.10012840
mov dword [ebp - 0x14], 1
call fcn.100127e0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x10012a10
Capabilities:
Create service
Persist via windows service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1008460e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
xor edi, edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 4], edi
mov esi, dword [ebp + 8]
push esi
call fcn.100128e0
add esp, 4
test eax, eax
je 0x10012a5c
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.100127a0
push edi
push edi
push edi
push edi
push 0x100c63d0
mov eax, dword [ebp + 0xc]
push eax
push 1
push 2
push 0x110
push 0xf01ff
mov ecx, dword [ebp + 0x10]
push ecx
push esi
mov edx, dword [0x100c63c8]
push edx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov dword [0x100c63cc], eax
cmp eax, edi
je 0x10012aa3
call fcn.10012840
mov dword [ebp - 0x14], 1
call fcn.100127e0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10012ad0
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10084618
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
xor edi, edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 4], edi
mov esi, dword [ebp + 8]
push esi
call fcn.100128e0
add esp, 4
test eax, eax
jne 0x10012b1a
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push esi
call fcn.10012d90
add esp, 8
test eax, eax
je 0x10012b45
push esi
call fcn.100127f0
add esp, 4
mov eax, dword [0x100c63cc]
push eax
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov dword [ebp - 0x14], eax
call fcn.10012840
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x10012b70
Capabilities:
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10084622
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], 0
mov esi, dword [ebp + 8]
push esi
call fcn.100128e0
add esp, 4
test eax, eax
jne 0x10012bb9
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call fcn.10012870
add esp, 4
cmp eax, 4
jne 0x10012bdd
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call fcn.100127f0
add esp, 4
push 0
push 0
mov eax, dword [0x100c63cc]
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
call fcn.10012840
jmp 0x10012c06
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp + 0xc]
push ecx
push 4
push esi
call fcn.10012e50
add esp, 0xc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x10012cd0
Capabilities:
Modify service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10084636
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
xor esi, esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], esi
mov eax, dword [ebp + 8]
push eax
call fcn.100127f0
add esp, 4
mov eax, 1
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], esi
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x20], ecx
lea edx, [ebp - 0x30]
push edx
push 2
mov eax, dword [0x100c63cc]
push eax
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp + 0xc]
push ecx
push esi
push esi
push esi
push esi
push 0x100c63d4
push esi
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
mov edx, dword [0x100c63cc]
push edx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
mov dword [ebp - 0x14], eax
call fcn.10012840
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10012d90
Capabilities:
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10084640
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], 0
mov esi, dword [ebp + 8]
push esi
call fcn.100128e0
add esp, 4
test eax, eax
jne 0x10012dd9
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call fcn.10012870
add esp, 4
cmp eax, 1
jne 0x10012df8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call fcn.100127f0
add esp, 4
lea eax, [ebp - 0x2c]
push eax
push 1
mov ecx, dword [0x100c63cc]
push ecx
call dword [sym.imp.ADVAPI32.dll_ControlService]
call fcn.10012840
jmp 0x10012e24
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp + 0xc]
push edx
push 1
push esi
call fcn.10012e50
add esp, 0xc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x10012f30
Capabilities:
Query service configuration

Disassembly:
sub esp, 8
mov eax, dword [esp + 0x10]
mov byte [esp + 3], 0
test eax, eax
jne 0x10012f46
xor al, al
add esp, 8
ret
push esi
push 1
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
mov dword [esp + 8], esi
je 0x10012ffc
mov eax, dword [esp + 0x10]
push ebx
push 0xf01ff
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebx, eax
test ebx, ebx
je 0x10012ff4
push ebp
push 0x2000
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x10012fec
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0x2000
push ecx
push 0x2000
push ebp
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
je 0x10012fe3
push edi
mov edi, dword [ebp + 0xc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x20]
not ecx
sub edi, ecx
push eax
mov edx, ecx
mov esi, edi
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.10012ed0
mov esi, dword [esp + 0x18]
add esp, 4
mov byte [esp + 0x13], 1
pop edi
push ebp
call fcn.10084060
add esp, 4
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop ebp
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop ebx
mov al, byte [esp + 7]
pop esi
add esp, 8
ret
Function at 0x10013bc0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push edi
push str.setupapi.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
jne 0x10013bd6
pop edi
pop esi
ret
mov edi, dword [sym.imp.KERNEL32.dll_FindResourceA]
push 5
push str.5314
push esi
call edi
test eax, eax
jne 0x10013bf8
push 5
push str.2314
push esi
call edi
test eax, eax
je 0x10013c0f
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x10013c0f
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
jne 0x10013c1b
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
xor eax, eax
pop esi
ret
cmp word [eax], 1
jne 0x10013c33
cmp word [eax + 2], 0xffff
jne 0x10013c33
push 0xfa
add eax, 0x1e
jmp 0x10013c3b
push 0xfa
add eax, 0x16
push eax
push 0x100c63dc
call dword [sym.imp.MSVCRT.dll_wcsncpy]
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
mov eax, 1
pop esi
ret

Function at 0x10013cb0
Capabilities:
Create thread

Disassembly:
mov dword [0x100c65dc], 1
call fcn.10013bc0
push 0
push 0
push 0
push 0x10013c60
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
ret
Function at 0x100152e0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x10
push ebx
push edi
xor ebx, ebx
push 0x4000
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ebx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
add esp, 4
cmp edi, ebx
jne 0x1001530b
pop edi
or eax, 0xffffffff
pop ebx
add esp, 0x10
ret
mov eax, dword [esp + 0x20]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 8], eax
jne 0x10015339
pop edi
mov eax, 0xfffffffe
pop ebx
add esp, 0x10
ret
push ebp
push esi
mov byte [esp + 0x28], 1
mov ecx, dword [esp + 0x24]
push 0xea60
push 0x4000
push edi
mov edx, dword [ecx]
call dword [edx + 0x14]
mov ebp, eax
test ebp, ebp
jle 0x10015424
mov al, byte [esp + 0x28]
test al, al
je 0x100153f7
lea eax, [ebp - 3]
xor esi, esi
test eax, eax
jle 0x10015340
cmp byte [esi + edi], 0xd
jne 0x1001538e
cmp byte [esi + edi + 1], 0xa
jne 0x1001538e
cmp byte [esi + edi + 2], 0xd
jne 0x1001538e
cmp byte [esi + edi + 3], 0xa
je 0x10015395
inc esi
cmp esi, eax
jl 0x10015373
jmp 0x10015340
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x100153b2
mov ecx, ebp
sub ecx, esi
sub ecx, 4
push ecx
call eax
add esp, 4
test eax, eax
jl 0x10015434
sub ebp, esi
push esi
push edi
lea ebx, [ebx + ebp - 4]
call fcn.100151c0
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jle 0x10015434
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x1c]
push 0
add ebp, 0xfffffffc
push edx
lea eax, [esi + edi + 4]
push ebp
push eax
push ecx
mov dword [esp + 0x28], 1
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov byte [esp + 0x28], 0
jmp 0x10015340
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x10015409
push ebp
call eax
add esp, 4
test eax, eax
jl 0x10015434
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x1c]
push 0
push edx
push ebp
push edi
push eax
add ebx, ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x10015340
push edi
call fcn.10084060
mov ecx, dword [esp + 0x14]
add esp, 4
push ecx
jmp 0x10015439
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
pop esi
test eax, eax
pop ebp
jne 0x10015454
pop edi
mov eax, 0xfffffffe
pop ebx
add esp, 0x10
ret
mov eax, dword [esp + 0x10]
test eax, eax
jg 0x10015467
pop edi
mov eax, 0xfffffffd
pop ebx
add esp, 0x10
ret
cmp eax, ebx
mov eax, 0xfffffffc
jne 0x10015472
mov eax, ebx
pop edi
pop ebx
add esp, 0x10
ret
Function at 0x10016d70
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100846b0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x7c
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
lea eax, [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
or dword [ebp - 0x3c], 1
mov word [ebp - 0x38], 0
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x7c]
push edx
call fcn.100161e0
add esp, 8
mov eax, dword [eax + 4]
test eax, eax
jne 0x10016dc1
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
lea ecx, [ebp - 0x24]
push ecx
lea edx, [ebp - 0x68]
push edx
push 0x100c02e0
push 0
push 0xc000840
push 0
push 0
push 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov esi, eax
mov eax, dword [ebp - 0x78]
test eax, eax
je 0x10016e09
lea ecx, [eax - 1]
mov al, byte [ecx]
test al, al
je 0x10016e00
cmp al, 0xff
je 0x10016e00
dec al
mov byte [ecx], al
jmp 0x10016e09
push ecx
call fcn.10084060
add esp, 4
test esi, esi
je 0x10016e7d
lea eax, [ebp - 0x6c]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
mov edi, dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
call edi
test eax, eax
je 0x10016e43
mov ebx, 0x103
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 0x6c], ebx
jne 0x10016e43
push 0x64
call esi
lea edx, [ebp - 0x6c]
push edx
mov eax, dword [ebp - 0x24]
push eax
call edi
test eax, eax
jne 0x10016e2c
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x24]
push ecx
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov edx, dword [ebp - 0x20]
push edx
call esi
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x6c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10016ea0
Capabilities:
Compare security identifiers

Disassembly:
sub esp, 0x14
push ebx
lea eax, [esp + 4]
push esi
push eax
xor ebx, ebx
push 1
push 8
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
mov esi, eax
cmp esi, ebx
jne 0x10016ef8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3f0
jne 0x10016fb6
lea ecx, [esp + 8]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
cmp eax, ebx
je 0x10016fb8
push ebp
push 0x400
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
lea edx, [esp + 0x14]
mov esi, eax
mov eax, dword [esp + 0xc]
push edx
push 0x400
push esi
push 2
push eax
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov ecx, dword [esp + 0xc]
mov ebp, eax
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebp, ebx
je 0x10016fa4
lea edx, [esp + 0x10]
push edi
push edx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
lea eax, [esp + 0x40]
push 2
push eax
mov byte [esp + 0x48], bl
mov byte [esp + 0x49], bl
mov byte [esp + 0x4a], bl
mov byte [esp + 0x4b], bl
mov byte [esp + 0x4c], bl
mov byte [esp + 0x4d], 5
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov ecx, dword [esi]
xor edi, edi
dec ecx
js 0x10016f98
lea ebx, [esi + 4]
mov edx, dword [ebx]
mov eax, dword [esp + 0x14]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x10016f93
mov ecx, dword [esi]
inc edi
add ebx, 8
dec ecx
cmp edi, ecx
jle 0x10016f74
jmp 0x10016f98
mov ebp, 1
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_FreeSid]
pop edi
push esi
call fcn.10084060
add esp, 4
mov eax, ebp
pop ebp
pop esi
pop ebx
add esp, 0x14
ret
mov eax, esi
pop esi
pop ebx
add esp, 0x14
ret
Function at 0x10016fc0
Capabilities:
Get token privileges

Disassembly:
sub esp, 0x4c
lea eax, [esp + 4]
push ebx
xor ebx, ebx
push eax
push 0x2000000
mov dword [esp + 0x14], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x10016fea
pop ebx
add esp, 0x4c
ret
push esi
push edi
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x18]
mov edx, dword [esp + 0x10]
rep stosd dword es:[edi], eax
mov esi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea ecx, [esp + 0xc]
push ecx
push ebx
push ebx
push 3
push edx
mov dword [esp + 0x20], ebx
call esi
mov eax, dword [esp + 0xc]
cmp eax, ebx
je 0x100170ae
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
add esp, 4
mov edi, eax
lea eax, [esp + 0xc]
push eax
push ecx
push edi
push 3
push edx
call esi
test eax, eax
jne 0x1001704d
push edi
call fcn.10084060
add esp, 4
jmp 0x100170ae
mov eax, dword [edi]
push ebp
cmp eax, ebx
jbe 0x100170a4
mov ebp, dword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameA]
lea esi, [edi + 0xc]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x1c]
push eax
lea edx, [esi - 8]
push ecx
push edx
push 0
mov dword [esp + 0x20], 0x3f
call ebp
test byte [esi], 2
je 0x10017090
lea eax, [esp + 0x1c]
push str.SeLoadDriverPrivilege
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x1001709c
mov eax, dword [edi]
inc ebx
add esi, 0xc
cmp ebx, eax
jb 0x1001705d
jmp 0x100170a4
mov dword [esp + 0x18], 1
push edi
call fcn.10084060
add esp, 4
pop ebp
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
add esp, 0x4c
ret

Function at 0x10017320
Capabilities:
Check os version
Get system information on windows

Disassembly:
sub esp, 0xc0
push esi
lea eax, [esp + 0xa0]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, 0x26
xor eax, eax
lea edi, [esp + 0xc]
rep stosd dword es:[edi], eax
lea ecx, [esp + 8]
mov dword [esp + 8], 0x9c
push ecx
call esi
test eax, eax
jne 0x10017376
lea edx, [esp + 8]
mov dword [esp + 8], 0x94
push edx
call esi
pop edi
xor eax, eax
pop esi
add esp, 0xc0
ret
cmp dword [esp + 0xc], 6
jne 0x1001738a
mov ecx, dword [esp + 0x10]
mov eax, 1
cmp ecx, eax
jae 0x1001738c
xor eax, eax
pop edi
pop esi
add esp, 0xc0
ret