joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40191c
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [0x405368]
mov ebx, ecx
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], ebx
push edi
push 9
pop edi
test esi, esi
jne 0x40198c
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov esi, eax
xor edx, edx
mov dword [0x405368], esi
movzx eax, word [esi]
test ax, ax
je 0x40198c
push 0x20
mov ecx, eax
pop ebx
cmp cx, 0x22
jne 0x401968
xor eax, eax
test edx, edx
sete al
mov edx, eax
jmp 0x401976
test edx, edx
jne 0x401976
cmp cx, bx
je 0x401989
cmp cx, di
je 0x401989
add esi, 2
mov dword [0x405368], esi
movzx eax, word [esi]
mov ecx, eax
test ax, ax
jne 0x401957
mov ebx, dword [ebp - 8]
cmp dword [ebx], 0
je 0x4019a8
push dword [ebx]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [0x405368]
and dword [ebx], 0
push 0x20
pop ecx
movzx eax, word [esi]
cmp ax, cx
je 0x4019bb
cmp ax, di
jne 0x4019c6
add esi, 2
mov dword [0x405368], esi
jmp 0x4019ae
mov dword [ebp - 4], esi
test ax, ax
je 0x401a35
push 9
mov edx, esi
mov edi, esi
mov ebx, esi
mov ecx, eax
pop esi
push 0x20
pop eax
cmp cx, ax
je 0x4019ff
mov edi, ebx
cmp cx, si
je 0x4019ff
add edx, 2
mov edi, edx
mov dword [0x405368], edx
mov ebx, edi
movzx eax, word [edx]
mov ecx, eax
test ax, ax
jne 0x4019d9
mov esi, dword [ebp - 4]
sub edi, esi
and edi, 0xfffffffe
lea eax, [edi + 2]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, dword [ebp - 8]
push edi
push esi
push eax
mov dword [ebx], eax
call dword [sym.imp.msvcrt.dll_memcpy]
mov eax, dword [ebp - 0xc]
add esp, 0xc
mov dword [eax], esi
xor eax, eax
inc eax
jmp 0x401a37
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x401ce6
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
lea eax, [ebp - 4]
xor esi, esi
push eax
xor edi, edi
mov dword [ebp - 4], esi
push 0x20
inc edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x401d3c
mov ecx, dword [ebp - 4]
mov edx, str.SeDebugPrivilege
push ebx
call fcn.00401c52
mov ebx, eax
test ebx, ebx
jne 0x401d27
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 2
pop edi
test ebx, ebx
pop ebx
je 0x401d44
xor eax, eax
jmp 0x401d55
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push edi
mov edx, esi
mov ecx, str.Failed_to_acquire_SeDebugPrivilege
call fcn.00401bf4
pop ecx
push 2
pop eax
pop edi
pop esi
leave
ret
Function at 0x401d59
Capabilities:
Enumerate processes on remote desktop session host

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
or ecx, 0xffffffff
xor eax, eax
push edi
mov dword [ebp - 0x14], ecx
inc eax
lea ecx, [ebp - 0xc]
mov dword [ebp - 4], eax
push ecx
lea ecx, [ebp - 0x10]
xor esi, esi
push ecx
push eax
push esi
push esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
call dword [sym.imp.WTSAPI32.dll_WTSEnumerateProcessesW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x401e8f
mov eax, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
test eax, eax
je 0x401de6
cmp dword [edi], esi
jne 0x401dd3
cmp dword [edi + 8], esi
je 0x401dd3
push dword [edi + 8]
push str.services.exe
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x401dd0
cmp dword [edi + 0xc], esi
je 0x401dd0
push 0x16
push dword [edi + 0xc]
call dword [sym.imp.ADVAPI32.dll_IsWellKnownSid]
test eax, eax
jne 0x401de0
mov eax, dword [ebp - 0xc]
add edi, 0x10
sub eax, 1
mov dword [ebp - 0xc], eax
jne 0x401d9f
jmp 0x401de6
mov ecx, dword [edi + 4]
mov dword [ebp - 0x14], ecx
push dword [ebp - 0x10]
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov eax, dword [ebp - 0x14]
mov ecx, esi
mov dword [ebp - 8], ecx
cmp eax, 0xffffffff
je 0x401e96
push 2
pop ebx
push eax
push esi
push 0x1000
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x401e80
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 3
push ecx
push ebx
push eax
mov dword [ebp - 0x14], esi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x401e6b
lea eax, [ebp - 8]
mov dword [ebp - 4], 4
push eax
push ebx
push ebx
push esi
push 0x24
push dword [ebp - 0x14]
mov edi, esi
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x401e60
call ebx
mov edi, eax
mov dword [ebp - 8], esi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401e75
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
mov edi, eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401e8a
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
mov edi, eax
mov ecx, dword [ebp - 8]
jmp 0x401e9b
call ebx
mov ecx, esi
mov dword [ebp - 8], ecx
mov edi, 0xa0001000
test ecx, ecx
je 0x401ed8
inc dword [ebp - 4]
mov edx, str.SeAssignPrimaryTokenPrivilege
call fcn.00401c52
test eax, eax
je 0x401ec3
push dword [ebp - 8]
inc dword [ebp - 4]
push esi
call dword [sym.imp.ADVAPI32.dll_SetThreadToken]
mov esi, eax
test esi, esi
jne 0x401ec7
call ebx
mov edi, eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x401ed8
xor eax, eax
jmp 0x401eeb
push dword [ebp - 4]
mov edx, edi
mov ecx, str.Failed_to_create_system_context
call fcn.00401bf4
pop ecx
push 5
pop eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401ef0
Capabilities:
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
push 9
mov dword [ebp - 0x20], ecx
lea edi, [ebp - 0x44]
pop ecx
xor ebx, ebx
xor edx, edx
inc ebx
mov dword [ebp - 4], edx
push ebx
xor eax, eax
push edx
rep stosd dword es:[edi], eax
push edx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
push 0x14
push str.TrustedInstaller
push eax
mov dword [ebp - 0x18], eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
xor eax, eax
inc eax
mov dword [ebp - 0x1c], esi
mov edi, eax
test esi, esi
je 0x401f9b
push 2
pop ebx
mov dword [ebp - 8], eax
lea eax, [ebp - 0x10]
push eax
push 0x24
lea eax, [ebp - 0x44]
mov dword [ebp - 0x14], ebx
push eax
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x401f9b
xor edi, edi
xor ebx, ebx
cmp dword [ebp - 0x40], 1
sete bl
mov dword [ebp - 0xc], ebx
jne 0x401f91
cmp dword [ebp - 8], edi
je 0x401f91
push edi
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x401f91
lea eax, [ebp - 0x10]
mov dword [ebp - 8], edi
push eax
push 0x24
lea eax, [ebp - 0x44]
push eax
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x401f58
mov edi, dword [ebp - 0xc]
test ebx, ebx
mov ebx, dword [ebp - 0x14]
je 0x401fa4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
push dword [ebp - 0x18]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push dword [ebp - 0x1c]
call esi
mov esi, dword [ebp - 0x20]
and dword [esi], 0
test edi, edi
jne 0x401fe6
push dword [ebp - 0x28]
inc ebx
push edi
push 0x480
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [esi], eax
test eax, eax
jne 0x401fdd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
cmp dword [esi], 0
je 0x401fe6
xor eax, eax
jmp 0x401ff8
mov edx, dword [ebp - 4]
mov ecx, str.Failed_to_open_TrustedInstaller_process
push ebx
call fcn.00401bf4
pop ecx
push 3
pop eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x42e000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
push 4
nop
nop
nop
nop
nop
nop
pop edi
nop
nop
nop
nop
nop
cmp eax, 0
nop
nop
nop
nop
nop
je 0x42e072
nop
mov ebx, 0x407ef8
nop
mov ecx, ebx
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
push eax
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
div edi
nop
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
pop eax
nop
nop
nop
nop
nop
mov esi, 0x2b432f63
nop
nop
nop
nop
xor dword [eax], esi
nop
nop
add eax, edi
nop
nop
loop 0x42e060
nop
nop
nop
nop
nop
mov eax, section..data
nop
nop
cmp eax, 0
nop
nop
nop
nop
je 0x42e0d2
nop
mov ebx, 0x42cd70
nop
nop
nop
nop
mov ecx, ebx
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
nop
push eax
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
div edi
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
pop eax
nop
nop
mov esi, 0x54cb5cab
nop
nop
nop
nop
xor dword [eax], esi
nop
add eax, edi
nop
nop
nop
nop
nop
nop
nop
nop
loop 0x42e0c0
nop
nop
nop
nop
nop
popal
jmp 0x401219
Function at 0x13cfe80
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0xf71000]
push edi
jmp 0x13cfe9a
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x13cfea1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x13cfe90
mov eax, 1
add ebx, ebx
jne 0x13cfeb3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x13cfec4
jne 0x13cfee3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x13cfee3
dec eax
add ebx, ebx
jne 0x13cfed0
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x13cfea8
add ebx, ebx
jne 0x13cfedf
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x13cff35
xor ecx, ecx
sub eax, 3
jb 0x13cfefb
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x13cff6a
sar eax, 1
mov ebp, eax
jmp 0x13cff06
add ebx, ebx
jne 0x13cff06
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x13cfed4
inc ecx
add ebx, ebx
jne 0x13cff14
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x13cfed4
add ebx, ebx
jne 0x13cff21
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x13cff16
jne 0x13cff32
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x13cff16
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x13cff54
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x13cff46
jmp 0x13cfe96
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x13cff54
add edi, ecx
jmp 0x13cfe96
pop esi
mov edi, esi
mov ecx, 0x40f0
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x13cff72
cmp byte [edi], 0x11
jne 0x13cff72
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x13cff77
lea edi, [esi + 0xfc8000]
mov eax, dword [edi]
or eax, eax
je 0x13cffef
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x1ebaaf8]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x1ebac74]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x13cffa4
mov ecx, edi
jns 0x13cffd3
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x1ebac78]
or eax, eax
je 0x13cffe9
mov dword [ebx], eax
add ebx, 4
jmp 0x13cffc1
call dword [esi + 0x1ebac88]
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0x13d0020
cmp al, 0xef
ja 0x13d0013
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0x13cfff5
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
jmp 0x13d0002
mov ebp, dword [esi + 0x1ebac7c]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x23f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x13d0054
sub esp, 0xffffff80
jmp 0x420577
Function at 0x433000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
mov ebx, 0x40de38
nop
nop
mov ecx, 0x7b5537ef
nop
nop
nop
test eax, eax
nop
je 0x43304e
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
inc eax
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
nop
jne 0x433024
nop
mov eax, section..data
nop
nop
mov ebx, 0x4304d8
nop
mov ecx, 0x30c77a5d
nop
test eax, eax
nop
nop
nop
nop
je 0x433084
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
add eax, 4
nop
nop
cmp eax, ebx
nop
nop
nop
jne 0x43306c
nop
nop
nop
nop
nop
popal
nop
nop
nop
nop
jmp 0x431219

