joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401dc0
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov dword [esp], 0x407044
call sym._EnterCriticalSection_4
mov ebx, dword [0x40703c]
sub esp, 4
test ebx, ebx
je 0x401e0b
nop
mov eax, dword [ebx]
mov dword [esp], eax
call sym._TlsGetValue_4
sub esp, 4
mov esi, eax
call sym._GetLastError_0
test eax, eax
jne 0x401e04
test esi, esi
je 0x401e04
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x401de0
mov dword [esp], 0x407044
call sym._LeaveCriticalSection_4
sub esp, 4
add esp, 0x14
pop ebx
pop esi
ret

Function at 0x401ff0
Capabilities:
Write file on windows

Disassembly:
push esi
push ebx
sub esp, 0x14
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x17
mov dword [esp + 4], 1
lea esi, [esp + 0x24]
mov dword [esp], str.Mingw_runtime_failure:_n
lea ebx, [eax + 0x40]
mov dword [esp + 0xc], ebx
call sym._fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], esi
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._vfprintf
call sym._abort
lea esi, [esi]

Function at 0x402040
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
push edi
mov edi, ecx
push esi
push ebx
mov ebx, eax
mov esi, edx
sub esp, 0x4c
lea eax, [esp + 0x24]
mov dword [esp + 8], 0x1c
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._VirtualQuery_12
sub esp, 0xc
test eax, eax
je 0x402118
mov eax, dword [esp + 0x38]
cmp eax, 0x40
je 0x40207e
cmp eax, 4
jne 0x4020a0
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call sym._memcpy
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x30]
lea ebp, [esp + 0x20]
mov dword [esp + 8], 0x40
mov dword [esp + 0xc], ebp
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
mov edx, dword [esp + 0x38]
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [esp + 0x1c], edx
call sym._memcpy
mov edx, dword [esp + 0x1c]
cmp edx, 0x40
je 0x40208e
cmp edx, 4
je 0x40208e
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1c
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
call fcn.00401ff0
Function at 0x42e000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
nop
mov eax, section..text
push 4
nop
nop
nop
nop
nop
nop
nop
nop
nop
pop edi
nop
cmp eax, 0
nop
nop
nop
nop
nop
je 0x42e072
nop
mov ebx, 0x407ef8
nop
nop
nop
nop
mov ecx, ebx
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
push eax
nop
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
div edi
nop
nop
nop
xchg ecx, eax
nop
nop
nop
pop eax
nop
nop
nop
nop
mov esi, 0x11a121c3
nop
nop
nop
nop
nop
xor dword [eax], esi
add eax, edi
nop
nop
nop
nop
nop
nop
nop
loop 0x42e060
nop
nop
mov eax, section..text_1
nop
cmp eax, 0
nop
nop
nop
je 0x42e0d2
nop
nop
nop
nop
mov ebx, 0x42cd70
nop
nop
nop
mov ecx, ebx
nop
nop
nop
sub ecx, eax
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
push eax
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
div edi
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
pop eax
nop
nop
mov esi, 0x61f41816
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
loop 0x42e0c0
nop
popal
nop
nop
nop
nop
jmp 0x401219

Function at 0xc3694d
Capabilities:
Encode data using xor

