joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140056540
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x38
cmp byte [rcx + 0xf1e], 0
movsxd r10, r9d
je 0x140056664
cmp r8d, 0xff
jne 0x1400565a1
lea eax, [r10 - 0xec]
cmp eax, 0x13
ja 0x14005658b
lea r8, [0x140000000]
mov r9, qword [r8 + r10*8 + 0x7a700]
mov r8, rdx
lea rdx, str._s_IAC__s_n
add rsp, 0x38
jmp fcn.140032be0
mov r8, rdx
mov r9d, r10d
lea rdx, str._s_IAC__d_n
add rsp, 0x38
jmp fcn.140032be0
cmp r8d, 0xfb
jne 0x1400565b3
lea r9, str.WILL
jmp 0x1400565f1
cmp r8d, 0xfc
jne 0x1400565c5
lea r9, str.WONT
jmp 0x1400565f1
cmp r8d, 0xfd
jne 0x1400565d7
lea r9, [0x14007b124]
jmp 0x1400565f1
xor r9d, r9d
lea rax, str.DONT
cmp r8d, 0xfe
cmove r9, rax
test r9, r9
je 0x14005664d
cmp r10d, 0x27
jg 0x140056624
lea r8, [0x140000000]
mov r8, qword [r8 + r10*8 + 0x7ad20]
test r8, r8
jne 0x140056634
mov r8, rdx
mov dword [rsp + 0x20], r10d
lea rdx, str._s__s__d_n
call fcn.140032be0
add rsp, 0x38
ret
cmp r10d, 0xff
jne 0x14005660b
lea r8, str.EXOPL
mov qword [rsp + 0x20], r8
mov r8, rdx
lea rdx, str._s__s__s_n
call fcn.140032be0
add rsp, 0x38
ret
mov r9d, r8d
mov dword [rsp + 0x20], r10d
mov r8, rdx
lea rdx, str._s__d__d_n
call fcn.140032be0
add rsp, 0x38
ret

Function at 0x1400569b0
Capabilities:
Send data
Send data on socket

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
sub rsp, 0x20
mov rbp, qword [rcx]
mov edi, r8d
mov esi, edx
mov byte [rax + 0x10], 0xff
xor r9d, r9d
mov byte [rax + 0x11], sil
mov rbx, rcx
mov byte [rax + 0x12], dil
mov rcx, qword [rcx + 0x4c0]
lea rdx, [rax + 0x10]
lea r8d, [r9 + 3]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x140056a0f
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.140032a60
mov rcx, qword [rbx]
lea rdx, str.SENT
mov r9d, edi
mov r8d, esi
call fcn.140056540
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
Function at 0x140056bc0
Capabilities:
Send data
Send data on socket

Disassembly:
cmp edx, 0x1f
jne 0x140056d68
push rbp
push rdi
push r14
sub rsp, 0x20
mov rbp, qword [rcx]
mov r14, rcx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], r15
mov rdi, qword [rbp + 0x1e0]
lea rsi, [rdi + 0x1cb8]
lea rbx, [rdi + 0x1eb8]
mov qword [rbx], rsi
cmp rsi, rbx
jae 0x140056c25
lea rax, [rsi + 1]
mov byte [rsi], 0xff
mov qword [rbx], rax
cmp rax, rbx
jae 0x140056c25
mov byte [rax], 0xfa
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x140056c25
mov byte [rax], dl
inc qword [rbx]
movzx ecx, word [rdi + 0x1ca8]
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [rdi + 0x1caa]
movzx r15d, ax
mov word [rsp + 0x48], ax
call qword [sym.imp.WS2_32.dll_htons]
mov r9, qword [rbx]
movzx ecx, ax
cmp r9, rbx
jae 0x140056c5c
mov byte [r9], r15b
inc qword [rbx]
mov r9, qword [rbx]
mov r15, qword [rsp + 0x58]
cmp r9, rbx
jae 0x140056cb2
movzx eax, byte [rsp + 0x49]
mov byte [r9], al
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x140056cb2
mov byte [r9], cl
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x140056cb2
shr cx, 8
mov byte [r9], cl
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x140056cb2
mov byte [r9], 0xff
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x140056cb2
mov byte [r9], 0xf0
mov r9, qword [rbx]
inc r9
mov qword [rdi + 0x1ec0], r9
lea r8, [rdi + 0x1cba]
sub r9, rsi
mov qword [rbx], rsi
sub r9, 2
mov edx, 0x3e
mov rcx, rbp
call fcn.140056670
mov rcx, qword [r14 + 0x4c0]
xor r9d, r9d
mov rdx, rsi
lea r8d, [r9 + 3]
call qword [sym.imp.WS2_32.dll_send]
mov rsi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x40]
test eax, eax
jns 0x140056d14
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.140032a60
lea rdx, [rdi + 0x1cbb]
mov r8d, 4
mov rcx, r14
call fcn.140056a40
mov rcx, qword [r14 + 0x4c0]
lea rdx, [rdi + 0x1cbf]
xor r9d, r9d
lea r8d, [r9 + 2]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x140056d60
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.140032a60
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
Function at 0x1400584d0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbx
push rdi
push r14
sub rsp, 0xd0
mov rax, qword [0x14008b080]
xor rax, rsp
mov qword [rsp + 0xc0], rax
mov rbx, qword [rcx + 0xa00]
lea rax, [rsp + 0x30]
mov rdi, qword [rcx]
mov r14, rcx
mov dword [rsp + 0x30], 0x80
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov r8d, dword [rbx + 0x15c]
mov rdx, qword [rbx + 0x168]
add r8d, 4
mov rcx, qword [rbx + 0x18]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [rbx + 0x150], 0
mov dword [rbx + 0x154], eax
jne 0x140058565
movsxd r8, dword [rsp + 0x30]
lea rcx, [rbx + 0xd0]
lea rdx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + 0x30]
mov dword [rbx + 0x150], eax
mov r8d, dword [rbx + 0x154]
mov qword [rsp + 0xf8], rbp
mov qword [rsp + 0x100], rsi
cmp r8d, 4
jge 0x1400585c6
lea rdx, str.Received_too_short_packet
mov rcx, rdi
call fcn.140032a60
mov dword [rbx + 0xc], 7
xor eax, eax
mov rsi, qword [rsp + 0x100]
mov rbp, qword [rsp + 0xf8]
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.14006be50
add rsp, 0xd0
pop r14
pop rdi
pop rbx
ret
mov rdx, qword [rbx + 0x168]
movzx eax, byte [rdx]
movzx ecx, byte [rdx + 1]
shl eax, 8
or ecx, eax
mov dword [rbx + 0xc], ecx
sub ecx, 3
je 0x140058681
sub ecx, 1
je 0x1400586f4
sub ecx, 1
je 0x140058630
cmp ecx, 1
je 0x140058613
lea r8, str.Internal_error:_Unexpected_packet
mov rcx, rdi
lea rdx, [0x140078b80]
call fcn.140032a60
jmp 0x1400586f4
add r8d, 0xfffffffe
add rdx, 2
mov rcx, rbx
call fcn.140058200
test eax, eax
je 0x1400586f4
jmp 0x14005859a
movzx ecx, byte [rdx + 2]
lea eax, [r8 - 4]
movsxd rbp, eax
lea rsi, [rdx + 4]
movzx eax, byte [rdx + 3]
mov r8, rbp
shl ecx, 8
xor edx, edx
or ecx, eax
mov dword [rbx + 8], ecx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memchr
test rax, rax
je 0x1400586f4
sub rax, rsi
cmp rax, rbp
jae 0x1400586f4
mov r8, rsi
lea rdx, str.TFTP_error:__s_n
mov rcx, rdi
call fcn.140032be0
jmp 0x1400586f4
cmp r8d, 4
jle 0x1400586f4
movzx eax, byte [rdx + 3]
movzx ecx, byte [rdx + 2]
shl ecx, 8
or ecx, eax
movzx eax, word [rbx + 0x48]
inc eax
movzx eax, ax
cmp eax, ecx
jne 0x1400586f4
lea eax, [r8 - 4]
mov rcx, r14
lea r8, [rdx + 4]
movsxd r9, eax
mov edx, 1
call fcn.140032980
mov esi, eax
test eax, eax
je 0x1400586d3
mov edx, 5
mov rcx, rbx
call fcn.1400591c0
mov eax, esi
jmp 0x14005859a
mov eax, dword [rbx + 0x154]
mov rcx, rdi
sub eax, 4
cdqe
add qword [rdi + 0xf8], rax
mov rdx, qword [rdi + 0xf8]
call fcn.140041420
mov rcx, r14
call fcn.140041700
test eax, eax
je 0x140058598
mov edx, 5
mov rcx, rbx
call fcn.1400591c0
mov eax, Ordinal_45
jmp 0x14005859a
Function at 0x14006b490
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rdi
push r14
sub rsp, 0x20
mov eax, dword [rcx + 0x18]
mov rbx, rcx
mov ebp, r8d
mov r14, rdx
lea ecx, [rax + rax]
mov eax, dword [rbx + 0x20]
add rax, 0x18
add rcx, rax
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x14006b4d2
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
lea rcx, [rax + 0x18]
mov qword [rax], rbx
mov qword [rax + 8], rcx
mov eax, dword [rbx + 0x18]
add rax, rcx
mov qword [rsp + 0x48], rsi
mov qword [rdi + 0x10], rax
cmp ebp, dword [rbx + 0x1c]
jbe 0x14006b519
call qword [rbx]
mov rcx, qword [rdi + 8]
mov r8d, ebp
mov rdx, r14
call qword [rbx + reloc.WS2_32.dll_htonl]
mov r14d, dword [rbx + 0x18]
add r14, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
mov rcx, r14
call qword [rbx + reloc.WS2_32.dll_recv]
mov rcx, qword [rdi + 8]
mov ebp, dword [rbx + 0x20]
call qword [rbx]
mov rcx, qword [rdi + 0x10]
call qword [rbx]
xor esi, esi
test rbp, rbp
je 0x14006b572
mov rsi, rbp
nop dword [rax + rax]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x36
mov r8d, 1
mov byte [rsp + 0x40], al
mov rcx, qword [rdi + 8]
call qword [rbx + reloc.WS2_32.dll_htonl]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x5c
lea r14, [r14 + 1]
mov byte [rsp + 0x40], al
mov r8d, 1
mov rcx, qword [rdi + 0x10]
call qword [rbx + reloc.WS2_32.dll_htonl]
sub rbp, 1
jne 0x14006b530
mov eax, dword [rbx + 0x1c]
cmp rsi, rax
jae 0x14006b5b3
nop word [rax + rax]
mov rcx, qword [rdi + 8]
lea rdx, [0x14007e30a]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov rcx, qword [rdi + 0x10]
lea rdx, [0x14007e30b]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov eax, dword [rbx + 0x1c]
inc rsi
cmp rsi, rax
jb 0x14006b580
mov rsi, qword [rsp + 0x48]
mov rax, rdi
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret

Function at 0x14006c554
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14006c59e
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14006c59e
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14006c59e
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14006c59e
cmp dword [rcx + 0x84], 0xe
jbe 0x14006c59e
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x14006c5a0
xor al, al
add rsp, 0x28
ret
Function at 0x140001019
Capabilities:
Check for time delay via gettickcount
Query service status
Stop service

Disassembly:
jmp 0x140002890
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x60
call qword [sym.imp.KERNEL32.dll_GetTickCount]
lea rdi, [0x1400087a0]
lea r9, str.WbioSrvc
mov rdx, rdi
sub r9, rdi
mov r8d, 0x50
mov ebx, eax
nop
lea rcx, [r8 + 0x7fffffae]
test rcx, rcx
je 0x1400028e3
movzx eax, byte [r9 + rdx]
test al, al
je 0x1400028e3
mov byte [rdx], al
add rdx, 1
sub r8, 1
jne 0x1400028c0
jmp 0x1400028e8
test r8, r8
jne 0x1400028ec
sub rdx, 1
mov byte [rdx], 0
mov r8d, 0xf003f
xor ecx, ecx
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
test rax, rax
mov qword [0x140008780], rax
je 0x140002ace
mov r8d, 0x2c
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
test rax, rax
mov qword [0x140008758], rax
je 0x140002ac1
lea rcx, [rsp + 0x70]
lea r8, [rsp + 0x30]
mov r9d, 0x24
mov qword [rsp + 0x20], rcx
mov rcx, rax
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140002ab4
mov eax, dword [rsp + 0x34]
cmp eax, 1
je 0x140002ab4
cmp eax, 3
mov edi, 0x2710
jne 0x1400029e9
mov eax, 0xcccccccd
mul dword [rsp + 0x48]
shr edx, 3
cmp edx, 0x3e8
jae 0x14000298b
mov edx, 0x3e8
jmp 0x140002990
cmp edx, edi
cmova edx, edi
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, qword [0x140008758]
lea r11, [rsp + 0x70]
lea r8, [rsp + 0x30]
mov r9d, 0x24
xor edx, edx
mov qword [rsp + 0x20], r11
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140002a9f
cmp dword [rsp + 0x34], 1
je 0x140002ab4
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, 0x7530
ja 0x140002ab4
cmp dword [rsp + 0x34], 3
je 0x140002970
call fcn.140001005
mov rcx, qword [0x140008758]
lea r8, [rsp + 0x30]
mov edx, 1
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x140002a1b
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ControlService_failed___d__n
jmp 0x140002aac
cmp dword [rsp + 0x34], 1
je 0x140002ab4
nop
nop
nop
mov eax, 0xcccccccd
mul dword [rsp + 0x48]
shr edx, 3
cmp edx, 0x3e8
jae 0x140002a4b
mov edx, 0x3e8
jmp 0x140002a50
cmp edx, edi
cmova edx, edi
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, qword [0x140008758]
lea r11, [rsp + 0x70]
lea r8, [rsp + 0x30]
mov r9d, 0x24
xor edx, edx
mov qword [rsp + 0x20], r11
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140002a9f
cmp dword [rsp + 0x34], 1
je 0x140002ab4
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, 0x7530
ja 0x140002ab4
cmp dword [rsp + 0x34], 1
jne 0x140002a30
jmp 0x140002ab4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.QueryServiceStatusEx_failed___d__n
mov edx, eax
call qword [sym.imp.MSVCR80.dll_printf]
mov rcx, qword [0x140008758]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [0x140008780]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbx, qword [rsp + 0x78]
add rsp, 0x60
pop rdi
ret
Function at 0x14000103c
Capabilities:
Delete service
Query service status

