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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x20
mov rax, qword [rcx + 0x28]
xor r15d, r15d
sub rax, 0x34
mov qword [rcx + 0x88], r15
mov qword [rcx + 0x30], rax
mov r14d, edx
mov rax, qword [rcx + 0x38]
mov rbx, rcx
mov word [rcx + 0x7a], r15w
mov ebp, r15d
mov dword [rcx + 0x44], r15d
movzx esi, r15w
mov qword [rcx + 0x80], rax
mov qword [rax + 0x10], rax
mov word [rcx + 0x78], r15w
cmp r15w, word [rcx + 0xc8]
jge 0x140102872
movzx r11d, r15w
mov edi, r15d
nop dword [rax]
mov rax, qword [rbx + 0xe0]
mov r9d, r14d
mov dword [rbx + 0x98], r15d
movzx edx, r11w
mov qword [rbx + 0x90], r15
mov rcx, rbx
movzx r8d, word [rdi + rax]
call fcn.140102bf0
test al, al
jne 0x140102907
mov rax, qword [rbx + 0xe0]
mov r8d, dword [rbx + 4]
mov edx, dword [rbx + 0x6c]
movzx r11d, word [rdi + rax]
lea eax, [r8 - 1]
test edx, eax
jne 0x1401027fb
cmp edx, dword [rbx + 0x70]
jl 0x1401027fb
cmp edx, dword [rbx + 0x74]
jg 0x1401027fb
mov r9, qword [rbx + 0x90]
test r9, r9
je 0x1401027fb
mov rax, qword [rbx + 0x80]
movzx ecx, byte [rax + 0x18]
xor cl, byte [r9 + 0x18]
test cl, 8
jne 0x1401027fb
add qword [rbx + 0x38], 0xfffffffffffffffc
mov r10, qword [rbx + 0x80]
mov rax, qword [r10 + 0x10]
cmp qword [rbx + 0x38], rax
je 0x140102821
test byte [r10 + 0x18], 8
je 0x140102821
neg r8d
and r8d, edx
sub edx, r8d
cmp edx, dword [rbx + 8]
jmp 0x140102832
lea eax, [r8 - 1]
neg r8d
add eax, edx
and eax, r8d
sub eax, edx
cmp eax, dword [rbx + 8]
setge dl
mov rcx, rbx
call fcn.140103600
test al, al
jne 0x140102907
mov rax, qword [rbx + 0x90]
test rax, rax
je 0x140102855
mov qword [r10 + 0x28], rax
movsx eax, word [rbx + 0xc8]
inc ebp
add rdi, 2
inc r11w
cmp ebp, eax
jl 0x140102780
movzx esi, word [rbx + 0x78]
mov rdx, qword [rbx + 0x88]
cmp si, 1
jbe 0x14010290b
test rdx, rdx
je 0x14010290b
mov ebp, 0xffff
lea r14, [rdx + 8]
cmp si, 1
jbe 0x1401028a9
movsxd r9, dword [rdx + 0x1c]
mov rax, qword [rdx + 0x10]
lea r8, [rax + r9*4]
jmp 0x1401028b0
mov r9d, dword [rdx + 0x1c]
mov r8, r15
mov qword [r14], r8
test byte [rdx + 0x18], 8
mov edi, dword [rdx + 0x20]
mov r8d, edi
je 0x1401028c6
dec edi
add edi, r9d
jmp 0x1401028df
sub r8d, r9d
lea eax, [r9 - 1]
inc r8d
movsxd rcx, eax
shl rcx, 2
add qword [rdx + 0x10], rcx
mov dword [rdx + 0x20], r8d
mov edx, r8d
mov rcx, rbx
call fcn.140103920
test al, al
jne 0x140102907
lea edx, [rdi + 1]
mov rcx, rbx
call fcn.140103920
test al, al
jne 0x140102907
mov rdx, qword [r14]
add si, bp
jne 0x140102891
jmp 0x140102912
mov al, 1
jmp 0x14010291d
mov qword [rbx + 0x88], r15
mov rax, qword [rbx + 0x30]
cmp qword [rbx + 0x38], rax
setae al
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop rdi
ret
Function at 0x140136db0
Capabilities:
Initialize winsock library

Disassembly:
sub rsp, 0x1d8
mov rax, qword [0x140396c80]
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 0x140136e0e
movzx eax, word [rsp + 0x20]
cmp al, 2
jne 0x140136e08
shr ax, 8
cmp al, 2
jne 0x140136e08
xor eax, eax
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.1400be7c0
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.1400be7c0
add rsp, 0x1d8
ret
Function at 0x14013f730
Capabilities:
Encrypt data using rc4 prga

Disassembly:
cmp dword [rcx + 4], 2
mov rax, rdx
je 0x14013f73c
xor eax, eax
ret
mov rdx, qword [rcx + 0x20]
mov r9, r8
add rdx, 4
mov r8, rax
mov ecx, 2
jmp fcn.140158ee0
Function at 0x140149ff0
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 0x14014a02b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, Ordinal_60
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 0x14014a130
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
movsxd rax, edx
mov rdi, r9
mov rsi, r8
mov r14, rcx
mov rbx, qword [rcx + rax*8 + 0x238]
call fcn.14014a720
xor r9d, r9d
mov r8d, edi
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_send]
mov rsi, qword [rsp + 0x50]
movsxd rdi, eax
mov dword [rsi], 0
cmp rdi, 0xffffffffffffffff
jne 0x14014a1c8
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp eax, 0x2733
jne 0x14014a19d
mov dword [rsi], 0x51
xor eax, eax
jmp 0x14014a1cb
mov edx, ebx
mov rcx, r14
call fcn.140136f70
mov rcx, qword [r14]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.140149ce0
mov rcx, qword [r14]
mov dword [rcx + 0x4c8c], ebx
mov dword [rsi], Ordinal_60
mov rax, rdi
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x40]
add rsp, 0x20
pop r14
ret

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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov rsi, rcx
movsxd rcx, edx
mov rax, qword [rsi + 0x3f0]
lea rbx, [rcx + 0x14]
shl rbx, 5
add rbx, rsi
mov rdi, qword [rbx + 8]
sub rdi, qword [rbx + 0x10]
test byte [rax + 0x7c], 3
je 0x14014a814
lea rax, [0x14014a070]
cmp qword [rsi + rcx*8 + 0x260], rax
jne 0x14014a814
cmp qword [rbx], 0
je 0x14014a77d
test rdi, rdi
je 0x14014a814
mov rdx, 0xffffffffffffffff
mov qword [rsp + 0x30], rbp
mov rbp, qword [rsi + rcx*8 + 0x238]
xor r9d, r9d
mov rcx, rbp
mov r8, rdx
call fcn.1401497f0
cmp eax, 0xffffffff
je 0x14014a80f
test al, 1
je 0x14014a80f
mov rax, qword [rbx]
test rax, rax
jne 0x14014a7e4
mov rax, qword [rsi]
mov ecx, dword [rax + 0x6f8]
add ecx, ecx
movsxd rcx, ecx
mov qword [rbx + 8], rcx
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, qword [rbx + 8]
mov qword [rbx], rax
mov qword [rbx + 0x10], 0
mov qword [rbx + 0x18], 0
test rax, rax
je 0x14014a807
mov rdx, qword [rbx + 0x10]
xor r9d, r9d
add rdx, rax
mov r8d, edi
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_recv]
movsxd rcx, eax
test eax, eax
jle 0x14014a80f
add qword [rbx + 0x10], rcx
jmp 0x14014a80f
mov qword [rbx + 8], 0
mov rbp, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14014a830
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
cmp qword [rcx + 0x2b8], 0
mov rsi, r9
mov rbp, r8
movsxd rbx, edx
mov rdi, rcx
je 0x14014a88e
mov dl, 1
call fcn.14013a290
mov rax, qword [rdi + 0x208]
mov r9, rsi
mov r8, rbp
mov qword [rsp + 0x20], rax
mov edx, ebx
mov rcx, rdi
call qword [rdi + 0x2b8]
xor edx, edx
mov rcx, rdi
mov ebx, eax
call fcn.14013a290
mov eax, ebx
jmp 0x14014a8dd
mov edx, ebx
test ebx, ebx
je 0x14014a89e
sub edx, 1
je 0x14014a89e
cmp edx, 1
jne 0x14014a8db
mov r9, qword [rdi + 0x200]
lea rax, [0x1402d5050]
mov edx, 2
lea rcx, [rbx + rbx*2]
add rcx, rax
lea r8d, [rdx - 1]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov r9, qword [rdi + 0x200]
mov r8d, 1
mov rdx, rsi
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret

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

Disassembly:
sub rsp, 0x28
cmp byte [rcx + 0x2c0], 0
je 0x14014aa1d
call fcn.140142740
test eax, eax
jne 0x14014aa43
xor al, al
add rsp, 0x28
ret
mov rcx, qword [rcx + 0x238]
cmp rcx, 0xffffffffffffffff
je 0x14014aa16
mov r9d, 2
lea rdx, [rsp + 0x30]
lea r8d, [r9 - 1]
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x14014aa16
mov al, 1
add rsp, 0x28
ret

Function at 0x14014b400
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x30
mov rbx, qword [rcx]
lea r9, [rsp + 0x40]
mov rax, rdx
mov dword [rsp + 0x40], 1
mov edx, 6
mov dword [rsp + 0x20], 4
mov rdi, rcx
mov rcx, rax
lea r8d, [rdx - 5]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x14014b46b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rdi
call fcn.140136f70
mov r8, rax
lea rdx, str.Could_not_set_TCP_NODELAY:__s_n
mov rcx, rbx
call fcn.140149df0
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
lea rdx, str.TCP_NODELAY_set_n
mov rcx, rbx
call fcn.140149df0
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
Function at 0x14014b5a0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push rbx
push rbp
push rsi
sub rsp, 0x140
mov rax, qword [0x140396c80]
xor rax, rsp
mov qword [rsp + 0x130], rax
cmp dword [rcx + 0xbc], 2
mov rbx, rdx
mov rbp, qword [rcx]
mov rsi, rcx
je 0x14014b7ad
cmp byte [rcx + 0x3aa], 0
mov qword [rsp + 0x170], rdi
jne 0x14014b79d
cmp byte [rcx + 0x3c6], 0
jne 0x14014b79d
lea r8, [rsp + 0x20]
mov dword [rsp + 0x20], 0x80
lea rdx, [rsp + 0xb0]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x14014b643
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rsi
mov ebx, eax
call fcn.140136f70
mov r9, rax
lea rdx, str.getpeername___failed_with_errno__d:__s
mov r8d, ebx
mov rcx, rbp
call fcn.140149ce0
jmp 0x14014b7a5
xorps xmm0, xmm0
mov dword [rsp + 0x20], 0x80
lea r8, [rsp + 0x20]
mov rcx, rbx
lea rdx, [rsp + 0x30]
movups xmmword [rsp + 0x30], xmm0
movups xmmword [rsp + 0x40], xmm0
movups xmmword [rsp + 0x50], xmm0
movups xmmword [rsp + 0x60], xmm0
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rsp + 0x80], xmm0
movups xmmword [rsp + 0x90], xmm0
movups xmmword [rsp + 0xa0], xmm0
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x14014b6c2
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rsi
mov ebx, eax
call fcn.140136f70
mov r9, rax
lea rdx, str.getsockname___failed_with_errno__d:__s
mov r8d, ebx
mov rcx, rbp
call fcn.140149ce0
jmp 0x14014b7a5
lea rbx, [rsi + 0x186]
mov rdx, rbx
lea r8, [rsi + 0x1b4]
lea rcx, [rsp + 0xb0]
call fcn.14014abf0
test al, al
jne 0x14014b719
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ebx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov edx, ebx
mov rcx, rsi
mov rdi, rax
call fcn.140136f70
mov r8d, dword [rdi]
lea rdx, str.ssrem_inet_ntop___failed_with_errno__d:__s
mov r9, rax
mov rcx, rbp
call fcn.140149ce0
jmp 0x14014b7a5
movups xmm0, xmmword [rbx]
mov eax, dword [rbx + 0x28]
lea r8, [rsi + 0x1e8]
movups xmm1, xmmword [rbx + 0x10]
lea rdx, [rsi + 0x1b8]
movups xmmword [rsi + 0x88], xmm0
lea rcx, [rsp + 0x30]
movsd xmm0, qword [rbx + 0x20]
movups xmmword [rsi + 0x98], xmm1
movsd qword [rsi + 0xa8], xmm0
mov dword [rsi + 0xb0], eax
movzx eax, word [rbx + 0x2c]
mov word [rsi + 0xb4], ax
call fcn.14014abf0
test al, al
jne 0x14014b79d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ebx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov edx, ebx
mov rcx, rsi
mov rdi, rax
call fcn.140136f70
mov r8d, dword [rdi]
lea rdx, str.ssloc_inet_ntop___failed_with_errno__d:__s
mov r9, rax
mov rcx, rbp
call fcn.140149ce0
jmp 0x14014b7a5
mov rcx, rsi
call fcn.14014b160
mov rdi, qword [rsp + 0x170]
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.1400be7c0
add rsp, 0x140
pop rsi
pop rbp
pop rbx
ret
Function at 0x14014bf30
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x70
mov rax, qword [0x140396c80]
xor rax, rsp
mov qword [rsp + 0x68], rax
xor esi, esi
mov dword [rsp + 0x20], 4
mov eax, esi
lea r9, [rsp + 0x50]
cmp byte [rcx + 0x994], al
mov rdi, rdx
mov rbx, rcx
mov edx, 0xffff
setne al
lea r8d, [rsi + 8]
mov rcx, rdi
mov dword [rsp + 0x50], eax
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x14014bf9f
mov r8, rdi
lea rdx, str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
mov rcx, rbx
call fcn.140149df0
jmp 0x14014c02e
mov ecx, dword [rbx + 0x998]
mov dword [rsp + 0x58], 1
call fcn.14014c230
imul ecx, eax, 0x3e8
mov dword [rsp + 0x50], ecx
mov dword [rsp + 0x5c], ecx
mov ecx, dword [rbx + 0x99c]
call fcn.14014c230
imul ecx, eax, 0x3e8
lea r8, [rsp + 0x58]
mov qword [rsp + 0x40], rsi
lea rax, [rsp + 0x54]
mov qword [rsp + 0x38], rsi
mov r9d, recvfrom
mov qword [rsp + 0x30], rax
mov edx, 0x98000004
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x50], ecx
mov dword [rsp + 0x60], ecx
mov rcx, rdi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x14014c02e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, edi
lea rdx, str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
mov r9d, eax
mov rcx, rbx
call fcn.140149df0
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.1400be7c0
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret

Function at 0x14014c1f0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov edi, ecx
mov rbx, rdx
mov rcx, r8
call fcn.14014c240
mov r8d, eax
mov rdx, rbx
mov ecx, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
mov rbx, qword [rsp + 0x30]
cdqe
add rsp, 0x20
pop rdi
ret
Function at 0x140158a30
Capabilities:
Resolve dns

Disassembly:
push rbp
push rsi
push r12
push r14
push r15
sub rsp, 0x20
xor r12d, r12d
mov r15, r9
mov qword [r9], r12
mov esi, r12d
lea r9, [rsp + 0x68]
mov r14d, r12d
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov ebp, eax
test eax, eax
jne 0x140158ba8
mov qword [rsp + 0x50], rbx
mov rbx, qword [rsp + 0x68]
test rbx, rbx
je 0x140158b91
mov qword [rsp + 0x58], rdi
nop dword [rax]
cmp dword [rbx + 4], 2
jne 0x140158b28
cmp qword [rbx + 0x20], r12
je 0x140158b28
cmp qword [rbx + 0x10], 0x10
jb 0x140158b28
mov ecx, gethostbyname
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
je 0x140158b61
mov ecx, dword [rbx]
mov dword [rax], ecx
mov ecx, dword [rbx + 4]
mov dword [rax + 4], ecx
mov ecx, dword [rbx + 8]
mov dword [rax + 8], ecx
mov ecx, dword [rbx + 0xc]
mov dword [rax + 0xc], ecx
mov ecx, reloc.WS2_32.dll_recv
mov dword [rax + reloc.WS2_32.dll_recv], 0x10
mov qword [rax + 0x20], r12
mov qword [rax + 0x18], r12
mov qword [rax + 0x28], r12
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rdi + 0x20], rax
test rax, rax
je 0x140158b51
mov rcx, qword [rbx + 0x20]
movups xmm0, xmmword [rcx]
movups xmmword [rax], xmm0
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x140158b15
call qword [case.0x14013e619.0]
mov qword [rdi + 0x18], rax
test rax, rax
je 0x140158b37
test rsi, rsi
cmove rsi, rdi
test r14, r14
je 0x140158b25
mov qword [r14 + 0x28], rdi
mov r14, rdi
mov rbx, qword [rbx + 0x28]
test rbx, rbx
jne 0x140158a80
jmp 0x140158b66
mov rcx, qword [rdi + 0x20]
mov ebp, 8
call qword [fcn.1400bf6a4]
mov rcx, rdi
call qword [fcn.1400bf6a4]
jmp 0x140158b66
mov rcx, rdi
mov ebp, 8
call qword [fcn.1400bf6a4]
jmp 0x140158b66
mov ebp, 8
mov rcx, qword [rsp + 0x68]
mov rdi, qword [rsp + 0x58]
test rcx, rcx
je 0x140158b7b
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
test ebp, ebp
je 0x140158b8c
mov rcx, rsi
call fcn.1401589e0
mov rsi, r12
jmp 0x140158b9e
test rsi, rsi
jne 0x140158b9e
mov ebp, 0x2af9
mov ecx, ebp
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rbx, qword [rsp + 0x50]
mov eax, ebp
mov qword [r15], rsi
add rsp, 0x20
pop r15
pop r14
pop r12
pop rsi
pop rbp
ret

Function at 0x140158e30
Capabilities:
Create thread

Disassembly:
push rbx
sub rsp, 0x30
xor ebx, ebx
mov r9, rdx
mov r8, rcx
mov qword [rsp + 0x28], rbx
xor edx, edx
mov dword [rsp + 0x20], ebx
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
cmovbe rbx, rax
mov rax, rbx
add rsp, 0x30
pop rbx
ret
Function at 0x140158ee0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub rsp, 0x28
mov rax, r8
mov r10, rdx
cmp ecx, 2
je 0x140158f02
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x273f
xor eax, eax
add rsp, 0x28
ret
mov r8, r9
mov rdx, rax
mov rcx, r10
add rsp, 0x28
jmp 0x140158f20
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x60
mov rax, qword [0x140396c80]
xor rax, rsp
mov qword [rsp + 0x50], rax
movzx eax, byte [rcx + 3]
mov rbx, rdx
movzx edx, byte [rcx + 2]
mov rdi, r8
movzx r10d, byte [rcx + 1]
lea r8, str._d._d._d._d
movzx r9d, byte [rcx]
lea rcx, [rsp + 0x40]
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], edx
mov edx, reloc.WS2_32.dll_recv
mov byte [rsp + 0x40], 0
mov dword [rsp + 0x20], r10d
call fcn.14014c830
lea rcx, [rsp + 0x40]
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], 0
jne 0x140158f84
test rax, rax
je 0x140158fc4
cmp rax, rdi
jae 0x140158fc4
lea rax, [rsp + 0x40]
mov r8, rbx
sub r8, rax
lea rcx, [rsp + 0x40]
nop word [rax + rax]
movzx edx, byte [rcx]
mov byte [r8 + rcx], dl
lea rcx, [rcx + 1]
test dl, dl
jne 0x140158fb0
mov rax, rbx
jmp 0x140158fd2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], Ordinal_32
xor eax, eax
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1400be7c0
mov rbx, qword [rsp + 0x80]
add rsp, 0x60
pop rdi
ret
Function at 0x140159860
Capabilities:
Encode data using xor

Disassembly:
push r14
push r15
sub rsp, 0x1f8
mov rax, qword [0x140396c80]
xor rax, rsp
mov qword [rsp + 0x1c0], rax
cmp byte [0x1403c28b0], 0
mov r14, rcx
jne 0x140159899
call fcn.14015c390
test al, al
je 0x1401598b7
mov byte [0x1403c28b0], 1
xor eax, eax
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.1400be7c0
add rsp, 0x1f8
pop r15
pop r14
ret
mov rcx, qword [r14 + 0x898]
test rcx, rcx
je 0x1401598d6
mov edx, 0x400
call fcn.1401cc0f0
call fcn.14015c390
test al, al
jne 0x140159899
mov qword [rsp + 0x218], rbx
xor r15d, r15d
mov qword [rsp + 0x220], rbp
mov qword [rsp + 0x228], rsi
mov qword [rsp + 0x1f0], rdi
movaps xmmword [rsp + 0x1e0], xmm6
movaps xmmword [rsp + 0x1d0], xmm7
movsd xmm7, qword [0x1402d8a70]
nop dword [rax]
nop word [rax + rax]
mov rsi, r15
lea rbp, [rsp + 0x80]
nop dword [rax + rax]
lea rcx, [rsp + 0x30]
call fcn.14013e750
mov ecx, 1
movups xmm6, xmmword [rax]
movups xmmword [rsp + 0x20], xmm6
call fcn.140149b80
lea rcx, [rsp + 0x40]
lea rdi, [rsi + 3]
call fcn.14013e750
lea rcx, [rsp + 0x50]
movsxd rbx, dword [rax + 8]
call fcn.14013e750
mov rdx, rbx
lea rcx, [rdi - 2]
add rdx, qword [rax]
movq rax, xmm6
imul rdx, rdi
imul rcx, rax
shl rdx, 8
xor rdx, rcx
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x20], rdx
call fcn.14013e750
lea rcx, [rsp + 0x70]
mov rbx, rax
call fcn.14013e750
mov ecx, dword [rbx + 8]
lea rbp, [rbp + 0x10]
add ecx, dword [rax]
lea eax, [rsi + 4]
imul ecx, eax
lea eax, [rsi + 2]
imul eax, dword [rsp + 0x28]
inc rsi
shl ecx, 0x10
xor ecx, eax
mov dword [rsp + 0x28], ecx
movups xmm0, xmmword [rsp + 0x20]
movups xmmword [rbp - 0x10], xmm0
cmp rsi, 4
jb 0x140159930
movaps xmm2, xmm7
lea rcx, [rsp + 0x80]
mov edx, 0x40
call fcn.1401cbb70
call fcn.14015c390
test al, al
je 0x140159920
mov edx, 0x100
mov byte [rsp + 0xc0], r15b
lea rcx, [rsp + 0xc0]
call fcn.1401cbe60
movaps xmm7, xmmword [rsp + 0x1d0]
movaps xmm6, xmmword [rsp + 0x1e0]
mov rdi, qword [rsp + 0x1f0]
mov rsi, qword [rsp + 0x228]
mov rbp, qword [rsp + 0x220]
mov rbx, qword [rsp + 0x218]
cmp byte [rsp + 0xc0], r15b
je 0x140159a6d
mov edx, 0x400
lea rcx, [rsp + 0xc0]
call fcn.1401cc0f0
call fcn.14015c390
test al, al
jne 0x140159899
lea rdx, str.libcurl_is_now_using_a_weak_random_seed__n
mov rcx, r14
call fcn.140149df0
call fcn.14015c390
test al, al
mov ecx, reloc.WLDAP32.dll_Ordinal_35
cmovne ecx, r15d
mov eax, ecx
jmp 0x14015989b

Function at 0x14015dbf0
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x148
mov rax, qword [0x140396c80]
xor rax, rsp
mov qword [rsp + 0x130], rax
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov byte [rsp + 0x20], 0
test rax, rax
je 0x14015dc57
mov r8d, 0x104
lea rdx, [rsp + 0x20]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp byte [rsp + 0x20], 0
je 0x14015dc57
lea rcx, [rsp + 0x20]
call qword [case.0x14013e619.0]
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.1400be7c0
add rsp, 0x148
ret
xor eax, eax
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.1400be7c0
add rsp, 0x148
ret
jmp 0x14015dbf0
Function at 0x14015dc80
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x148
mov rax, qword [0x140396c80]
xor rax, rsp
mov qword [rsp + 0x130], rax
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov byte [rsp + 0x20], 0
test rax, rax
je 0x14015dc57
mov r8d, 0x104
lea rdx, [rsp + 0x20]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp byte [rsp + 0x20], 0
je 0x14015dc57
lea rcx, [rsp + 0x20]
call qword [case.0x14013e619.0]
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.1400be7c0
add rsp, 0x148
ret
xor eax, eax
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.1400be7c0
add rsp, 0x148
ret
jmp 0x14015dbf0
Function at 0x140163d10
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x40
mov rax, qword [0x140396c80]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rbp, qword [rcx + 0x240]
lea r8, [rsp + 0x20]
mov rsi, qword [rcx]
lea rdx, [rsp + 0x28]
mov rdi, rcx
mov dword [rsp + 0x20], reloc.WS2_32.dll_recv
mov rcx, rbp
mov rbx, 0xffffffffffffffff
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x140163d84
lea r8, [rsp + 0x20]
mov dword [rsp + 0x20], reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x28]
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_accept]
mov rbx, rax
mov rdx, rbp
mov rcx, rdi
call fcn.14014a900
mov rcx, rsi
cmp rbx, 0xffffffffffffffff
jne 0x140163da9
lea rdx, str.Error_accept__ing_server_connect
call fcn.140149ce0
lea eax, [rbx + 0x1f]
jmp 0x140163e22
lea rdx, str.Connection_accepted_from_server_n
call fcn.140149df0
mov edx, 1
mov byte [rdi + 0x3b4], 0
mov rcx, rbx
mov qword [rdi + 0x240], rbx
call fcn.140170f90
mov byte [rdi + 0x259], 1
cmp qword [rsi + 0x2c8], 0
je 0x140163e20
mov dl, 1
mov rcx, rsi
call fcn.14013a290
mov rcx, qword [rsi + 0x2d0]
mov r8d, 1
mov rdx, rbx
call qword [rsi + 0x2c8]
xor edx, edx
mov rcx, rsi
mov ebx, eax
call fcn.14013a290
test ebx, ebx
je 0x140163e20
mov rcx, rdi
call fcn.140164300
mov eax, Ordinal_46
jmp 0x140163e22
xor eax, eax
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1400be7c0
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret

Function at 0x140164ef0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push rbx
sub rsp, 0x20
cmp byte [rcx + 0x6e2], 0
mov rbx, rcx
jne 0x140164f96
xor edx, edx
mov dword [rcx + 0x704], edx
mov eax, edx
mov rcx, qword [rcx]
cmp dword [rcx + 0x724], 2
sete al
mov dword [rbx + 0x708], eax
cmp dword [rcx + 0x720], 2
jne 0x140164f34
cmp dword [rbx + 0x6e4], edx
je 0x140164f93
cmp byte [rbx + 0x3aa], dl
je 0x140164f50
mov r8, qword [rbx + 0x6c0]
test r8, r8
je 0x140164f50
mov dword [rbx + 0x6e4], edx
jmp 0x140164f6c
cmp dword [rbx + 0x6d0], edx
je 0x140164f93
mov r8, qword [rbx + 0x6c8]
mov dword [rbx + 0x6e4], 1
mov r8, qword [r8]
lea rdx, str.CWD__s
lea rcx, [rbx + 0x650]
call fcn.140174070
test eax, eax
jne 0x140164fa0
lea edx, [rax + 0x10]
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp fcn.1401642f0
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp fcn.140165390
add rsp, 0x20
pop rbx
ret

Function at 0x140165390
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push rbx
sub rsp, 0x20
mov rax, qword [rcx]
mov rbx, rcx
add rcx, 0x650
cmp byte [rax + 0x73a], 0
jne 0x1401653b5
cmp dword [rax + 0x598], 0
je 0x1401653e1
mov r8, qword [rcx + 0x88]
test r8, r8
je 0x1401653e1
lea rdx, str.MDTM__s
call fcn.140174070
test eax, eax
jne 0x1401653ee
lea edx, [rax + 0x12]
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp fcn.1401642f0
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp fcn.140166420
add rsp, 0x20
pop rbx
ret