Disassembly:
xor al, al
mov al, byte [edi]
xor al, bl
mov byte [edi], al
inc edi
cmp edi, ecx
jne fcn.00c3694d
ret
Function at 0x100f421
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push esi
xor esi, esi
mov dword [ebp - 0xc], esi
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
push 0xfffffffffffffff5
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
jne 0x100f450
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x100f4c0
push ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push esi
push esi
push esi
push esi
push 0xffffffffffffffff
push dword [ebp + 8]
push esi
push dword [ebp - 4]
call edi
mov ebx, eax
cmp ebx, esi
jne 0x100f475
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x100f4be
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 8], eax
cmp eax, esi
je 0x100f4be
push esi
push esi
push ebx
push eax
push 0xffffffffffffffff
push dword [ebp + 8]
push esi
push dword [ebp - 4]
call edi
cmp eax, esi
je 0x100f4af
push esi
lea ecx, [ebp - 0xc]
push ecx
dec eax
push eax
push dword [ebp - 8]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x100f4b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop ebx
pop esi
leave
ret 4
Function at 0x1010505
Capabilities:
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x81c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
xor esi, esi
push 0x7fe
mov word [ebp - 0x818], ax
lea eax, [ebp - 0x816]
push esi
push eax
mov dword [ebp - 0x81c], esi
call sub.msvcrt.dll_memset
add esp, 0xc
push esi
mov dword [0x1012604], esi
call dword [sym.imp.KERNEL32.dll_SetThreadUILanguage]
push esi
push esi
push 1
push esi
call dword [sym.imp.KERNEL32.dll_HeapSetInformation]
call fcn.0100f8cc
mov edi, eax
cmp edi, 0xffffffff
je 0x101058a
cmp edi, 3
je 0x101058a
push dword [0x1012604]
push 0x1007e54
call fcn.0100eebc
pop ecx
pop ecx
push 1
push 0xe90
call fcn.01010ebf
mov eax, edi
sub eax, esi
je 0x101060a
dec eax
je 0x10105aa
dec eax
je 0x10105a3
dec eax
jne 0x101060f
call fcn.0100f8a9
jmp 0x10106ce
call fcn.0100f7b1
jmp 0x101060f
push 0x1007d54
mov edi, 0x1012740
push edi
call fcn.0100eec2
mov ebx, 0x101
test eax, eax
jne 0x10105d9
push esi
push 7
call fcn.0100f4ca
lea eax, [ebp - 0x81c]
push eax
push ebx
push edi
call fcn.0100ee0e
push 0x1007d54
mov edi, 0x1012b80
push edi
call fcn.0100eec2
test eax, eax
jne 0x1010603
push esi
push 8
call fcn.0100f4ca
lea eax, [ebp - 0x81c]
push eax
push ebx
push edi
call fcn.0100ed8e
call fcn.010100ea
jmp 0x101060f
call fcn.0100f723
mov eax, dword [0x1012604]
cmp eax, esi
je 0x10106c6
cmp eax, 0x258
jb 0x101062a
cmp eax, 0x364
jbe 0x1010635
lea ecx, [eax - 0x384]
cmp ecx, 0x39
ja 0x1010696
push 0xa
lea ecx, [ebp - 0x18]
push ecx
push eax
call dword [sym.imp.msvcrt.dll__itow]
add esp, 0xc
mov dword [0x10125e4], esi
mov esi, 0x10125e0
push esi
push 0x1a
mov dword [0x10125e0], eax
call fcn.0100f4ca
push 0x400
lea eax, [ebp - 0x818]
push eax
push dword [0x1012604]
call sub.RASAPI32.dll_RasGetErrorStringW
lea eax, [ebp - 0x818]
push eax
call fcn.0100f421
mov eax, dword [0x1012604]
add eax, 0xfffffda8
cmp eax, 0x10c
ja 0x10106ce
push esi
push 0x19
jmp 0x10106c9
push esi
push 0x400
lea ecx, [ebp - 0x818]
push ecx
push esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
push 0x12ff
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
lea eax, [ebp - 0x818]
push eax
call fcn.0100f421
jmp 0x10106ce
push esi
push 0x14
call fcn.0100f4ca
push dword [0x1012604]
call dword [sym.imp.msvcrt.dll_exit]
int3
Function at 0xad10c0
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa
Manually build aes constants

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
mov eax, dword [0xafb520]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor ecx, ecx
mov al, 1
push edi
lea ebx, [ebx]
movzx edx, al
mov byte [ebp + edx - 0x104], cl
mov dl, al
and dl, 0x80
mov byte [ebp + ecx - 0x204], al
inc ecx
neg dl
sbb dl, dl
mov bl, al
and dl, 0x1b
add bl, bl
xor dl, bl
xor al, dl
cmp ecx, 0x100
jl 0xad10e0
mov al, 1
mov ecx, 0xb3f380
movzx edx, al
shl edx, 0x18
mov dword [ecx], edx
mov dl, al
and dl, 0x80
add ecx, 4
neg dl
sbb dl, dl
and dl, 0x1b
add al, al
xor al, dl
cmp ecx, 0xb3f3a8
jl 0xad1115
mov dword [0xb3e780], 0x63
mov dword [0xb4194c], 0
mov edx, 1
jmp 0xad1160
movzx eax, byte [ebp + edx - 0x104]
lea ecx, [ebp - 0x105]
sub ecx, eax
mov cl, byte [ecx]
mov al, cl
rol al, 1
xor cl, al
rol al, 1
xor cl, al
rol al, 1
xor cl, al
rol al, 1
xor al, cl
xor al, 0x63
movzx eax, al
mov dword [edx*4 + 0xb3e780], eax
mov dword [eax*4 + 0xb417c0], edx
inc edx
cmp edx, 0x100
jl 0xad1160
xor ecx, ecx
mov dl, byte [ecx + 0xb3e780]
mov al, dl
and al, 0x80
neg al
sbb al, al
and al, 0x1b
mov bl, dl
add bl, bl
xor al, bl
movzx esi, al
movzx edx, dl
mov eax, esi
shl eax, 8
xor eax, edx
shl eax, 8
xor eax, edx
shl eax, 8
xor eax, esi
xor eax, edx
mov dword [ecx + 0xb413c0], eax
ror eax, 8
mov dword [ecx + 0xb40fc0], eax
ror eax, 8
mov dword [ecx + 0xb40bc0], eax
ror eax, 8
mov dword [ecx + 0xb407c0], eax
mov al, byte [ecx + 0xb417c0]
test al, al
je 0xad126f
movzx edx, al
movzx esi, byte [ebp + edx - 0x104]
movzx eax, byte [ebp - 0xf9]
add eax, esi
cdq
mov edi, 0xff
idiv edi
movzx eax, byte [ebp + edx - 0x204]
mov dword [ebp - 0x208], eax
movzx eax, byte [ebp - 0xf7]
add eax, esi
cdq
idiv edi
movzx eax, byte [ebp - 0xfb]
add eax, esi
movzx ebx, byte [ebp + edx - 0x204]
cdq
idiv edi
movzx eax, byte [ebp - 0xf6]
add eax, esi
mov esi, 0xff
movzx edi, byte [ebp + edx - 0x204]
cdq
idiv esi
movzx eax, byte [ebp + edx - 0x204]
mov edx, dword [ebp - 0x208]
jmp 0xad1277
xor edx, edx
xor ebx, ebx
xor edi, edi
xor eax, eax
shl eax, 8
xor eax, edi
shl eax, 8
xor eax, ebx
shl eax, 8
xor eax, edx
mov dword [ecx + 0xb403c0], eax
ror eax, 8
mov dword [ecx + 0xb3ffc0], eax
ror eax, 8
mov dword [ecx + 0xb3ef80], eax
ror eax, 8
mov dword [ecx + 0xb3eb80], eax
add ecx, 4
cmp ecx, 0x400
jl 0xad11a2
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00ae13cb
mov esp, ebp
pop ebp
ret
Function at 0xad3470
Capabilities:
Hash data using sha256