Disassembly:
jmp 0x140002410
push rdi
sub rsp, 0x40
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
test rax, rax
mov rdi, rax
je 0x140002488
mov rdx, qword [section..data]
mov r8d, 0x10004
mov rcx, rax
mov qword [rsp + 0x50], rbx
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
test rax, rax
mov rbx, rax
je 0x14000247a
lea rdx, [rsp + 0x20]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x140002471
cmp dword [rsp + 0x24], 1
jne 0x140002471
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbx, qword [rsp + 0x50]
add rsp, 0x40
pop rdi
ret

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

Disassembly:
jmp 0x140002300
push rbx
sub rsp, 0xe0
mov rax, qword [0x140008018]
xor rax, rsp
mov qword [rsp + 0xd0], rax
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 2]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
test rax, rax
mov rbx, rax
je 0x1400023b5
lea rdx, [rsp + 0x70]
mov r8d, 0x51
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x1400023ac
mov rdx, qword [section..data]
xor ecx, ecx
lea rax, [rsp + 0x70]
mov qword [rsp + 0x60], rcx
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], ecx
mov r9d, 0xf01ff
mov r8, rdx
mov rcx, rbx
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x10
call qword [sym.imp.ADVAPI32.dll_CreateServiceA]
test rax, rax
je 0x1400023ac
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [rsp + 0xd0]
xor rcx, rsp
call fcn.1400033a0
add rsp, 0xe0
pop rbx
ret

Function at 0x14000105a
Capabilities:
Query or enumerate registry value

Disassembly:
jmp 0x140002110
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
sub rsp, 0x40
xor ebx, ebx
test rdx, rdx
mov rbp, r9
mov r12, r8
mov rdi, rdx
mov esi, 1
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x68], 4
mov dword [rsp + 0x30], 4
je 0x140002171
cmp byte [rdx], bl
je 0x140002171
lea rax, [rsp + 0x38]
mov r9d, esi
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x14000219d
mov rcx, qword [rsp + 0x38]
jmp 0x140002176
mov qword [rsp + 0x38], rcx
lea rax, [rsp + 0x68]
lea r9, [rsp + 0x30]
xor r8d, r8d
mov qword [rsp + 0x28], rax
mov rdx, r12
mov qword [rsp + 0x20], rbp
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
cmovne esi, ebx
mov ebx, esi
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x1400021b7
test rdi, rdi
je 0x1400021b7
cmp byte [rdi], 0
je 0x1400021b7
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rbp, qword [rsp + 0x70]
mov eax, ebx
mov rbx, qword [rsp + 0x60]
add rsp, 0x40
pop r12
pop rdi
pop rsi
ret
Function at 0x140002110
Capabilities:
Query or enumerate registry value

Disassembly:
jmp 0x140002110
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
sub rsp, 0x40
xor ebx, ebx
test rdx, rdx
mov rbp, r9
mov r12, r8
mov rdi, rdx
mov esi, 1
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x68], 4
mov dword [rsp + 0x30], 4
je 0x140002171
cmp byte [rdx], bl
je 0x140002171
lea rax, [rsp + 0x38]
mov r9d, esi
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x14000219d
mov rcx, qword [rsp + 0x38]
jmp 0x140002176
mov qword [rsp + 0x38], rcx
lea rax, [rsp + 0x68]
lea r9, [rsp + 0x30]
xor r8d, r8d
mov qword [rsp + 0x28], rax
mov rdx, r12
mov qword [rsp + 0x20], rbp
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
cmovne esi, ebx
mov ebx, esi
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x1400021b7
test rdi, rdi
je 0x1400021b7
cmp byte [rdi], 0
je 0x1400021b7
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rbp, qword [rsp + 0x70]
mov eax, ebx
mov rbx, qword [rsp + 0x60]
add rsp, 0x40
pop r12
pop rdi
pop rsi
ret

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

Disassembly:
jmp 0x140002300
push rbx
sub rsp, 0xe0
mov rax, qword [0x140008018]
xor rax, rsp
mov qword [rsp + 0xd0], rax
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 2]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
test rax, rax
mov rbx, rax
je 0x1400023b5
lea rdx, [rsp + 0x70]
mov r8d, 0x51
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x1400023ac
mov rdx, qword [section..data]
xor ecx, ecx
lea rax, [rsp + 0x70]
mov qword [rsp + 0x60], rcx
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], ecx
mov r9d, 0xf01ff
mov r8, rdx
mov rcx, rbx
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x10
call qword [sym.imp.ADVAPI32.dll_CreateServiceA]
test rax, rax
je 0x1400023ac
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [rsp + 0xd0]
xor rcx, rsp
call fcn.1400033a0
add rsp, 0xe0
pop rbx
ret

Function at 0x140002410
Capabilities:
Delete service
Query service status

Disassembly:
jmp 0x140002410
push rdi
sub rsp, 0x40
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
test rax, rax
mov rdi, rax
je 0x140002488
mov rdx, qword [section..data]
mov r8d, 0x10004
mov rcx, rax
mov qword [rsp + 0x50], rbx
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
test rax, rax
mov rbx, rax
je 0x14000247a
lea rdx, [rsp + 0x20]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x140002471
cmp dword [rsp + 0x24], 1
jne 0x140002471
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbx, qword [rsp + 0x50]
add rsp, 0x40
pop rdi
ret
Function at 0x140002890
Capabilities:
Check for time delay via gettickcount
Query service status
Stop service

Disassembly:
jmp 0x140002890
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x60
call qword [sym.imp.KERNEL32.dll_GetTickCount]
lea rdi, [0x1400087a0]
lea r9, str.WbioSrvc
mov rdx, rdi
sub r9, rdi
mov r8d, 0x50
mov ebx, eax
nop
lea rcx, [r8 + 0x7fffffae]
test rcx, rcx
je 0x1400028e3
movzx eax, byte [r9 + rdx]
test al, al
je 0x1400028e3
mov byte [rdx], al
add rdx, 1
sub r8, 1
jne 0x1400028c0
jmp 0x1400028e8
test r8, r8
jne 0x1400028ec
sub rdx, 1
mov byte [rdx], 0
mov r8d, 0xf003f
xor ecx, ecx
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
test rax, rax
mov qword [0x140008780], rax
je 0x140002ace
mov r8d, 0x2c
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
test rax, rax
mov qword [0x140008758], rax
je 0x140002ac1
lea rcx, [rsp + 0x70]
lea r8, [rsp + 0x30]
mov r9d, 0x24
mov qword [rsp + 0x20], rcx
mov rcx, rax
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140002ab4
mov eax, dword [rsp + 0x34]
cmp eax, 1
je 0x140002ab4
cmp eax, 3
mov edi, 0x2710
jne 0x1400029e9
mov eax, 0xcccccccd
mul dword [rsp + 0x48]
shr edx, 3
cmp edx, 0x3e8
jae 0x14000298b
mov edx, 0x3e8
jmp 0x140002990
cmp edx, edi
cmova edx, edi
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, qword [0x140008758]
lea r11, [rsp + 0x70]
lea r8, [rsp + 0x30]
mov r9d, 0x24
xor edx, edx
mov qword [rsp + 0x20], r11
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140002a9f
cmp dword [rsp + 0x34], 1
je 0x140002ab4
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, 0x7530
ja 0x140002ab4
cmp dword [rsp + 0x34], 3
je 0x140002970
call fcn.140001005
mov rcx, qword [0x140008758]
lea r8, [rsp + 0x30]
mov edx, 1
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x140002a1b
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ControlService_failed___d__n
jmp 0x140002aac
cmp dword [rsp + 0x34], 1
je 0x140002ab4
nop
nop
nop
mov eax, 0xcccccccd
mul dword [rsp + 0x48]
shr edx, 3
cmp edx, 0x3e8
jae 0x140002a4b
mov edx, 0x3e8
jmp 0x140002a50
cmp edx, edi
cmova edx, edi
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, qword [0x140008758]
lea r11, [rsp + 0x70]
lea r8, [rsp + 0x30]
mov r9d, 0x24
xor edx, edx
mov qword [rsp + 0x20], r11
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140002a9f
cmp dword [rsp + 0x34], 1
je 0x140002ab4
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, 0x7530
ja 0x140002ab4
cmp dword [rsp + 0x34], 1
jne 0x140002a30
jmp 0x140002ab4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.QueryServiceStatusEx_failed___d__n
mov edx, eax
call qword [sym.imp.MSVCR80.dll_printf]
mov rcx, qword [0x140008758]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [0x140008780]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbx, qword [rsp + 0x78]
add rsp, 0x60
pop rdi
ret
Function at 0x140003470
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rax, qword gs:[0x30]
mov rbx, qword [rax + 8]
xor esi, esi
mov edi, esi
xor eax, eax
lock cmpxchg qword [0x140008800], rbx
je 0x1400034b6
cmp rax, rbx
jne 0x1400034a9
mov edi, 1
jmp 0x1400034b6
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140003490
mov eax, dword [0x1400087f0]
cmp eax, 1
jne 0x1400034cb
lea ecx, [rax + 0x1e]
call sub.MSVCR80.dll__amsg_exit
jmp 0x14000350a
mov eax, dword [0x1400087f0]
test eax, eax
jne 0x140003500
mov dword [0x1400087f0], 1
lea rdx, [0x140006660]
lea rcx, [0x140006330]
call sub.MSVCR80.dll__initterm_e
test eax, eax
je 0x14000350a
mov eax, 0xff
jmp 0x1400035eb
mov dword [0x14000819c], 1
mov eax, dword [0x1400087f0]
cmp eax, 1
jne 0x140003532
lea rdx, [0x140006220]
lea rcx, [section..rdata]
call sub.MSVCR80.dll__initterm
mov dword [0x1400087f0], 2
test edi, edi
jne 0x14000353d
xchg qword [0x140008800], rsi
cmp qword [0x140008828], 0
je 0x140003566
lea rcx, [0x140008828]
call fcn.140003b80
test eax, eax
je 0x140003566
xor r8d, r8d
lea edx, [r8 + 2]
xor ecx, ecx
call qword [0x140008828]
mov rcx, qword [sym.imp.MSVCR80.dll___initenv]
mov rax, qword [0x140008180]
mov qword [rcx], rax
mov r8, qword [0x140008180]
mov rdx, qword [0x140008188]
mov ecx, dword [0x140008178]
call fcn.14000104b
mov dword [0x140008198], eax
cmp dword [0x14000817c], 0
jne 0x1400035a7
mov ecx, eax
call qword [sym.imp.MSVCR80.dll_exit]
cmp dword [0x14000819c], 0
jne 0x1400035bc
call qword [sym.imp.MSVCR80.dll__cexit]
mov eax, dword [0x140008198]
jmp 0x1400035eb
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
sub rsp, 0x28
call fcn.140099000
add rsp, 0x28
jmp 0x140003470