joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14003d4c0
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 0x14003d4f0
xor eax, eax
jmp 0x14003d5b3
mov rbp, rbx
cmp word [rax], si
je 0x14003d515
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14003d4fc
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14003d4f8
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.14003bc00
movsxd r14, eax
test eax, eax
jne 0x14003d553
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14003d4e9
mov rcx, r14
call fcn.1400357cc
mov rdi, rax
test rax, rax
jne 0x14003d56c
xor ecx, ecx
call fcn.140035790
jmp 0x14003d548
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.14003bc00
test eax, eax
jne 0x14003d59d
mov rcx, rdi
call fcn.140035790
jmp 0x14003d5a7
xor ecx, ecx
call fcn.140035790
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 0x140040528
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov ebx, ecx
call fcn.1400351e4
mov ecx, ebx
lea r8, [rsp + 0x30]
and ecx, 0x3ff
mov r9d, 2
bts ecx, 0xa
mov edx, 0x20000001
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
xor edx, edx
test eax, eax
je 0x1400405c9
cmp ebx, dword [rsp + 0x30]
je 0x1400405c2
test esi, esi
je 0x1400405c2
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x14004059d
sub r8w, 0x61
cmp r8w, 0x19
ja 0x1400405aa
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x140040587
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x1400405ae
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x1400405cb
mov eax, 1
jmp 0x1400405cb
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x1400432e4
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.14002a4e0
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x14004336e
cmp byte [rbp - 0x21], r15b
je 0x140043369
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x1400433a4
call fcn.140037fc8
test eax, eax
jne 0x140043390
cmp byte [rbp - 0x21], r15b
je 0x140043388
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x1400433a4
cmp byte [rbp - 0x21], r15b
je 0x1400433a1
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.140031524
test eax, eax
jne 0x140043444
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.14002a4e0
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x1400433e3
cmp byte [rbp - 0x21], r15b
je 0x140043418
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x140043418
call fcn.140037fc8
test eax, eax
jne 0x140043404
cmp byte [rbp - 0x21], r15b
je 0x1400433fd
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x140043418
cmp byte [rbp - 0x21], r15b
je 0x140043415
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.140031524
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x140043444
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x140043447
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x140043455
mov rcx, rdi
call fcn.140035790
cmp byte [rbp + 0x3f], r15b
je 0x140043464
mov rcx, qword [rbp + 0x27]
call fcn.140035790
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 0x140045100
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140045128
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140045128
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x18000230c
Capabilities:
Terminate process

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
call qword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_IsDebuggerPresent]
mov ecx, 1
mov dword [0x180062680], eax
call fcn.180002ad4
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetUnhandledExceptionFilter]
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_UnhandledExceptionFilter]
cmp dword [0x180062680], 0
jne 0x18000234f
mov ecx, 1
call fcn.180002ad4
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentProcess]
mov rcx, rax
mov edx, 0xc0000409
add rsp, 0x20
pop rbx
jmp qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TerminateProcess]
Function at 0x1800417a4
Capabilities:
Hash data via bcrypt

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
push rbp
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
and qword [rbp - 0x10], 0
mov esi, r9d
and qword [rbp - 8], 0
mov r14, r8
mov r15d, edx
mov r12, rcx
xor r9d, r9d
lea rdx, str.SHA256
xor r8d, r8d
lea rcx, [rbp - 0x10]
xor edi, edi
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
mov ecx, 0xc0000000
mov ebx, eax
and eax, ecx
cmp eax, ecx
jne 0x180041832
mov rcx, qword [section..data]
lea rax, section..data
cmp rcx, rax
je 0x180041a99
cmp byte [rcx + 0x69], 1
jb 0x180041a99
test byte [rcx + 0x6c], 2
je 0x180041a99
lea edx, [rdi + 0xa]
jmp 0x180041a86
and dword [rsp + 0x28], edi
lea rax, [rbp - 0x18]
mov rcx, qword [rbp - 0x10]
lea r8, [rbp - 0x1c]
mov r9d, 4
mov qword [rsp + 0x20], rax
lea rdx, str.HashDigestLength
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
mov ecx, 0xc0000000
mov ebx, eax
and eax, ecx
cmp eax, ecx
jne 0x18004189c
mov rcx, qword [section..data]
lea rax, section..data
cmp rcx, rax
je 0x180041a99
cmp byte [rcx + 0x69], 1
jb 0x180041a99
test byte [rcx + 0x6c], 2
je 0x180041a99
mov edx, 0xb
jmp 0x180041a86
cmp esi, dword [rbp - 0x1c]
je 0x1800418df
mov rcx, qword [section..data]
lea rax, section..data
cmp rcx, rax
je 0x1800418d5
cmp byte [rcx + 0x69], 1
jb 0x1800418d5
test byte [rcx + 0x6c], 2
je 0x1800418d5
mov rcx, qword [rcx + 0x60]
lea r8, [0x180057240]
mov edx, 0xc
call fcn.18000649c
mov ebx, 0xc000000d
jmp 0x180041a99
and dword [rsp + 0x28], edi
lea rax, [rbp - 0x18]
mov rcx, qword [rbp - 0x10]
lea r8, [rbp - 0x20]
mov r9d, 4
mov qword [rsp + 0x20], rax
lea rdx, [0x180053af8]
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
mov ecx, 0xc0000000
mov ebx, eax
and eax, ecx
cmp eax, ecx
jne 0x180041949
mov rcx, qword [section..data]
lea rax, section..data
cmp rcx, rax
je 0x180041a99
cmp byte [rcx + 0x69], 1
jb 0x180041a99
test byte [rcx + 0x6c], 2
je 0x180041a99
mov edx, 0xd
jmp 0x180041a86
mov ecx, dword [rbp - 0x20]
Function at 0x140001378
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x140056630]
mov dword [rax], 1
mov rax, qword [0x140056640]
mov dword [rax], 1
mov rax, qword [0x140056650]
mov dword [rax], 1
mov rax, qword [0x1400565e0]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400013c9
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x1400013f5
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000141b
cmp eax, 0x20b
je 0x140001442
jmp 0x140001471
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000142e
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000145d
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140033ef0
Capabilities:
Query environment variable

Disassembly:
push rsi
mov eax, 0x10078
push rbx
call fcn.140039e80
sub rsp, rax
xor eax, eax
xor edx, edx
lea rbx, [rsp + 0x20]
lea rsi, [rsp + 0x70]
mov word [rsp + 0x70], ax
mov rcx, rbx
mov word [rsp + 0x20], dx
call fcn.140033e30
mov rdx, rsi
mov r8d, 0x10000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea edx, [rax - 1]
xor eax, eax
cmp edx, 0xffff
ja 0x140033f46
mov rcx, rsi
call sub.msvcrt.dll__wcsdup
add rsp, 0x10078
pop rbx
pop rsi
ret
Function at 0x140038b60
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call fcn.14004a2e0
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call fcn.14004a2e0
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop

Function at 0x140039832
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x14005f3e8]
test eax, eax
je 0x1400398ca
lea rax, [0x14005f3c0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x14005f3f0]
mov qword [rbp - 8], rax
jmp 0x1400398ae
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x1400398a2
cmp qword [rbp - 0x10], 0
je 0x1400398a2
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x140039868
lea rax, [0x14005f3c0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x1400398cb
nop
add rsp, 0x30
pop rbp
ret

Function at 0x1400399d0
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400399f8
mov eax, 0
jmp 0x140039a46
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x140039a21
mov eax, 0
jmp 0x140039a46
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x140039a41
mov eax, 0
jmp 0x140039a46
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x140039a4c
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x140039aca
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x140039ac1
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x140039ac1
mov rax, qword [rbp - 8]
jmp 0x140039adf
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x140039a94
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x14003f230
Capabilities:
Compare security identifiers

Disassembly:
push rbx
push r14
push r15
sub rsp, 0x20
cmp byte [rdx + 0x4c], 0
mov r15, rdx
mov rbx, rcx
je 0x14003f365
lea r14, [rdx + 8]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x14003f365
cmp byte [rbx + 0x10], 0
je 0x14003f271
xor al, al
add rsp, 0x20
pop r15
pop r14
pop rbx
ret
mov rax, qword [rbx]
mov rcx, rbx
mov qword [rsp + 0x50], rdi
xor edi, edi
mov qword [rsp + 0x58], r12
xor r12b, r12b
mov rax, qword [rax + 8]
call qword [0x1401b7850]
test eax, eax
je 0x14003f34d
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x48], rsi
mov rax, qword [rbx]
mov edx, edi
mov rcx, rbx
mov rax, qword [rax + 0x20]
call qword [0x1401b7850]
mov rbp, rax
test r14, r14
je 0x14003f313
lea rsi, [rax + 0x10]
test rsi, rsi
je 0x14003f313
cmp byte [r15 + 0x4c], 0
je 0x14003f313
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x14003f313
cmp byte [rbp + 0x54], 0
je 0x14003f313
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x14003f313
mov rdx, rsi
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x14003f313
mov rax, qword [rbx]
mov edx, edi
mov rcx, rbx
mov rax, qword [rax + 0x18]
call qword [0x1401b7850]
mov r12b, 1
jmp 0x14003f315
inc edi
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax + 8]
call qword [0x1401b7850]
cmp edi, eax
jb 0x14003f2a2
mov rsi, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x40]
test r12b, r12b
je 0x14003f34d
mov rcx, qword [rbx + 8]
call fcn.1401568b0
mov qword [rbx + 8], 0
mov rdi, qword [rsp + 0x50]
movzx eax, r12b
mov r12, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop rbx
ret
mov ecx, 0x80070057
call fcn.140026320
int3
Function at 0x1400523d0
Capabilities:
Delete service

