joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4032a0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
lea eax, [ebp - 0x114]
push eax
push 0x20019
push 0
mov ecx, dword [ebp + 8]
add ecx, 0x1b8
push ecx
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40336b
mov dword [ebp - 0x110], 0x104
lea edx, [ebp - 0x110]
push edx
lea eax, [ebp - 0x10c]
push eax
lea ecx, [ebp - 8]
push ecx
push 0
push 0
mov edx, dword [ebp - 0x114]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x114]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 4], 0
jne 0x40336b
push str._shellopenddeexec
lea ecx, [ebp - 0x10c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [ebp - 0x114]
push edx
push 0x20019
push 0
lea eax, [ebp - 0x10c]
push eax
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40336b
mov ecx, dword [ebp - 0x114]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
jmp 0x40336d
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x4033d8
Capabilities:
Copy file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 4], 0
mov eax, 1
test eax, eax
je 0x40347d
mov ecx, dword [ebp - 4]
push ecx
push 0x41d4e8
push str._s_0x
mov edx, dword [ebp + 0x18]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov eax, dword [ebp + 0x14]
xor ecx, ecx
mov cl, byte [eax + 0xb]
test ecx, ecx
jne 0x40342f
mov edx, dword [ebp + 0x14]
add edx, 0x1b8
push edx
mov eax, dword [ebp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
jmp 0x40343e
push str..bak
mov ecx, dword [ebp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
push 0
push 0
push 1
push 0
push 3
push 0xc0000000
mov eax, dword [ebp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
je 0x40346b
jmp 0x40347d
cmp dword [ebp - 4], 0xff
jle 0x403478
xor eax, eax
jmp 0x4034de
jmp 0x4033e5
mov ecx, dword [ebp + 0x14]
xor edx, edx
mov dl, byte [ecx + 0xb]
test edx, edx
jne 0x4034a5
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
jmp 0x4034de
push 0
lea eax, [ebp - 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4034cf
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x4034de
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov esp, ebp
pop ebp
ret
Function at 0x403a08
Capabilities:
Accept command line arguments
Create process on windows
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3b0
mov dword [ebp - 0x2a4], 1
mov eax, dword [ebp + 0xc]
push eax
call fcn.004032a0
add esp, 4
test eax, eax
je 0x403ac5
cmp dword [0x41d4e4], 0
jne 0x403ac5
lea ecx, [ebp - 0x220]
push ecx
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.SHELL32.dll_FindExecutableA]
push 0x44
push 0
lea eax, [ebp - 0x264]
push eax
call fcn.0040a790
add esp, 0xc
mov dword [ebp - 0x264], 0x44
push 0x10
push 0
lea ecx, [ebp - 0x10]
push ecx
call fcn.0040a790
add esp, 0xc
mov word [ebp - 0x234], 5
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x264]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x220]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x403ab6
xor eax, eax
jmp 0x403c48
push 0x493e0
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.USER32.dll_WaitForInputIdle]
mov dword [ebp - 0x2a0], 0x3c
mov dword [ebp - 0x29c], 0x2000140
mov dword [ebp - 0x298], 0
mov dword [ebp - 0x294], str.open
mov eax, dword [ebp + 8]
mov dword [ebp - 0x290], eax
cmp dword [0x41d4e4], 0
je 0x403b56
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [ebp - 0x3b0], eax
push 0x104
lea ecx, [ebp - 0x3a8]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call sub.PSAPI.DLL_GetModuleFileNameExA
mov dword [ebp - 0x3ac], eax
mov edx, dword [ebp - 0x3ac]
mov eax, dword [ebp - 0x3b0]
lea ecx, [eax + edx + 3]
mov dword [ebp - 0x3b0], ecx
mov edx, dword [ebp - 0x3b0]
mov dword [ebp - 0x28c], edx
jmp 0x403b60
mov dword [ebp - 0x28c], 0
mov dword [ebp - 0x284], 5
mov dword [ebp - 0x288], 0
mov dword [ebp - 0x268], 0
lea eax, [ebp - 0x2a0]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
test eax, eax
jne 0x403b96
xor eax, eax
jmp 0x403c48
call fcn.004030ad
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
push ecx
push 0
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x18], eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_SetPriorityClass]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_SetPriorityClass]
cmp dword [0x41d4e4], 0
jne 0x403bf1
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.004016a7
add esp, 8
push 4
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
push 0xffffffffffffffff
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x41dbbc], 0
je 0x403c37
cmp dword [0x41d4e4], 0
jne 0x403c37
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00403559
add esp, 8
mov eax, dword [ebp + 8]
push eax
call fcn.00403232
add esp, 4
mov eax, 1
mov esp, ebp
pop ebp
ret
Function at 0x404723
Capabilities:
Check for software breakpoints
Encrypt data using tea

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
push edi
mov dword [ebp - 0x2c], fcn.00403c4c
mov esi, dword [ebp - 0x2c]
mov al, byte [esi]
cmp al, 0xcc
je 0x4047a5
mov dword [ebp - 0x10], fcn.004054b0
mov esi, dword [ebp - 0x10]
mov al, byte [esi]
cmp al, 0xcc
je 0x4047a5
mov dword [ebp - 0x18], fcn.00404a4f
mov esi, dword [ebp - 0x18]
mov al, byte [esi]
cmp al, 0xcc
je 0x4047a5
mov dword [ebp - 0x24], 0x9e3779b9
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
mov dword [ebp - 0x28], eax
mov dword [ebp - 8], 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
mov dword [ebp - 4], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 8]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0xc]
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x30], 0x20
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x30]
sub ecx, 1
mov dword [ebp - 0x30], ecx
test eax, eax
jle 0x40480b
mov edx, dword [ebp - 8]
sub edx, 0x61c88647
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0x28]
shl eax, 4
add eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x28]
add ecx, dword [ebp - 8]
xor eax, ecx
mov edx, dword [ebp - 0x28]
shr edx, 5
add edx, dword [ebp - 0xc]
xor eax, edx
mov ecx, dword [ebp - 0x20]
add ecx, eax
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x20]
shl edx, 4
add edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 8]
xor edx, eax
mov ecx, dword [ebp - 0x20]
shr ecx, 5
add ecx, dword [ebp - 0x1c]
xor edx, ecx
mov eax, dword [ebp - 0x28]
add eax, edx
mov dword [ebp - 0x28], eax
jmp 0x4047a5
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x20]
mov dword [ecx], edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x28]
mov dword [eax + 4], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x404823
Capabilities:
Check for software breakpoints
Decrypt data using tea

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
push edi
mov dword [ebp - 0x2c], fcn.00403c4c
mov esi, dword [ebp - 0x2c]
mov al, byte [esi]
cmp al, 0xcc
je 0x4048a5
mov dword [ebp - 0x10], fcn.004054b0
mov esi, dword [ebp - 0x10]
mov al, byte [esi]
cmp al, 0xcc
je 0x4048a5
mov dword [ebp - 0x18], fcn.00404823
mov esi, dword [ebp - 0x18]
mov al, byte [esi]
cmp al, 0xcc
je 0x4048a5
mov dword [ebp - 0x24], 0x9e3779b9
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
mov dword [ebp - 0x28], eax
mov dword [ebp - 8], 0xc6ef3720
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
mov dword [ebp - 4], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 8]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0xc]
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x30], 0x20
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x30]
sub ecx, 1
mov dword [ebp - 0x30], ecx
test eax, eax
jle 0x40490a
mov edx, dword [ebp - 0x20]
shl edx, 4
add edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 8]
xor edx, eax
mov ecx, dword [ebp - 0x20]
shr ecx, 5
add ecx, dword [ebp - 0x1c]
xor edx, ecx
mov eax, dword [ebp - 0x28]
sub eax, edx
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
shl ecx, 4
add ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x28]
add edx, dword [ebp - 8]
xor ecx, edx
mov eax, dword [ebp - 0x28]
shr eax, 5
add eax, dword [ebp - 0xc]
xor ecx, eax
mov edx, dword [ebp - 0x20]
sub edx, ecx
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 8]
add eax, 0x61c88647
mov dword [ebp - 8], eax
jmp 0x4048a5
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x20]
mov dword [ecx], edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x28]
mov dword [eax + 4], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x404b09
Capabilities:
Check for software breakpoints
Encrypt data using tea

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
push edi
mov dword [ebp - 0x2c], fcn.00403c4c
mov esi, dword [ebp - 0x2c]
mov al, byte [esi]
cmp al, 0xcc
je 0x404b8b
mov dword [ebp - 0x10], fcn.004054b0
mov esi, dword [ebp - 0x10]
mov al, byte [esi]
cmp al, 0xcc
je 0x404b8b
mov dword [ebp - 0x18], fcn.00404a4f
mov esi, dword [ebp - 0x18]
mov al, byte [esi]
cmp al, 0xcc
je 0x404b8b
mov dword [ebp - 0x24], 0x9e3779b9
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
mov dword [ebp - 0x28], eax
mov dword [ebp - 8], 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
mov dword [ebp - 4], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 8]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0xc]
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x30], 0x20
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x30]
sub ecx, 1
mov dword [ebp - 0x30], ecx
test eax, eax
jle 0x404bf1
mov edx, dword [ebp - 8]
sub edx, 0x61c88647
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0x28]
shl eax, 4
add eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x28]
add ecx, dword [ebp - 8]
xor eax, ecx
mov edx, dword [ebp - 0x28]
shr edx, 5
add edx, dword [ebp - 0xc]
xor eax, edx
mov ecx, dword [ebp - 0x20]
add ecx, eax
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x20]
shl edx, 4
add edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 8]
xor edx, eax
mov ecx, dword [ebp - 0x20]
shr ecx, 5
add ecx, dword [ebp - 0x1c]
xor edx, ecx
mov eax, dword [ebp - 0x28]
add eax, edx
mov dword [ebp - 0x28], eax
jmp 0x404b8b
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x20]
mov dword [ecx], edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x28]
mov dword [eax + 4], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x404c09
Capabilities:
Check for software breakpoints
Decrypt data using tea

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
push edi
mov dword [ebp - 0x2c], fcn.00403c4c
mov esi, dword [ebp - 0x2c]
mov al, byte [esi]
cmp al, 0xcc
je 0x404c8b
mov dword [ebp - 0x10], fcn.004054b0
mov esi, dword [ebp - 0x10]
mov al, byte [esi]
cmp al, 0xcc
je 0x404c8b
mov dword [ebp - 0x18], fcn.00404a4f
mov esi, dword [ebp - 0x18]
mov al, byte [esi]
cmp al, 0xcc
je 0x404c8b
mov dword [ebp - 0x24], 0x9e3779b9
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
mov dword [ebp - 0x28], eax
mov dword [ebp - 8], 0xc6ef3720
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
mov dword [ebp - 4], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 8]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0xc]
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x30], 0x20
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x30]
sub ecx, 1
mov dword [ebp - 0x30], ecx
test eax, eax
jle 0x404cf0
mov edx, dword [ebp - 0x20]
shl edx, 4
add edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 8]
xor edx, eax
mov ecx, dword [ebp - 0x20]
shr ecx, 5
add ecx, dword [ebp - 0x1c]
xor edx, ecx
mov eax, dword [ebp - 0x28]
sub eax, edx
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
shl ecx, 4
add ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x28]
add edx, dword [ebp - 8]
xor ecx, edx
mov eax, dword [ebp - 0x28]
shr eax, 5
add eax, dword [ebp - 0xc]
xor ecx, eax
mov edx, dword [ebp - 0x20]
sub edx, ecx
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 8]
add eax, 0x61c88647
mov dword [ebp - 8], eax
jmp 0x404c8b
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x20]
mov dword [ecx], edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x28]
mov dword [eax + 4], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40513a
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0xc]
xor ecx, ecx
mov cx, word [eax + 0x14]
mov edx, dword [ebp + 0xc]
lea eax, [edx + ecx + 0x18]
mov dword [ebp - 4], eax
mov dword [ebp - 8], 0
jmp 0x40516e
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 4]
add edx, 0x28
mov dword [ebp - 4], edx
mov eax, dword [ebp + 0xc]
xor ecx, ecx
mov cx, word [eax + 6]
cmp dword [ebp - 8], ecx
jae 0x4051b4
mov edx, dword [ebp - 4]
mov eax, dword [edx + 8]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x405194
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x10]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 0xc]
jb 0x4051b2
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0xc]
add eax, dword [ebp - 0xc]
cmp dword [ebp + 8], eax
jae 0x4051b2
mov eax, dword [ebp - 4]
jmp 0x4051b6
jmp 0x40515c
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x4051f9
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x41dbb0]
push eax
push 0
push 1
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 4], eax
push 0
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esp, ebp
pop ebp
ret
Function at 0x405e40
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push 0xf003f
push str.ServicesActive
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x405e65
xor eax, eax
jmp 0x405eb5
push 0xf01ff
push str.NTice
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x20], eax
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x405e9c
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x405eb5
cmp dword [ebp - 0x18], 4
jne 0x405eb3
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
jmp 0x405eb5
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x405f39
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov eax, dword fs:[0x30]
movzx eax, byte [eax + 2]
or al, al
je 0x405f58
mov eax, 1
jmp 0x405f5a
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x405f61
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov dword [ebp - 0xc], ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
push eax
push 1
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 4], eax
push 0
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov esp, ebp
pop ebp
ret
Function at 0x4064f3
Capabilities:
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
mov dword [ebp - 0x114], 0
lea eax, [ebp - 0x114]
push eax
push 1
push 0
push 0x4185a8
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x406534
mov eax, 1
jmp 0x406649
lea ecx, [ebp - 8]
push ecx
lea edx, [ebp - 0x110]
push edx
lea eax, [ebp - 0x118]
push eax
push 0
push 0x4185d4
mov ecx, dword [ebp - 0x114]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x406598
movsx edx, byte [ebp - 0x10b]
cmp edx, 0x3a
jne 0x406598
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x10c]
push ecx
call fcn.0040fb80
add esp, 8
test eax, eax
jne 0x406598
mov edx, dword [ebp - 0x114]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
jmp 0x406649
mov dword [ebp - 0x114], 0
mov dword [ebp - 0xc], 0
lea eax, [ebp - 0x114]
push eax
push 0xf003f
push 0
push str.systemCurrentControlSetServicesHDSYS32
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x406644
push 0x41860c
lea ecx, [ebp - 0x110]
push ecx
call fcn.0040a820
add esp, 8
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x110]
push eax
call fcn.0040a830
add esp, 8
lea ecx, [ebp - 0x110]
push ecx
call fcn.0040a910
add esp, 4
mov dword [ebp - 8], eax
mov edx, dword [ebp - 8]
push edx
lea eax, [ebp - 0x110]
push eax
push 2
push 0
push str.ImagePath
mov ecx, dword [ebp - 0x114]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0x114]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0xc], 0
je 0x406644
xor eax, eax
jmp 0x406649
mov eax, 1
mov esp, ebp
pop ebp
ret
Function at 0x406bd0
Capabilities:
Create service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 8], 0
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x406c9f
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp + 8]
push eax
push 1
push 3
push 1
push 0xf01ff
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x406c50
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x431
jne 0x406c50
push 0xf01ff
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x406c95
push 0
push 0
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x406c7e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
je 0x406c7e
mov dword [ebp - 0x10], 0
jmp 0x406c85
mov dword [ebp - 0x10], 1
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret

Function at 0x4077f0
Capabilities:
Query or enumerate registry key

Disassembly:
sub esp, 0x114
push ebx
mov ebx, dword [esp + 0x11c]
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
push esi
push edi
xor edi, edi
mov dword [esp + 0x14], 0x104
mov dword [esp + 0x10], edi
lea eax, [esp + 0x18]
lea ecx, [esp + 0x14]
push eax
push 0
push 0
push 0
lea edx, [esp + 0x30]
push ecx
push edx
push edi
push ebx
call ebp
mov esi, eax
test esi, esi
jne 0x40786a
lea eax, [esp + 0x24]
push 0x15
push eax
push str.HIDVid_3689Pid_8762
mov dword [esp + 0x20], 0xc8
call fcn.0040a610
add esp, 0xc
test eax, eax
jne 0x40786a
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x12c]
cmp ecx, eax
je 0x40787c
mov eax, ecx
inc eax
mov dword [esp + 0x10], eax
inc edi
test esi, esi
je 0x407815
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x114
ret
mov edx, dword [esp + 0x130]
mov ecx, dword [0x41868c]
mov eax, edx
lea edi, [esp + 0x24]
mov dword [eax], ecx
mov cl, byte [0x418690]
mov byte [eax + 4], cl
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
mov eax, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
Function at 0x407e90
Capabilities:
Decompress data using aplib

Disassembly:
pushal
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
cld
mov dl, 0x80
xor ebx, ebx
movsb byte es:[edi], byte [esi]
mov bl, 2
call fcn.00407f13
jae 0x407e9e
xor ecx, ecx
call fcn.00407f13
jae 0x407ecd
xor eax, eax
call fcn.00407f13
jae 0x407edd
mov bl, 2
inc ecx
mov al, 0x10
call fcn.00407f13
adc al, al
jae 0x407ebf
jne 0x407f09
stosb byte es:[edi], al
jmp 0x407ea1
call fcn.00407f1f
sub ecx, ebx
jne 0x407ee6
call fcn.00407f1d
jmp 0x407f05
lodsb al, byte [esi]
shr eax, 1
je 0x407f2f
adc ecx, ecx
jmp 0x407f02
xchg ecx, eax
dec eax
shl eax, 8
lodsb al, byte [esi]
call fcn.00407f1d
cmp eax, 0x7d00
jae 0x407f02
cmp ah, 5
jae 0x407f03
cmp eax, 0x7f
ja 0x407f04
inc ecx
inc ecx
xchg ebp, eax
mov eax, ebp
mov bl, 1
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x407ea1
sub edi, dword [esp + 0x28]
mov dword [esp + 0x1c], edi
popal
ret
Function at 0x409740
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
pushal
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edi, 0x4187fc
sub eax, eax
test esi, esi
je 0x409820
sub eax, 1
test ecx, ecx
je 0x40981e
test esi, 3
je 0x40977e
xor al, byte [esi]
inc esi
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
dec ecx
jne 0x409763
mov edx, ecx
and edx, 7
shr ecx, 3
je 0x409805
xor eax, dword [esi]
add esi, 4
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
xor eax, dword [esi]
add esi, 4
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
dec ecx
jne 0x40978c
mov ecx, edx
test ecx, ecx
je 0x40981e
xor al, byte [esi]
inc esi
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
dec ecx
jne 0x40980b
not eax
mov dword [esp + 0x1c], eax
popal
ret