joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14004faf8
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x10], rbx
mov dword [rsp + 0x18], r8d
push rbp
push rsi
push rdi
push r12
push r14
mov rbp, rsp
sub rsp, 0x40
mov rbx, rdx
mov r14, rcx
and qword [rcx + 8], 0
and qword [rcx + 0x10], 0
mov ecx, reloc.WLDAP32.dll_Ordinal_32
call fcn.140076f90
mov rdi, rax
mov qword [rbp + 0x30], rax
lea rax, vtable.asio::detail::win_thread::func_base.0
mov qword [rdi], rax
lea rax, vtable.asio::detail::win_thread::func_class_asio::detail::resolver_service_base::work_io_context_runner_.0
mov qword [rdi], rax
mov qword [rdi + 0x18], rbx
xor r9d, r9d
xor r8d, r8d
lea r12d, [r9 + 1]
mov edx, r12d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov rsi, rax
mov qword [rdi + 8], rax
test rax, rax
jne 0x14004fb92
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov r8, qword [rdi]
mov edx, r12d
mov rcx, rdi
call qword [r8]
mov dword [rbp - 0x10], ebx
call fcn.140046f9c
mov qword [rbp - 8], rax
test ebx, ebx
jne 0x14004fc89
xor r9d, r9d
xor r8d, r8d
mov edx, r12d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [r14 + 0x10], rax
mov qword [rdi + 0x10], rax
cmp qword [r14 + 0x10], 0
jne 0x14004fbda
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov r8, qword [rdi]
mov edx, r12d
mov rcx, rdi
call qword [r8]
mov dword [rbp - 0x10], ebx
call fcn.140046f9c
mov qword [rbp - 8], rax
test ebx, ebx
jne 0x14004fc9a
and dword [rbp + 0x40], 0
lea rax, [rbp + 0x40]
mov qword [rsp + 0x28], rax
and dword [rsp + 0x20], 0
mov r9, rdi
lea r8, [0x1400474ec]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov qword [r14 + 8], rax
test rax, rax
jne 0x14004fc4a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov r8, qword [rdi]
mov edx, r12d
mov rcx, rdi
call qword [r8]
test rsi, rsi
je 0x14004fc2b
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [r14 + 0x10]
test rcx, rcx
je 0x14004fc3a
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rbp - 0x10], ebx
call fcn.140046f9c
mov qword [rbp - 8], rax
test ebx, ebx
jne 0x14004fc78
test rsi, rsi
je 0x14004fc64
or edx, 0xffffffff
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, r14
mov rbx, qword [rsp + 0x78]
add rsp, 0x40
pop r14
pop r12
pop rdi
pop rsi
pop rbp
ret
lea rdx, str.thread
lea rcx, [rbp - 0x10]
call fcn.140046f10
int3
lea rdx, str.thread.entry_event
lea rcx, [rbp - 0x10]
call fcn.140046f10
int3
lea rdx, str.thread.exit_event
lea rcx, [rbp - 0x10]
call fcn.140046f10
int3
Function at 0x1400506e0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
mov rbp, rsp
sub rsp, 0x70
mov rax, qword [rcx + 0x18]
and dword [rbp - 0x50], 0
lea rsi, str.___r_
mov qword [rbp - 0x48], rsi
mov rbx, qword [rax + 0x10]
xor eax, eax
lock xadd dword [rbx + 0x30], eax
test eax, eax
jne 0x140050774
lea edi, [rax + 1]
mov eax, edi
xchg dword [rbx + 0x34], eax
test eax, eax
jne 0x14005075e
xchg dword [rbx + 0x38], edi
test edi, edi
jne 0x14005075e
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x14005075e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov dword [rbp - 0x40], eax
call fcn.140046f9c
mov qword [rbp - 0x38], rax
test ebx, ebx
jne 0x140050822
and dword [rbp - 0x40], 0
mov qword [rbp - 0x38], rsi
movaps xmm0, xmmword [rbp - 0x40]
movdqa xmmword [rbp - 0x50], xmm0
jmp 0x1400507fc
xorps xmm0, xmm0
movups xmmword [rbp - 0x30], xmm0
mov rax, rbx
lea rdx, [rbx + 0x28]
neg rax
sbb rcx, rcx
and rcx, rdx
mov qword [rbp - 0x20], rcx
lea rax, [rbp - 0x30]
mov qword [rbp - 0x18], rax
mov ecx, dword [0x140128ad4]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rbp - 0x10], rax
lea rdx, [rbp - 0x20]
mov ecx, dword [0x140128ad4]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
nop
lea r8, [rbp - 0x50]
mov rcx, rbx
call fcn.140047a80
test rax, rax
jne 0x1400507b8
mov rdx, qword [rbp - 0x10]
mov ecx, dword [0x140128ad4]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
nop
lea rbx, [rbp - 0x30]
mov esi, 2
lea edi, [rsi - 1]
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400507f3
call fcn.140077250
add rbx, 8
sub rsi, rdi
jne 0x1400507e6
cmp dword [rbp - 0x50], 0
jne 0x140050818
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret
lea rcx, [rbp - 0x50]
call fcn.140046ee8
int3
lea rdx, str.pqcs
lea rcx, [rbp - 0x40]
call fcn.140046f10
int3
Function at 0x140050bd0
Capabilities:
Get socket status

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x1c8]
sub rsp, 0x2a0
mov rax, qword [0x1400f8010]
xor rax, rsp
mov qword [rbp + 0x190], rax
movups xmm0, xmmword [r8]
mov r13, qword [rdx]
mov rax, qword [r8 + 8]
mov bl, byte [rdx + 8]
mov rsi, qword [rbp + 0x1f0]
movq qword [rsp + 0x50], xmm0
psrldq xmm0, 8
movd dword [rsp + 0x48], xmm0
mov qword [rsp + 0x58], rax
mov byte [rsp + 0x30], bl
cmp r13, 0xffffffffffffffff
jne 0x140050c5e
mov dword [rsp + 0x38], 0x2719
call fcn.140046f9c
mov qword [rsp + 0x40], rax
xor edi, edi
movups xmm0, xmmword [rsp + 0x38]
movdqu xmmword [rsi], xmm0
jmp 0x140050dbf
mov r14b, bl
xor edi, edi
and r14b, 0x10
test rax, rax
jne 0x140050c8f
test r14b, r14b
je 0x140050c8f
lea r15, str.___r_
mov dword [rsp + 0x38], edi
mov qword [rsp + 0x40], r15
movups xmm0, xmmword [rsp + 0x38]
movdqu xmmword [rsi], xmm0
jmp 0x140050dbf
mov r8d, 1
mov qword [rsp + 0x20], rsi
lea rdx, [rsp + 0x48]
mov rcx, r13
call fcn.14004816c
test eax, eax
jg 0x140050dbd
lea r15, str.___r_
test r14b, r14b
je 0x140050cc3
test eax, eax
je 0x140050dae
test bl, 1
jne 0x140050dbf
call fcn.140046f9c
mov rcx, qword [rsi + 8]
mov rax, qword [rax + 8]
cmp qword [rcx + 8], rax
jne 0x140050ce7
cmp dword [rsi], 0x2733
je 0x140050d0a
call fcn.140046f9c
mov rcx, qword [rsi + 8]
mov rax, qword [rax + 8]
cmp qword [rcx + 8], rax
jne 0x140050dbf
cmp dword [rsi], 0x4d5
jne 0x140050dbf
xor ecx, ecx
mov qword [rbp - 0x78], r13
mov dword [rbp - 0x80], 1
call qword [sym.imp.WS2_32.dll_WSASetLastError]
lea ecx, [r13 + 1]
mov qword [rsp + 0x20], rdi
xor r9d, r9d
lea rdx, [rbp - 0x80]
xor r8d, r8d
call qword [sym.imp.WS2_32.dll_select]
mov r12d, eax
call fcn.140046f9c
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov qword [rsp + 0x40], rbx
mov dword [rsp + 0x38], eax
movups xmm0, xmmword [rsp + 0x38]
movdqu xmmword [rsi], xmm0
test r12d, r12d
jne 0x140050d72
mov dword [rsp + 0x60], edi
mov qword [rsp + 0x68], r15
movups xmm0, xmmword [rsp + 0x60]
movdqu xmmword [rsi], xmm0
jmp 0x140050d89
jle 0x140050d84
mov dword [rsp + 0x70], edi
mov qword [rsp + 0x78], r15
movups xmm0, xmmword [rsp + 0x70]
jmp 0x140050d6c
test r12d, r12d
js 0x140050dbf
mov r8d, 1
mov qword [rsp + 0x20], rsi
lea rdx, [rsp + 0x48]
mov rcx, r13
call fcn.14004816c
test eax, eax
jg 0x140050dbd
mov bl, byte [rsp + 0x30]
jmp 0x140050cb6
mov edx, 2
mov rcx, rsi
call fcn.14004f97c
jmp 0x140050dbf
mov edi, eax
mov rax, rdi
mov rcx, qword [rbp + 0x190]
xor rcx, rsp
call fcn.140076f70
lea r11, [rsp + 0x2a0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
Function at 0x140051b58
Capabilities:
Get socket status

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x1c8]
sub rsp, 0x2a0
mov rax, qword [0x1400f8010]
xor rax, rsp
mov qword [rbp + 0x190], rax
movups xmm0, xmmword [r8]
mov r13, qword [rdx]
mov rax, qword [r8 + 8]
mov rsi, qword [rbp + 0x1f0]
mov r15b, byte [rdx + 8]
movq qword [rsp + 0x48], xmm0
psrldq xmm0, 8
movd dword [rsp + 0x40], xmm0
mov qword [rsp + 0x50], rax
cmp r13, 0xffffffffffffffff
jne 0x140051be3
mov dword [rsp + 0x30], 0x2719
call fcn.140046f9c
mov qword [rsp + 0x38], rax
xor edi, edi
movups xmm0, xmmword [rsp + 0x30]
movdqu xmmword [rsi], xmm0
jmp 0x140051d20
xor edi, edi
test rax, rax
jne 0x140051c0e
test r15b, 0x10
je 0x140051c0e
lea r14, str.___r_
mov dword [rsp + 0x30], edi
mov qword [rsp + 0x38], r14
movups xmm0, xmmword [rsp + 0x30]
movdqu xmmword [rsi], xmm0
jmp 0x140051d20
mov r8d, 1
mov qword [rsp + 0x20], rsi
lea rdx, [rsp + 0x40]
mov rcx, r13
call fcn.140048270
test eax, eax
jns 0x140051d1e
and r15b, 1
lea r14, str.___r_
test r15b, r15b
jne 0x140051d20
call fcn.140046f9c
mov rcx, qword [rsi + 8]
mov rax, qword [rax + 8]
cmp qword [rcx + 8], rax
jne 0x140051c5d
cmp dword [rsi], 0x2733
je 0x140051c80
call fcn.140046f9c
mov rcx, qword [rsi + 8]
mov rax, qword [rax + 8]
cmp qword [rcx + 8], rax
jne 0x140051d20
cmp dword [rsi], 0x4d5
jne 0x140051d20
xor ecx, ecx
mov qword [rbp - 0x78], r13
mov dword [rbp - 0x80], 1
call qword [sym.imp.WS2_32.dll_WSASetLastError]
lea ecx, [r13 + 1]
mov qword [rsp + 0x20], rdi
xor r9d, r9d
lea r8, [rbp - 0x80]
xor edx, edx
call qword [sym.imp.WS2_32.dll_select]
mov r12d, eax
call fcn.140046f9c
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], eax
movups xmm0, xmmword [rsp + 0x30]
movdqu xmmword [rsi], xmm0
test r12d, r12d
jne 0x140051ce7
mov dword [rsp + 0x58], edi
mov qword [rsp + 0x60], r14
movups xmm0, xmmword [rsp + 0x58]
movdqu xmmword [rsi], xmm0
jmp 0x140051cfe
jle 0x140051cf9
mov dword [rsp + 0x68], edi
mov qword [rsp + 0x70], r14
movups xmm0, xmmword [rsp + 0x68]
jmp 0x140051ce1
test r12d, r12d
js 0x140051d20
mov r8d, 1
mov qword [rsp + 0x20], rsi
lea rdx, [rsp + 0x40]
mov rcx, r13
call fcn.140048270
test eax, eax
js 0x140051c39
mov edi, eax
mov rax, rdi
mov rcx, qword [rbp + 0x190]
xor rcx, rsp
call fcn.140076f70
lea r11, [rsp + 0x2a0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
Function at 0x14006da30
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0xa0
mov rax, qword [0x1400f8010]
xor rax, rsp
mov qword [rsp + 0x90], rax
mov rbx, rcx
and qword [rcx], 0
mov dword [rsp + 0x20], 0xf0000000
mov r9d, 1
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x14006dac3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [rsp + 0x20], 8
mov r9d, 1
xor r8d, r8d
lea rdx, str.Crypto_RNG
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x14006dac3
mov dword [rsp + 0x20], Ordinal_41
lea r9d, [rax + 1]
xor r8d, r8d
lea rdx, str.Crypto_RNG
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x14006dae7
mov rax, rbx
mov rcx, qword [rsp + 0x90]
xor rcx, rsp
call fcn.140076f70
mov rbx, qword [rsp + 0xb8]
add rsp, 0xa0
pop rdi
ret
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rdx, str.CryptAcquireContext
lea rcx, [rsp + 0x30]
call fcn.140003380
nop
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x50]
call fcn.14006d760
lea rdx, [0x1400f2ea8]
lea rcx, [rsp + 0x50]
call sub.VCRUNTIME140.dll__CxxThrowException
int3

Function at 0x14006dc0c
Capabilities:
Generate random numbers via winapi

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x90
mov rax, qword [0x1400f8010]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov rbx, r8
mov rdi, rdx
call fcn.14006df30
mov ecx, ebx
cmp rbx, rcx
jne 0x14006dc83
xor edx, edx
test rbx, rbx
setne dl
xor ecx, ecx
test ebx, ebx
setne cl
cmp edx, ecx
jne 0x14006dc83
mov r8, rdi
mov edx, ebx
mov rcx, qword [rax]
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
je 0x14006dcc1
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140076f70
mov rbx, qword [rsp + 0xa0]
add rsp, 0x90
pop rdi
ret
mov ecx, 0x5b6
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rdx, str.GenerateBlock_size
lea rcx, [rsp + 0x20]
call fcn.140003380
nop
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x40]
call fcn.14006d760
lea rdx, [0x1400f2ea8]
lea rcx, [rsp + 0x40]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
lea rdx, [0x1400d3a28]
lea rcx, [rsp + 0x20]
call fcn.140003380
nop
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x40]
call fcn.14006d760
lea rdx, [0x1400f2ea8]
lea rcx, [rsp + 0x40]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
Function at 0x14007084c
Capabilities:
Encode data using xor

Disassembly:
test r9, r9
je 0x140070915
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x30
mov rbx, r9
mov r15d, 4
mov rdi, r8
mov rsi, rdx
mov r14, rcx
cmp rbx, r15
jb 0x1400708e0
mov rbp, rbx
shr rbp, 2
imul rax, rbp, 0xfffffffffffffffc
add rbx, rax
mov r8, r15
lea rcx, [rsp + 0x20]
mov rdx, rsi
call qword [sym.imp.VCRUNTIME140.dll_memcpy]
mov r8, r15
lea rcx, [rsp + 0x68]
mov rdx, rdi
call qword [sym.imp.VCRUNTIME140.dll_memcpy]
mov eax, dword [rsp + 0x68]
lea rdx, [rsp + 0x24]
xor eax, dword [rsp + 0x20]
mov r8, r15
mov rcx, r14
mov dword [rsp + 0x24], eax
call qword [sym.imp.VCRUNTIME140.dll_memcpy]
add r14, r15
add rsi, r15
add rdi, r15
sub rbp, 1
jne 0x140070892
test rbx, rbx
je 0x1400708fd
sub rsi, rdi
sub r14, rdi
mov al, byte [rsi + rdi]
xor al, byte [rdi]
mov byte [r14 + rdi], al
inc rdi
sub rbx, 1
jne 0x1400708eb
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x30
pop r15
pop r14
pop rdi
ret

Function at 0x140070918
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
push rsi
push rdi
push r14
sub rsp, 0x20
xor r14d, r14d
mov rdi, r8
mov rbx, rdx
mov rsi, rcx
cmp r8, 8
jb 0x14007098d
mov rbp, r8
shr rbp, 3
imul rax, rbp, 0xfffffffffffffff8
add rdi, rax
mov r8d, 8
lea rcx, [rsp + 0x58]
mov rdx, rsi
call qword [sym.imp.VCRUNTIME140.dll_memcpy]
mov r8d, 8
lea rcx, [rsp + 0x50]
mov rdx, rbx
call qword [sym.imp.VCRUNTIME140.dll_memcpy]
mov rax, qword [rsp + 0x50]
add rsi, 8
xor rax, qword [rsp + 0x58]
add rbx, 8
or r14, rax
sub rbp, 1
jne 0x14007094a
mov rcx, r14
shr rcx, 0x20
or ecx, r14d
mov edx, ecx
mov eax, ecx
shr edx, 8
or edx, ecx
shr eax, 0x10
and edx, 0xff00
or edx, eax
movzx eax, cl
shr edx, 8
or edx, eax
test rdi, rdi
je 0x1400709cf
sub rsi, rbx
movzx ecx, byte [rsi + rbx]
movzx eax, byte [rbx]
inc rbx
xor ecx, eax
or edx, ecx
sub rdi, 1
jne 0x1400709bb
mov rbx, qword [rsp + 0x40]
test edx, edx
mov rbp, qword [rsp + 0x48]
sete al
add rsp, 0x20
pop r14
pop rdi
pop rsi
ret
Function at 0x140073820
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
sub rsp, 0x18
mov dword [rsp + 4], 0
jmp 0x140073838
mov eax, dword [rsp + 4]
inc eax
mov dword [rsp + 4], eax
cmp dword [rsp + 4], 0x100
jge 0x140073901
movsxd rax, dword [rsp + 4]
lea rcx, str.cw
mov al, byte [rcx + rax]
mov byte [rsp], al
movzx eax, byte [rsp]
shl eax, 1
movzx ecx, byte [rsp]
sar ecx, 7
and ecx, 1
imul ecx, ecx, 0x11b
xor eax, ecx
movzx ecx, byte [rsp]
xor eax, ecx
movzx ecx, byte [rsp]
shl ecx, 8
or eax, ecx
movzx ecx, byte [rsp]
shl ecx, 0x10
or eax, ecx
movzx ecx, byte [rsp]
shl ecx, 1
movzx edx, byte [rsp]
sar edx, 7
and edx, 1
imul edx, edx, 0x11b
xor ecx, edx
shl ecx, 0x18
or eax, ecx
mov dword [rsp + 0xc], eax
mov dword [rsp + 8], 0
jmp 0x1400738bd
mov eax, dword [rsp + 8]
inc eax
mov dword [rsp + 8], eax
cmp dword [rsp + 8], 4
jge 0x1400738fc
imul eax, dword [rsp + 8], 0x100
mov ecx, dword [rsp + 4]
add ecx, eax
mov eax, ecx
cdqe
lea rcx, [0x140126a50]
mov edx, dword [rsp + 0xc]
mov dword [rcx + rax*4], edx
mov eax, dword [rsp + 0xc]
shl eax, 0x18
mov ecx, dword [rsp + 0xc]
shr ecx, 8
or ecx, eax
mov eax, ecx
mov dword [rsp + 0xc], eax
jmp 0x1400738b3
jmp 0x14007382e
mov byte [0x14012689b], 1
add rsp, 0x18
ret
Function at 0x140073910
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
sub rsp, 0x18
mov dword [rsp + 4], 0
jmp 0x140073928
mov eax, dword [rsp + 4]
inc eax
mov dword [rsp + 4], eax
cmp dword [rsp + 4], 0x100
jge 0x140073b60
movsxd rax, dword [rsp + 4]
lea rcx, [0x1400ccdb0]
mov al, byte [rcx + rax]
mov byte [rsp], al
movzx eax, byte [rsp]
shl eax, 3
movzx ecx, byte [rsp]
sar ecx, 5
and ecx, 1
imul ecx, ecx, 0x11b
xor eax, ecx
movzx ecx, byte [rsp]
sar ecx, 5
and ecx, 2
imul ecx, ecx, 0x11b
xor eax, ecx
movzx ecx, byte [rsp]
sar ecx, 5
and ecx, 4
imul ecx, ecx, 0x11b
xor eax, ecx
movzx ecx, byte [rsp]
shl ecx, 1
movzx edx, byte [rsp]
sar edx, 7
and edx, 1
imul edx, edx, 0x11b
xor ecx, edx
xor eax, ecx
movzx ecx, byte [rsp]
xor eax, ecx
movzx ecx, byte [rsp]
shl ecx, 3
movzx edx, byte [rsp]
sar edx, 5
and edx, 1
imul edx, edx, 0x11b
xor ecx, edx
movzx edx, byte [rsp]
sar edx, 5
and edx, 2
imul edx, edx, 0x11b
xor ecx, edx
movzx edx, byte [rsp]
sar edx, 5
and edx, 4
imul edx, edx, 0x11b
xor ecx, edx
movzx edx, byte [rsp]
shl edx, 2
movzx r8d, byte [rsp]
sar r8d, 6
and r8d, 1
imul r8d, r8d, 0x11b
xor edx, r8d
movzx r8d, byte [rsp]
sar r8d, 6
and r8d, 2
imul r8d, r8d, 0x11b
xor edx, r8d
xor ecx, edx
movzx edx, byte [rsp]
xor ecx, edx
shl ecx, 8
or eax, ecx
movzx ecx, byte [rsp]
shl ecx, 3
movzx edx, byte [rsp]
sar edx, 5
and edx, 1
imul edx, edx, 0x11b
xor ecx, edx
movzx edx, byte [rsp]
sar edx, 5
and edx, 2
imul edx, edx, 0x11b
xor ecx, edx
movzx edx, byte [rsp]
sar edx, 5
and edx, 4
imul edx, edx, 0x11b
xor ecx, edx
movzx edx, byte [rsp]
xor ecx, edx
shl ecx, 0x10
or eax, ecx
movzx ecx, byte [rsp]
shl ecx, 3
movzx edx, byte [rsp]
sar edx, 5
and edx, 1
imul edx, edx, 0x11b
xor ecx, edx
movzx edx, byte [rsp]
sar edx, 5
and edx, 2
imul edx, edx, 0x11b
xor ecx, edx
movzx edx, byte [rsp]
sar edx, 5
and edx, 4
imul edx, edx, 0x11b
xor ecx, edx
movzx edx, byte [rsp]
shl edx, 2
movzx r8d, byte [rsp]
sar r8d, 6
and r8d, 1
imul r8d, r8d, 0x11b
xor edx, r8d
movzx r8d, byte [rsp]
sar r8d, 6
and r8d, 2
imul r8d, r8d, 0x11b
xor edx, r8d
xor ecx, edx
movzx edx, byte [rsp]
shl edx, 1
movzx r8d, byte [rsp]
sar r8d, 7
and r8d, 1
imul r8d, r8d, 0x11b
xor edx, r8d
xor ecx, edx
shl ecx, 0x18
or eax, ecx
mov dword [rsp + 0xc], eax
mov dword [rsp + 8], 0
jmp 0x140073b1c
mov eax, dword [rsp + 8]
inc eax
mov dword [rsp + 8], eax
cmp dword [rsp + 8], 4
jge 0x140073b5b
imul eax, dword [rsp + 8], 0x100
mov ecx, dword [rsp + 4]
add ecx, eax
mov eax, ecx
cdqe
lea rcx, [0x140127a50]
mov edx, dword [rsp + 0xc]
mov dword [rcx + rax*4], edx
mov eax, dword [rsp + 0xc]
shl eax, 0x18
mov ecx, dword [rsp + 0xc]
shr ecx, 8
or ecx, eax
mov eax, ecx
mov dword [rsp + 0xc], eax
jmp 0x140073b12
jmp 0x14007391e
mov byte [0x14012689a], 1
add rsp, 0x18
ret
Function at 0x140078880
Capabilities:
Initialize winsock library

Disassembly:
sub rsp, 0x1d8
mov rax, qword [0x1400f8010]
xor rax, rsp
mov qword [rsp + 0x1c0], rax
mov ecx, 0x202
lea rdx, [rsp + 0x20]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x1400788e1
movzx eax, word [rsp + 0x20]
cmp al, 2
jne 0x1400788db
shr ax, 8
cmp al, 2
jne 0x1400788db
call fcn.14007d8f0
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.140076f70
add rsp, 0x1d8
ret
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 2
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.140076f70
add rsp, 0x1d8
ret
Function at 0x140087010
Capabilities:
Write file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0xe0
mov rax, qword [0x1400f8010]
xor rax, rsp
mov qword [rsp + 0xd0], rax
cmp byte [rcx + 0x440], 0
mov r14, r9
mov rax, qword [rsp + 0x130]
mov rbp, r8
mov esi, edx
mov rdi, rcx
je 0x140087141
test rax, rax
je 0x140087141
mov rdx, qword [rax + 0xc0]
test rdx, rdx
je 0x140087141
mov ecx, esi
lea r9, str.Data
sub ecx, 1
je 0x14008709b
sub ecx, 1
je 0x14008708b
sub ecx, 1
je 0x1400870a2
cmp ecx, 1
je 0x140087092
jmp 0x140087141
lea r9, str.Header
lea rax, [0x1400c1748]
jmp 0x1400870a9
lea r9, str.Header
lea rax, str.from
mov qword [rsp + 0x28], rdx
lea r8, str.__s__s__s_
mov edx, 0xa0
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x30]
call fcn.140092d20
lea rax, [rsp + 0x30]
or rbx, 0xffffffffffffffff
inc rbx
cmp byte [rax + rbx], 0
jne 0x1400870d2
mov r10, qword [rdi + 0x258]
test r10, r10
je 0x140087109
mov rax, qword [rdi + 0x1a8]
lea r8, [rsp + 0x30]
mov r9, rbx
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rdi
call r10
test eax, eax
je 0x140087141
jmp 0x140087151
mov r9, qword [rdi + 0x1a0]
lea rcx, [0x1400c1668]
mov edx, 2
lea r8d, [rdx - 1]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov r9, qword [rdi + 0x1a0]
lea rcx, [rsp + 0x30]
mov r8d, 1
mov rdx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov r9, r14
mov r8, rbp
mov edx, esi
mov rcx, rdi
call fcn.140087a90
mov rcx, qword [rsp + 0xd0]
xor rcx, rsp
call fcn.140076f70
add rsp, 0xe0
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret

Function at 0x140087440
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, r9
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_recv]
movsxd rcx, eax
cmp rcx, 0xffffffffffffffff
jne 0x14008747b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, gethostname
mov edx, 0x51
cmp eax, 0x2733
cmove ecx, edx
mov eax, ecx
add rsp, 0x20
pop rbx
ret
mov qword [rbx], rcx
xor eax, eax
add rsp, 0x20
pop rbx
ret

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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r14
sub rsp, 0x20
xor eax, eax
mov rdi, r9
cmp rdx, qword [rcx + 0x1d8]
mov rsi, r8
mov r14, rcx
sete al
mov edx, eax
mov rbx, qword [rcx + rdx*8 + 0x1d0]
call fcn.140087990
xor r9d, r9d
mov r8d, edi
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_send]
movsxd rdi, eax
cmp rdi, 0xffffffffffffffff
jne 0x140087840
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp eax, 0x2733
jne 0x140087814
mov rcx, qword [rsp + 0x50]
lea eax, [rdi + 0x52]
mov qword [rcx], 0
jmp 0x14008784a
mov edx, ebx
mov rcx, r14
call fcn.140095200
mov rcx, qword [r14]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.140087170
mov rax, qword [r14]
mov dword [rax + 0x8864], ebx
mov eax, gethostname
jmp 0x140087842
xor eax, eax
mov rcx, qword [rsp + 0x50]
mov qword [rcx], rdi
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x40]
add rsp, 0x20
pop r14
ret