Disassembly:
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0x6a09e667
mov dword [eax + 0xc], 0xbb67ae85
mov dword [eax + 0x10], 0x3c6ef372
mov dword [eax + 0x14], 0xa54ff53a
mov dword [eax + 0x18], 0x510e527f
mov dword [eax + 0x1c], 0x9b05688c
mov dword [eax + 0x20], 0x1f83d9ab
mov dword [eax + 0x24], 0x5be0cd19
ret
Function at 0xad5ee0
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0xaf8788
push 0xae7350
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0xafb520]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
xor ebx, ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x24], ebx
mov word [ebp - 0x20], 0x500
lea eax, [ebp - 0x2c]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea ecx, [ebp - 0x24]
push ecx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov dword [ebp - 0x28], eax
cmp eax, ebx
je 0xad5f7b
lea edx, [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x2c]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
jne 0xad5f61
mov dword [ebp - 0x28], ebx
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [ebp - 0x28]
jmp 0xad5f7b
mov dword [ebp - 4], 0xfffffffe
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00ae13cb
mov esp, ebp
pop ebp
ret

Function at 0xad5fa0
Capabilities:
Get session user name
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0xaf88c8
push 0xae7350
mov eax, dword fs:[0]
push eax
sub esp, 0x120
mov eax, dword [0xafb520]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
xor eax, eax
xor esi, esi
mov dword [ebp - 4], eax
mov byte [ebp - 0x120], al
push 0x103
push eax
lea eax, [ebp - 0x11f]
push eax
call fcn.00ae33e0
add esp, 0xc
mov dword [ebp - 0x12c], 0x104
lea ecx, [ebp - 0x12c]
push ecx
lea edx, [ebp - 0x120]
push edx
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
je 0xad607d
mov edx, 6
mov dword [ebp - 0x130], edx
lea ecx, [ebp - 0x120]
or eax, 0xffffffff
mov dword [ebp - 0x124], ecx
mov esi, edx
dec edx
mov dword [ebp - 0x130], edx
test esi, esi
je 0xad605c
movzx esi, byte [ecx]
xor esi, eax
and esi, 0xff
shr eax, 8
xor eax, dword [esi*4 + 0xaf71c8]
inc ecx
jmp 0xad6031
not eax
xor ecx, ecx
cmp eax, 0x39b5d60d
sete cl
mov esi, ecx
jmp 0xad6077
mov dword [ebp - 0x128], esi
mov dword [ebp - 4], 0xfffffffe
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00ae13cb
mov esp, ebp
pop ebp
ret
Function at 0xad6e80
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor esi, esi
push esi
mov ecx, 0xb3c680
call fcn.00ae025b
mov ebx, eax
mov dword [ebp - 4], 1
test ebx, ebx
je 0xad6f34
test esi, esi
jne 0xad6f34
mov eax, dword [ebp + 8]
shr eax, 4
inc eax
push esi
movzx ecx, ax
push ecx
push 6
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
mov edi, eax
test edi, edi
je 0xad6f18
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0xad6f12
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0xad6f12
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 8]
add eax, esi
and ecx, 0xf
jbe 0xad6f01
cmp esi, eax
jae 0xad6f05
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0xad6ef3
cmp esi, eax
jb 0xad6f09
xor eax, eax
jmp 0xad6f12
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
mov esi, eax
test eax, eax
jne 0xad6f3d
mov edi, dword [ebp - 4]
push edi
mov ecx, 0xb3c680
call fcn.00ae025b
mov ebx, eax
inc edi
mov dword [ebp - 4], edi
test ebx, ebx
jne 0xad6ea5
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0xad7040
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
mov eax, dword [ebp + 8]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0xad7058
pop edi
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0xad708a
mov ecx, dword [ebp + 8]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
add eax, esi
and edi, 0xf
jbe 0xad7086
cmp esi, eax
jae 0xad708a
dec edi
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0xad7078
cmp esi, eax
jb 0xad7090
pop esi
xor eax, eax
pop edi
pop ebp
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebp
ret
Function at 0xad9d10
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0xaf2d58
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0xafb520]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
lea eax, [ebp - 0x18]
push 0xb3c080
xor ebx, ebx
push eax
xor esi, esi
mov dword [ebp - 4], ebx
call fcn.00ada1b0
add esp, 8
mov edi, dword [ebp - 0x18]
cmp dword [edi - 0xc], ebx
je 0xad9e16
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
lea ebx, [ebp - 0x24]
mov byte [ebp - 4], 2
call fcn.00ad9ef0
mov ebx, dword [ebp - 0x24]
test eax, eax
jne 0xad9e09
test ebx, ebx
je 0xad9e14
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp + 0xc]
push ecx
push str.__s_
lea edi, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.00ad6de0
mov edi, dword [ebp - 0x14]
mov eax, edi
add esp, 8
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0xad9dc0
sub eax, edx
sar eax, 1
lea edx, [eax + eax + 2]
mov eax, dword [ebp + 8]
push edx
push edi
push 2
push 0
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
neg eax
sbb esi, esi
lea eax, [edi - 0x10]
inc esi
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0xad9e09
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test ebx, ebx
je 0xad9e14
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebx, ebx
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0xad9e5c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0xad9fb0
Capabilities:
Modify service
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0xaf2d20
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0xafb520]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
lea eax, [ebp - 0x20]
xor esi, esi
push 0xb3ba24
xor ebx, ebx
push eax
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x24], ebx
mov dword [ebp - 4], esi
call fcn.00ada1b0
add esp, 8
mov ecx, dword [ebp - 0x20]
cmp dword [ecx - 0xc], esi
je 0xada0da
push 5
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
mov dword [ebp - 0x1c], edi
cmp edi, esi
je 0xada0da
mov edx, dword [ebp - 0x20]
push 0x17
push edx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
mov dword [ebp - 0x24], eax
cmp ebx, esi
je 0xada0d0
lea eax, [ebp - 0x18]
push eax
push esi
push esi
mov dword [ebp - 0x18], esi
mov esi, dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
push ebx
call esi
mov eax, dword [ebp - 0x18]
xor ecx, ecx
cmp eax, ecx
je 0xada0bc
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], ecx
push eax
mov byte [ebp - 4], 2
lea eax, [ebp - 0x11]
lea edi, [ebp - 0x34]
mov byte [ebp - 0x11], cl
call fcn.00ad7650
mov eax, dword [ebp - 0x30]
mov edi, dword [ebp - 0x34]
sub eax, edi
cmp eax, dword [ebp - 0x18]
jne 0xada0af
test edi, edi
je 0xada0af
lea ecx, [ebp - 0x18]
push ecx
push eax
push edi
push ebx
call esi
test eax, eax
je 0xada0af
cmp dword [edi + 4], 2
je 0xada0af
mov edx, dword [edi + 8]
mov eax, dword [edi]
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push edx
push 2
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
lea esi, [ebp - 0x34]
call fcn.00ad7620
mov edi, dword [ebp - 0x1c]
xor ecx, ecx
push ecx
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor ebx, ebx
xor esi, esi
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0xada10a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0xada10a
cmp ebx, esi
je 0xada115
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x1c]
cmp eax, esi
je 0xada123
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0xadafb0
Capabilities:
Check if file exists
Create process on windows
Delete file
Extract resource via kernel32 functions
Move file
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0xaf3168
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0xafb520]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], ebx
cmp edi, ebx
je 0xadb199
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0xadaff3
sub eax, edx
sar eax, 1
je 0xadb199
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0xadb199
push 0x14
push 0x65
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
cmp esi, ebx
je 0xadb18b
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
cmp edi, ebx
je 0xadb199
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
je 0xadb199
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
cmp eax, ebx
je 0xadb199
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
lea ecx, [ebp - 0x30]
push ecx
push edi
mov ecx, eax
mov byte [ebp - 4], 1
call fcn.00ad75a0
add esp, 8
cmp eax, ebx
je 0xadb172
mov edi, dword [ebp - 0x30]
mov esi, dword [ebp - 0x2c]
cmp edi, esi
je 0xadb172
mov edx, dword [ebp + 8]
push 0xaf7718
push edx
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0x1c], ebx
call fcn.00ae2224
add esp, 0xc
test eax, eax
jne 0xadb172
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
je 0xadb172
push eax
sub esi, edi
push esi
push 1
push edi
call fcn.00ae23c2
mov edx, dword [ebp - 0x1c]
xor ecx, ecx
cmp esi, eax
sete cl
push edx
mov esi, ecx
call fcn.00ae24a9
add esp, 0x14
cmp esi, ebx
je 0xadb172
lea esi, [ebp - 0x20]
call fcn.00ad6800
push 0x6b
mov byte [ebp - 4], 2
call fcn.00ad6e80
add esp, 4
cmp eax, ebx
je 0xadb16a
push eax
mov eax, 0x6b
mov edi, esi
call fcn.00ad69d0
cmp eax, ebx
je 0xadb16a
mov edi, dword [ebp - 0x20]
cmp dword [edi - 0xc], ebx
je 0xadb16a
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x14]
push eax
call fcn.00ad6820
lea esi, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.00add9d0
mov eax, edi
call fcn.00add8b0
cmp eax, ebx
je 0xadb162
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0xadb162
mov eax, dword [ebp - 0x14]
push 1
push ebx
push ebx
push eax
push ebx
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov dword [ebp - 0x18], 1
lea eax, [ebp - 0x14]
call fcn.00ade5b0
lea eax, [ebp - 0x20]
call fcn.00ade5b0
lea esi, [ebp - 0x30]
call fcn.00ad7620
jmp 0xadb199
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret