joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1801eea10
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
xor edi, edi
mov rax, r15
lea rcx, [0x1803395b0]
and eax, 0x3f
mov r12, r15
sar r12, 6
mov rsi, rdx
lea r9d, [rdi + 0xa]
mov r14, r15
lea rbp, [rax + rax*8]
mov rax, qword [rcx + r12*8]
mov r10, qword [rax + rbp*8 + 0x28]
test r8, r8
je 0x1801eea66
cmp word [rdx], r9w
jne 0x1801eea66
or byte [rax + rbp*8 + 0x38], 4
jmp 0x1801eea6b
and byte [rax + rbp*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rax, rsi
mov rbx, rsi
cmp rsi, r8
jae 0x1801eebea
mov r11d, reloc.WS2_32.dll_listen
lea r13d, [r11 - 0xb]
movzx edx, word [rax]
cmp dx, 0x1a
je 0x1801eebb5
lea rcx, [rax + 2]
cmp dx, r11w
jne 0x1801eeab3
cmp rcx, r8
jae 0x1801eead3
cmp word [rcx], r9w
jne 0x1801eeab3
add rax, 4
mov edx, r9d
jmp 0x1801eeab6
mov rax, rcx
mov word [rbx], dx
mov r9, r13
mov rcx, rbx
mov r9d, 0xa
lea rbx, [rbx + r13]
cmp rax, r8
jb 0x1801eea88
jmp 0x1801eebea
lea r9, [rsp + 0x80]
mov word [rsp + 0x70], di
mov r8d, r13d
mov dword [rsp + 0x80], edi
lea rdx, [rsp + 0x70]
mov qword [rsp + 0x20], rdi
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1801eebae
cmp dword [rsp + 0x80], edi
je 0x1801eebae
lea r9, [0x1803395b0]
mov rax, qword [r9 + r12*8]
test byte [rax + rbp*8 + 0x38], 0x48
mov ebp, 0xa
je 0x1801eeb88
movzx eax, word [rsp + 0x70]
cmp ax, bp
jne 0x1801eeb3b
mov word [rbx], bp
jmp 0x1801eebe7
mov word [rsp + 0x78], ax
mov rdx, r14
mov rax, r14
sar rdx, 6
and eax, 0x3f
mov word [rbx], reloc.WS2_32.dll_listen
lea r8, [rax + rax*8]
mov rax, qword [r9 + rdx*8]
lea rcx, [rax + r8*8]
mov al, byte [rsp + rdi + 0x78]
mov byte [rcx + rdi + 0x3a], al
inc rdi
cmp rdi, r13
jl 0x1801eeb56
mov rax, r14
sar rax, 6
and r14d, 0x3f
mov rax, qword [r9 + rax*8]
lea rcx, [r14 + r14*8]
mov byte [rax + rcx*8 + 0x3c], bpl
jmp 0x1801eebe7
cmp word [rsp + 0x70], bp
jne 0x1801eeb94
cmp rbx, rsi
je 0x1801eeb33
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.1801fdca4
cmp word [rsp + 0x70], bp
je 0x1801eebea
mov word [rbx], reloc.WS2_32.dll_listen
jmp 0x1801eebe7
mov rcx, r15
lea r9, [0x1803395b0]
and ecx, 0x3f
mov rax, r15
sar rax, 6
lea r8, [rcx + rcx*8]
mov rcx, qword [r9 + rax*8]
mov al, byte [rcx + r8*8 + 0x38]
test al, 0x40
jne 0x1801eebe4
or al, r13b
mov byte [rcx + r8*8 + 0x38], al
jmp 0x1801eebea
mov word [rbx], dx
add rbx, r13
sub rbx, rsi
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x1801fb5dc
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
mov rax, qword [0x180356050]
mov ebx, r9d
mov rdi, r8
mov esi, edx
mov rbp, rcx
cmp rax, 0xffffffffffffffff
je 0x1801fb641
test rax, rax
jne 0x1801fb62f
lea r9, [0x1802bf1d0]
lea r8, [0x1802bf1c8]
lea rdx, [0x1802bf1d0]
lea ecx, [rax + 0xa]
call fcn.1801faca8
test rax, rax
je 0x1801fb641
mov r9d, ebx
mov r8, rdi
mov edx, esi
mov rcx, rbp
call fcn.1802136f0
jmp 0x1801fb65b
xor edx, edx
mov rcx, rbp
call fcn.1801fbab0
mov ecx, eax
mov r9d, ebx
mov r8, rdi
mov edx, esi
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret

Function at 0x1801fd420
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x1801fd436
mov al, 1
jmp 0x1801fd4a2
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x1801fd447
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x1801fd4a0
mov ecx, dword [rcx + 0x18]
nop
call fcn.1801e99cc
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1801fd4a0
and qword [rsp + 0x38], 0
lea r8, [rsp + 0x38]
mov r9d, 1
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x1801fd4a0
and qword [rsp + 0x30], 0
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1801fd4a0
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x1801fd4a2
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x1801ffcd8
Capabilities:
Clear file content

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.1801fdca4
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.1801fdca4
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x1801ffe25
cmp rax, 0xffffffffffffffff
je 0x1801ffe25
xor edi, edi
test rbp, rbp
jle 0x1801ffdd3
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.1801fa290
mov rbx, rax
test rax, rax
jne 0x1801ffd60
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x1801ffdc9
mov edx, 0x8000
mov ecx, r14d
call fcn.1801ff8cc
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.1801f0150
cmp eax, 0xffffffff
je 0x1801ffda9
cdqe
sub rbp, rax
test rbp, rbp
jg 0x1801ffd70
mov edx, r15d
mov ecx, r14d
call fcn.1801ff8cc
jmp 0x1801ffdc9
cmp byte [rsi + 0x38], dil
je 0x1801ffdc0
cmp dword [rsi + 0x34], 5
jne 0x1801ffdc0
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], reloc.WS2_32.dll_listen
cmp byte [rsi + 0x30], dil
je 0x1801ffdc9
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.1801f6370
jmp 0x1801ffe37
jns 0x1801ffe37
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.1801fdca4
cmp rax, 0xffffffffffffffff
jne 0x1801ffdf1
cmp byte [rsi + 0x30], dil
je 0x1801ffe37
jmp 0x1801ffe2d
mov ecx, r14d
call fcn.1801e99cc
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1801ffe37
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, reloc.WS2_32.dll_listen
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], reloc.WS2_32.dll_listen
jmp 0x1801ffe37
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x1801ffe32
mov edi, dword [rsi + 0x2c]
jmp 0x1801ffe37
mov edi, socket
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.1801fdca4
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret
Function at 0x180207bec
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
xor esi, esi
mov rdi, rdx
mov dword [rsp + 0x30], esi
mov rbx, rcx
test rcx, rcx
je 0x180207c5f
cmp word [rcx], si
je 0x180207c5f
lea rdx, [0x1802c28f8]
call fcn.180211144
test eax, eax
je 0x180207c5f
lea rdx, [0x1802c2910]
mov rcx, rbx
call fcn.180211144
test eax, eax
jne 0x180207c55
mov ecx, dword [rdi + 8]
lea r9d, [rsi + 2]
lea r8, [rsp + 0x30]
mov edx, 0x2000000b
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x180207c7c
mov eax, dword [rsp + 0x30]
jmp 0x180207c8e
mov rcx, rbx
call fcn.1801f4eac
jmp 0x180207c8e
mov ecx, dword [rdi + 8]
lea r8, [rsp + 0x30]
mov r9d, 2
mov edx, 0x20001004
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
jne 0x180207c80
xor eax, eax
jmp 0x180207c8e
mov eax, dword [rsp + 0x30]
test eax, eax
jne 0x180207c8e
call qword [sym.imp.KERNEL32.dll_GetACP]
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x180207cc4
Capabilities:
Get geographical location

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
sub rsp, 0x20
xor ebx, ebx
mov ebp, edx
mov dword [rax + 8], ebx
mov edi, ecx
call fcn.1801f5d90
mov ecx, edi
lea r9d, [rbx + 2]
and ecx, 0x3ff
lea r8, [rsp + 0x30]
bts ecx, 0xa
mov edx, 0x20000001
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x180207d67
cmp edi, dword [rsp + 0x30]
je 0x180207d60
test ebp, ebp
je 0x180207d60
mov r9, qword [rsi + 0x98]
mov r8d, ebx
movzx edx, word [r9]
lea rcx, [r9 + 2]
lea eax, [rdx - 0x41]
cmp ax, 0x19
jbe 0x180207d3c
sub dx, 0x61
cmp dx, 0x19
ja 0x180207d48
movzx edx, word [rcx]
inc r8d
add rcx, 2
jmp 0x180207d29
or rax, 0xffffffffffffffff
inc rax
cmp word [r9 + rax*2], bx
jne 0x180207d4c
cmp r8d, eax
setne bl
mov eax, ebx
jmp 0x180207d69
mov eax, 1
jmp 0x180207d69
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
Function at 0x1802093dc
Capabilities:
Delete file

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1802093fc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.18019d65c
or eax, 0xffffffff
jmp 0x1802093fe
xor eax, eax
add rsp, 0x28
ret
Function at 0x18020b288
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x18020b2b8
xor eax, eax
jmp 0x18020b37b
mov rbp, rbx
cmp word [rax], si
je 0x18020b2dd
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x18020b2c4
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x18020b2c0
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.1801fefc8
movsxd r14, eax
mov rcx, r14
test eax, eax
jne 0x18020b31e
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x18020b2b1
call fcn.1801f6760
mov rdi, rax
test rax, rax
jne 0x18020b334
xor ecx, ecx
call fcn.1801f6370
jmp 0x18020b313
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.1801fefc8
test eax, eax
jne 0x18020b365
mov rcx, rdi
call fcn.1801f6370
jmp 0x18020b36f
xor ecx, ecx
call fcn.1801f6370
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret

Function at 0x18020b398
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x18020b41f
mov rsi, rbx
cmp word [rax], bp
je 0x18020b3de
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x18020b3c8
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x18020b3c4
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.1801f6760
mov rdi, rax
test rax, rax
je 0x18020b40c
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.1802138b0
mov rbp, rdi
xor ecx, ecx
call fcn.1801f6370
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x180210660
Capabilities:
Get disk information

Disassembly:
push rbx
sub rsp, 0x30
mov rax, qword [0x18032b600]
xor rax, rsp
mov qword [rsp + 0x28], rax
cmp ecx, 0x1a
jbe 0x1802106aa
call fcn.18019d6a8
mov dword [rax], reloc.WS2_32.dll_ntohs
call fcn.18019d6cc
mov dword [rax], reloc.WS2_32.dll_listen
call fcn.18019d1b8
xor eax, eax
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.180150a90
add rsp, 0x30
pop rbx
ret
xor ebx, ebx
test ecx, ecx
jne 0x1802106b5
lea eax, [rbx + 1]
jmp 0x180210697
add cx, 0x40
mov dword [rsp + 0x22], 0x5c003a
mov word [rsp + 0x20], cx
lea rcx, [rsp + 0x20]
mov word [rsp + 0x26], bx
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
test eax, eax
je 0x180210695
cmp eax, 1
setne bl
mov eax, ebx
jmp 0x180210697
Function at 0x180211c00
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.18019fdb0
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x180211c8a
cmp byte [rbp - 0x21], r15b
je 0x180211c85
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x180211cc0
call fcn.1801fb270
test eax, eax
jne 0x180211cac
cmp byte [rbp - 0x21], r15b
je 0x180211ca4
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x180211cc0
cmp byte [rbp - 0x21], r15b
je 0x180211cbd
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.1801cf7c8
test eax, eax
jne 0x180211d60
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.18019fdb0
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x180211cff
cmp byte [rbp - 0x21], r15b
je 0x180211d34
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x180211d34
call fcn.1801fb270
test eax, eax
jne 0x180211d20
cmp byte [rbp - 0x21], r15b
je 0x180211d19
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x180211d34
cmp byte [rbp - 0x21], r15b
je 0x180211d31
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.1801cf7c8
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x180211d60
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x180211d63
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x180211d71
mov rcx, rdi
call fcn.1801f6370
cmp byte [rbp + 0x3f], r15b
je 0x180211d80
mov rcx, qword [rbp + 0x27]
call fcn.1801f6370
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret

Function at 0x1802133c0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1802133e8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x1802133e8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140001080
Capabilities:
Accept command line arguments

Disassembly:
push rsi
sub rsp, 0x50
lea rax, str.EpsonScanSvc
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x28], rax
lea rax, [0x140001200]
mov dword [0x1400174e4], 0
mov qword [rsp + 0x30], rax
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea rdx, [rsp + 0x20]
mov rcx, rax
call qword [sym.imp.SHELL32.dll_CommandLineToArgvW]
test rax, rax
mov rsi, rax
je 0x1400011f7
mov qword [rsp + 0x68], rdi
xor edi, edi
cmp dword [rsp + 0x20], edi
jle 0x140001181
mov qword [rsp + 0x60], rbx
mov rbx, rax
nop
nop
nop
nop
mov rcx, qword [rbx]
lea rdx, str._INSTALL
mov r8d, 8
call fcn.140002e90
test eax, eax
je 0x140001172
mov rcx, qword [rbx]
lea rdx, str._START
mov r8d, 6
call fcn.140002e90
test eax, eax
je 0x140001166
mov rcx, qword [rbx]
lea rdx, str._REMOVE
mov r8d, 7
call fcn.140002e90
test eax, eax
je 0x14000115a
add edi, 1
add rbx, 8
cmp edi, dword [rsp + 0x20]
jl 0x140001100
jmp 0x14000117c
mov dword [0x1400174e4], 3
jmp 0x14000117c
mov dword [0x1400174e4], 2
jmp 0x14000117c
mov dword [0x1400174e4], 1
mov rbx, qword [rsp + 0x60]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r11d, dword [0x1400174e4]
mov rdi, qword [rsp + 0x68]
cmp r11d, 1
jne 0x1400011a9
call fcn.140001620
xor eax, eax
add rsp, 0x50
pop rsi
ret
cmp r11d, 2
jne 0x1400011bc
call fcn.140001710
xor eax, eax
add rsp, 0x50
pop rsi
ret
cmp r11d, 3
jne 0x1400011cf
call fcn.140001890
xor eax, eax
add rsp, 0x50
pop rsi
ret
test r11d, r11d
jne 0x1400011ef
lea rcx, [rsp + 0x28]
call qword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x1400011ef
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x1400174ec], eax
xor eax, eax
add rsp, 0x50
pop rsi
ret
or eax, 0xffffffff
add rsp, 0x50
pop rsi
ret

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

Disassembly:
sub rsp, 0x488
mov rax, qword [0x1400151a0]
xor rax, rsp
mov qword [rsp + 0x470], rax
lea rdx, [rsp + 0x70]
mov r8d, 0x200
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x1400016ed
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
mov qword [rsp + 0x480], rbx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test rax, rax
mov rbx, rax
je 0x1400016e5
xor eax, eax
lea r8, str.Epson_Scanner_Service
lea rdx, str.EpsonScanSvc
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov r9d, 0xf01ff
mov rcx, rbx
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x10
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
test rax, rax
je 0x1400016dc
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbx, qword [rsp + 0x480]
mov rcx, qword [rsp + 0x470]
xor rcx, rsp
call fcn.140002be0
add rsp, 0x488
ret
Function at 0x140001710
Capabilities:
Check for time delay via gettickcount
Query service status
Start service

Disassembly:
push rbp
sub rsp, 0x70
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test rax, rax
mov rbp, rax
je 0x14000187d
lea rdx, str.EpsonScanSvc
mov r8d, 0xf01ff
mov rcx, rax
mov qword [rsp + 0x90], rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
test rax, rax
mov rsi, rax
je 0x14000186c
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x140001875
lea rax, [rsp + 0x80]
lea r8, [rsp + 0x30]
mov r9d, 0x24
xor edx, edx
mov rcx, rsi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140001875
mov qword [rsp + 0x88], rbx
mov qword [rsp + 0x68], rdi
call qword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [rsp + 0x34], 2
mov ebx, dword [rsp + 0x44]
mov edi, eax
jne 0x14000184f
mov qword [rsp + 0x60], r12
mov r12d, 0x2710
nop
mov eax, 0xcccccccd
mul dword [rsp + 0x48]
shr edx, 3
cmp edx, 0x3e8
jae 0x1400017eb
mov edx, 0x3e8
jmp 0x1400017f2
cmp edx, r12d
cmova edx, r12d
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
lea r11, [rsp + 0x80]
lea r8, [rsp + 0x30]
mov r9d, 0x24
xor edx, edx
mov rcx, rsi
mov qword [rsp + 0x20], r11
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x14000184a
cmp dword [rsp + 0x44], ebx
jbe 0x140001835
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, dword [rsp + 0x44]
mov edi, eax
jmp 0x140001843
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, edi
cmp eax, dword [rsp + 0x48]
ja 0x14000184a
cmp dword [rsp + 0x34], 2
je 0x1400017d0
mov r12, qword [rsp + 0x60]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [rsp + 0x34], 4
mov rdi, qword [rsp + 0x68]
mov rbx, qword [rsp + 0x88]
jne 0x140001875
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rsi, qword [rsp + 0x90]
add rsp, 0x70
pop rbp
ret

Function at 0x140001890
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
push rdi
sub rsp, 0x20
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test rax, rax
mov rdi, rax
je 0x140001958
lea rdx, str.EpsonScanSvc
mov r8d, 0xf01ff
mov rcx, rax
mov qword [rsp + 0x30], rbx
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
test rax, rax
mov rbx, rax
je 0x14000194a
lea r8, [0x1400174c8]
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x140001938
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [0x1400174c8]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x140001938
nop
cmp dword [0x1400174cc], 3
jne 0x140001938
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [0x1400174c8]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x140001910
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 + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x140002090
Capabilities:
Get common file path
Get program files directory

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x490
mov rax, qword [0x1400151a0]
xor rax, rsp
mov qword [rsp + 0x480], rax
xor eax, eax
mov rdi, rcx
mov rsi, rdx
lea rcx, [rsp + 0x62]
xor ebx, ebx
xor edx, edx
mov r8d, 0x206
mov qword [rsp + 0x3a], rax
mov qword [rsp + 0x42], rax
mov word [rsp + 0x38], bx
mov qword [rsp + 0x4a], rax
mov dword [rsp + 0x52], eax
mov word [rsp + 0x56], ax
mov word [rsp + 0x60], ax
call fcn.14000a2c0
lea rcx, [rsp + 0x272]
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x270], bx
call fcn.14000a2c0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x14000224d
movzx eax, word [rdi]
mov rcx, rbx
test ax, ax
je 0x1400021b3
nop
add ebx, 1
cmp ax, 0x2c
je 0x140002149
mov ax, word [rdi + rcx*2 + 2]
add rcx, 1
test ax, ax
jne 0x140002130
jmp 0x1400021b3
lea rcx, [rsp + 0x38]
mov r8d, ebx
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcpynW]
movsxd r11, ebx
lea rax, [rsp + 0x270]
lea r8, [r11 + r11]
mov edx, 0x104
lea rcx, [rsp + 0x270]
sub r8, rax
add r8, rdi
nop
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x1400021a5
movzx eax, word [r8 + rcx]
test ax, ax
je 0x1400021a5
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x140002180
jmp 0x1400021aa
test rdx, rdx
jne 0x1400021ae
sub rcx, 2
mov word [rcx], 0
lea rdx, str.WIN_DIR
lea rcx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x14000229a
lea rdx, [0x140012210]
lea rcx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x14000229a
lea rdx, str.PROGx86_DIR
lea rcx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x140002274
lea rdx, [0x140012240]
lea rcx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x140002274
lea rdx, str.PROG_DIR
lea rcx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x1400022e0
xor r9d, r9d
lea rax, [rsp + 0x60]
xor r8d, r8d
lea edx, [r9 + 0x26]
xor ecx, ecx
mov qword [rsp + 0x20], rax
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jns 0x1400022ba
xor al, al
mov rcx, qword [rsp + 0x480]
xor rcx, rsp
call fcn.140002be0
lea r11, [rsp + 0x490]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
lea r9, str.ProgramFiles_x86_
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x30]
mov r8d, 0x104
call fcn.140003040
cmp qword [rsp + 0x30], 0
ja 0x1400022ba
jmp 0x14000224d
xor r9d, r9d
lea rax, [rsp + 0x60]
xor r8d, r8d
lea edx, [r9 + 0x24]
xor ecx, ecx
mov qword [rsp + 0x20], rax
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x14000224d
lea rax, [rsp + 0x270]
lea r9, [rsp + 0x60]
lea r8, str._s_s
mov edx, 0x208
mov rcx, rsi
mov qword [rsp + 0x20], rax
call section..text
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
setne al
jmp 0x14000224f