Function at 0x42e000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x42e00c
nop
nop
nop
pop eax
nop
nop
add eax, 0x403ac5
nop
sub eax, 0x403a6b
nop
nop
nop
nop
mov ebx, dword [eax]
nop
nop
nop
mov ecx, dword [eax + 4]
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
xor dword [ebx], edx
nop
nop
nop
add ebx, 4
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
jl 0x42e030
nop
add eax, 0xc
nop
nop
cmp dword [eax], 0
nop
nop
nop
nop
nop
nop
nop
jne 0x42e01e
nop
nop
nop
nop
popal
nop
jmp loc.00401219
Function at 0x4010c0
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 [0x42a520]
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 0x4010e0
mov al, 1
mov ecx, 0x46cf80
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, 0x46cfa8
jl 0x401115
mov dword [0x46c380], 0x63
mov dword [0x46f54c], 0
mov edx, 1
jmp 0x401160
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 + 0x46c380], eax
mov dword [eax*4 + 0x46f3c0], edx
inc edx
cmp edx, 0x100
jl 0x401160
xor ecx, ecx
mov dl, byte [ecx + 0x46c380]
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 + 0x46efc0], eax
ror eax, 8
mov dword [ecx + 0x46ebc0], eax
ror eax, 8
mov dword [ecx + 0x46e7c0], eax
ror eax, 8
mov dword [ecx + 0x46e3c0], eax
mov al, byte [ecx + 0x46f3c0]
test al, al
je 0x40126f
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 0x401277
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 + 0x46dfc0], eax
ror eax, 8
mov dword [ecx + 0x46dbc0], eax
ror eax, 8
mov dword [ecx + 0x46cb80], eax
ror eax, 8
mov dword [ecx + 0x46c780], eax
add ecx, 4
cmp ecx, 0x400
jl 0x4011a2
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004106c7
mov esp, ebp
pop ebp
ret
Function at 0x406ea0
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, 0x46a280
call fcn.0040f64b
mov ebx, eax
mov dword [ebp - 4], 1
test ebx, ebx
je 0x406f54
test esi, esi
jne 0x406f54
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 0x406f38
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x406f32
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x406f32
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 8]
add eax, esi
and ecx, 0xf
jbe 0x406f21
cmp esi, eax
jae 0x406f25
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x406f13
cmp esi, eax
jb 0x406f29
xor eax, eax
jmp 0x406f32
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
mov esi, eax
test eax, eax
jne 0x406f5d
mov edi, dword [ebp - 4]
push edi
mov ecx, 0x46a280
call fcn.0040f64b
mov ebx, eax
inc edi
mov dword [ebp - 4], edi
test ebx, ebx
jne 0x406ec5
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 0x407060
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 0x407078
pop edi
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x4070aa
mov ecx, dword [ebp + 8]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
add eax, esi
and edi, 0xf
jbe 0x4070a6
cmp esi, eax
jae 0x4070aa
dec edi
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x407098
cmp esi, eax
jb 0x4070b0
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 0x409310
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421bf8
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x42a520]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
lea eax, [ebp - 0x18]
push 0x426648
xor ebx, ebx
push eax
xor esi, esi
mov dword [ebp - 4], ebx
call fcn.004097b0
add esp, 8
mov edi, dword [ebp - 0x18]
cmp dword [edi - 0xc], ebx
je 0x409416
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.004094f0
mov ebx, dword [ebp - 0x24]
test eax, eax
jne 0x409409
test ebx, ebx
je 0x409414
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 0x4266a8
lea edi, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.00406e00
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 0x4093c0
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 0x409409
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test ebx, ebx
je 0x409414
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 0x40945c
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 0x4095b0
Capabilities:
Modify service
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421bc0
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x42a520]
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 0x4266e8
xor ebx, ebx
push eax
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x24], ebx
mov dword [ebp - 4], esi
call fcn.004097b0
add esp, 8
mov ecx, dword [ebp - 0x20]
cmp dword [ecx - 0xc], esi
je 0x4096da
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 0x4096da
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 0x4096d0
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 0x4096bc
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.00407670
mov eax, dword [ebp - 0x30]
mov edi, dword [ebp - 0x34]
sub eax, edi
cmp eax, dword [ebp - 0x18]
jne 0x4096af
test edi, edi
je 0x4096af
lea ecx, [ebp - 0x18]
push ecx
push eax
push edi
push ebx
call esi
test eax, eax
je 0x4096af
cmp dword [edi + 4], 2
je 0x4096af
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.00407640
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 0x40970a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40970a
cmp ebx, esi
je 0x409715
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x1c]
cmp eax, esi
je 0x409723
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