Disassembly:
push rbx
sub rsp, 0x130
mov rbx, qword [rcx]
mov rcx, rbx
call fcn.14004f330
test al, al
je 0x14005252c
mov rcx, qword [rbx + 0x40]
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x140052499
call fcn.1400553d0
mov r8d, 1
lea rdx, [rsp + 0x30]
mov rcx, rax
call fcn.140055290
lea rax, str.c:jenkinsworkspaceebAdvisor_WABinary_release_4.1.1_srcincludesone_time_service.h
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], 0x57
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x30]
call fcn.1400244b0
lea rdx, str.Failed_to_delete_service:
lea rcx, [rsp + 0x30]
call fcn.1400244e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x140], eax
lea rdx, [rsp + 0x140]
lea rcx, [rsp + 0x30]
call fcn.140030540
lea rcx, [rsp + 0xc8]
call fcn.140058d50
nop
lea rax, vtable.std::ios_base.0
mov qword [rsp + 0xc8], rax
lea rcx, [rsp + 0xc8]
call fcn.140128970
nop
jmp 0x14005252c
call fcn.1400553d0
mov r8d, 3
lea rdx, [rsp + 0x30]
mov rcx, rax
call fcn.140055290
lea rax, str.c:jenkinsworkspaceebAdvisor_WABinary_release_4.1.1_srcincludesone_time_service.h
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], 0x5b
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x30]
call fcn.1400244b0
lea rdx, str.Service_deleted:
lea rcx, [rsp + 0x30]
call fcn.1400244e0
lea rdx, [rbx + 8]
lea rcx, [rsp + 0x30]
call fcn.140024520
lea rcx, [rsp + 0xc8]
call fcn.140058d50
nop
lea rax, vtable.std::ios_base.0
mov qword [rsp + 0xc8], rax
lea rcx, [rsp + 0xc8]
call fcn.140128970
nop
mov edx, 1
mov rcx, rbx
call fcn.14004f500
nop
add rsp, 0x130
pop rbx
ret
Function at 0x140057970
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x50
mov rdi, rdx
mov rbx, rcx
cmp qword [rcx + 0x18], 8
jb 0x14005798a
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140057a4c
bt eax, 0xa
jae 0x140057a4c
mov rdx, rbx
cmp qword [rbx + 0x18], 8
jb 0x1400579b0
mov rdx, qword [rbx]
mov r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp word [rdx + r8*2], 0
jne 0x1400579c0
xor eax, eax
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 7
mov word [rsp + 0x20], ax
lea rcx, [rsp + 0x20]
call fcn.1400260f0
nop
lea rcx, [rsp + 0x20]
cmp qword [rsp + 0x38], 8
cmovae rcx, qword [rsp + 0x20]
call fcn.14012a230
shr rax, 0x20
test eax, eax
jne 0x140057a88
mov rdx, qword [rsp + 0x38]
cmp rdx, 8
jb 0x140057a4c
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140057a47
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140057a9c
call fcn.14014f900
cmp qword [rbx + 0x18], 8
jb 0x140057a56
mov rbx, qword [rbx]
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x140057a77
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x140057a77
xor al, al
jmp 0x140057a7d
mov al, 1
jmp 0x140057a7d
mov rbx, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
lea r8, [rsp + 0x20]
mov edx, eax
lea rcx, str.remove
call fcn.140056410
nop
call fcn.140156b00
int3
Function at 0x14005b6a0
Capabilities:
Write file on windows

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x90
mov rax, qword [0x140214ba0]
xor rax, rsp
mov qword [rsp + 0x88], rax
mov edi, 0xffff
movzx esi, dx
mov rbx, rcx
cmp di, dx
jne 0x14005b6d4
xor eax, eax
jmp 0x14005b82c
mov rax, qword [rcx + 0x40]
mov r8, qword [rax]
test r8, r8
je 0x14005b711
mov r9, qword [rcx + 0x58]
movsxd r10, dword [r9]
lea rdx, [r8 + r10*2]
cmp r8, rdx
jae 0x14005b711
lea ecx, [r10 - 1]
movzx eax, si
mov dword [r9], ecx
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 2]
mov qword [rdx], rcx
mov word [r8], si
jmp 0x14005b82c
cmp qword [rcx + 0x80], 0
mov qword [rsp + 0xc0], rbp
je 0x14005b821
mov r8, qword [rcx + 0x18]
lea rax, [rcx + 0x70]
cmp qword [r8], rax
jne 0x14005b758
mov rdx, qword [rcx + 0x90]
mov rcx, qword [rcx + 0x88]
mov qword [r8], rcx
sub rdx, rcx
mov rax, qword [rbx + 0x38]
sar rdx, 1
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x14005b781
movzx ecx, si
mov rdx, qword [rbx + 0x80]
call fcn.1401601c0
cmp ax, di
je 0x14005b821
movzx edi, si
jmp 0x14005b821
lea r8, [rsp + 0x50]
mov word [rsp + 0x60], si
mov rax, qword [rcx]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x38], r8
lea r9, [rsp + 0x62]
lea r8, [rsp + 0x88]
mov qword [rsp + 0x30], r8
lea r8, [rsp + 0x68]
mov rax, qword [rax + 0x38]
mov qword [rsp + 0x28], r8
lea r8, [rsp + 0x58]
mov qword [rsp + 0x20], r8
lea r8, [rsp + 0x60]
call qword [0x1401b7850]
test eax, eax
je 0x14005b7e1
sub eax, 1
je 0x14005b7e1
cmp eax, 2
jne 0x14005b821
movzx ecx, word [rsp + 0x60]
jmp 0x14005b764
mov rbp, qword [rsp + 0x50]
lea rax, [rsp + 0x68]
sub rbp, rax
je 0x14005b80e
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x68]
mov r8, rbp
mov edx, 1
call fcn.140161090
cmp rbp, rax
jne 0x14005b821
lea rax, [rsp + 0x60]
mov byte [rbx + 0x72], 1
cmp qword [rsp + 0x58], rax
movzx eax, si
jne 0x14005b824
movzx eax, di
mov rbp, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0x88]
xor rcx, rsp
call fcn.14014f8e0
add rsp, 0x90
pop rdi
pop rsi
pop rbx
ret
Function at 0x14005bd70
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x140214ba0]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x14005be52
cmp byte [rcx + 0x72], 0
je 0x14005be52
mov rax, qword [rcx]
mov qword [rsp + 0x78], rdi
mov edi, 0xffff
mov edx, edi
mov rax, qword [rax + 0x18]
call qword [0x1401b7850]
cmp di, ax
je 0x14005be4e
mov rcx, qword [rbx + 0x68]
lea r8, [rsp + 0x30]
mov qword [rsp + 0x20], r8
lea rdx, [rbx + 0x74]
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
mov rax, qword [rcx]
mov rax, qword [rax + 0x40]
call qword [0x1401b7850]
test eax, eax
je 0x14005be14
sub eax, 1
je 0x14005be18
cmp eax, 2
jne 0x14005be4e
mov byte [rbx + 0x72], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14014f8e0
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x72], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x14005be45
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov r8, rdi
mov edx, 1
call fcn.140161090
cmp rdi, rax
jne 0x14005be4e
cmp byte [rbx + 0x72], 0
sete al
jmp 0x14005bdfc
xor al, al
jmp 0x14005bdfc
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14014f8e0
add rsp, 0x60
pop rbx
ret

Function at 0x14005cbd0
Capabilities:
Get session information
Get session user name
Print debug messages

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x60
mov rax, qword [0x140214ba0]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov rbx, rcx
mov qword [rsp + 0x38], rcx
xor edi, edi
mov dword [rsp + 0x30], edi
mov qword [rcx], rdi
mov qword [rcx + 0x10], rdi
mov qword [rcx + 0x18], 7
mov word [rcx], di
lea r8d, [rdi + 7]
lea rdx, str.UNKNOWN
call fcn.1400260f0
mov dword [rsp + 0x30], 1
mov qword [rsp + 0x40], rdi
mov dword [rsp + 0x48], edi
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
cmp eax, 0xffffffff
jne 0x14005cc3e
lea rcx, str.Error_retrieving_session_id_for_generating_log_name.
jmp 0x14005ccb3
lea rcx, [rsp + 0x48]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x40]
mov r8d, 5
mov edx, eax
xor ecx, ecx
call qword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
test eax, eax
je 0x14005ccac
mov rdx, qword [rsp + 0x40]
test rdx, rdx
je 0x14005ccac
mov eax, dword [rsp + 0x48]
cmp eax, 2
jbe 0x14005cc92
mov r8d, eax
shr r8, 1
dec r8
mov rcx, rbx
call fcn.1400260f0
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
jmp 0x14005ccb9
lea rcx, str.WTSQuerySessionInformation_failed_to_retrieve_the_size_of_the_current_user_name_for_the_log_name.
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
jmp 0x14005ccb9
lea rcx, str.WTSQuerySessionInformation_failed_to_retrieve_current_user_name_for_the_log_name.
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rax, rbx
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.14014f8e0
mov rbx, qword [rsp + 0x78]
add rsp, 0x60
pop rdi
ret