joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1401df200
Capabilities:
Encode data using xor
Encrypt data using aes via x86 extensions

Disassembly:
sub rsp, 0x58
mov rax, qword [rsp + 0x80]
lea r8, [r8*8]
movaps xmmword [rsp + 0x40], xmm6
lea r9, [r9*8]
movaps xmmword [rsp + 0x30], xmm7
movq xmm0, r9
movq xmm7, r8
movaps xmmword [rsp + 0x20], xmm8
movdqu xmm5, xmmword [rax + 0x30]
mov r8d, 7
movdqu xmm2, xmmword [rax + 0x50]
movdqu xmm8, xmmword [rax + 0x40]
movdqu xmm3, xmmword [rax + 0x20]
movdqu xmm6, xmmword [rax + 0x10]
movdqu xmm4, xmmword [rax]
punpcklqdq xmm7, xmm0
xorps xmm7, xmm5
movdqa xmm1, xmm4
movdqa xmm0, xmm8
movdqa xmm4, xmm2
aesenc xmm0, xmm2
movdqa xmm2, xmm0
movdqa xmm0, xmm5
aesenc xmm0, xmm8
movdqa xmm8, xmm0
movdqa xmm0, xmm3
aesenc xmm0, xmm5
movdqa xmm5, xmm0
movdqa xmm0, xmm6
aesenc xmm0, xmm3
movdqa xmm3, xmm0
movdqa xmm0, xmm1
aesenc xmm0, xmm6
movdqa xmm6, xmm0
aesenc xmm4, xmm1
xorps xmm4, xmm7
sub r8, 1
jne 0x1401df261
movdqu xmmword [rax], xmm4
movdqu xmmword [rax + 0x30], xmm5
movdqu xmmword [rax + 0x50], xmm2
movdqu xmmword [rax + 0x40], xmm8
movdqu xmmword [rax + 0x20], xmm3
movdqu xmmword [rax + 0x10], xmm0
cmp rdx, 0x10
jne 0x1401df2f5
xorps xmm2, xmm8
xorps xmm5, xmm3
xorps xmm2, xmm5
xorps xmm4, xmm0
xorps xmm2, xmm4
movdqu xmmword [rcx], xmm2
jmp 0x1401df323
cmp rdx, 0x20
jne 0x1401df319
xorps xmm3, xmm0
xorps xmm3, xmm4
movdqu xmmword [rcx], xmm3
movdqu xmm0, xmmword [rax + 0x40]
xorps xmm0, xmmword [rax + 0x50]
xorps xmm0, xmmword [rax + 0x30]
movdqu xmmword [rcx + 0x10], xmm0
jmp 0x1401df323
mov r8, rdx
xor edx, edx
call fcn.14023a460
movaps xmm6, xmmword [rsp + 0x40]
movaps xmm7, xmmword [rsp + 0x30]
movaps xmm8, xmmword [rsp + 0x20]
add rsp, 0x58
ret
Function at 0x1401f58a0
Capabilities:
Encode data using xor

Disassembly:
sub rsp, 8
test r9, r9
je 0x1401f5a36
cmp r9, 4
jb 0x1401f58da
mov r10, r9
shr r10, 2
imul rax, r10, 0xfffffffffffffffc
add r9, rax
mov eax, dword [rdx]
add rdx, 4
xor eax, dword [r8]
add r8, 4
mov dword [rcx], eax
add rcx, 4
sub r10, 1
jne 0x1401f58c1
xor r11d, r11d
test r9, r9
je 0x1401f5a36
cmp r9, 8
jb 0x1401f5a0d
lea r10, [rcx - 1]
lea rax, [r8 - 1]
add r10, r9
add rax, r9
cmp rcx, rax
ja 0x1401f590c
cmp r10, r8
jae 0x1401f5a0d
lea rax, [rdx - 1]
add rax, r9
cmp rcx, rax
ja 0x1401f5921
cmp r10, rdx
jae 0x1401f5a0d
mov qword [rsp + 0x10], rbx
mov qword [rsp], rdi
cmp r9, 0x40
jb 0x1401f59c7
mov r10, r9
mov qword [rsp + 0x18], rsi
and r10d, 0x3f
mov rbx, r9
sub rbx, r10
mov rdi, rdx
lea rax, [r8 + 0x10]
sub rdi, r8
mov rsi, rcx
sub rsi, r8
nop word [rax + rax]
movdqu xmm0, xmmword [rdi + rax - 0x10]
add r11, 0x40
movdqu xmm1, xmmword [rax - 0x10]
movdqu xmm2, xmmword [rdi + rax]
lea rax, [rax + 0x40]
xorps xmm1, xmm0
movdqu xmm0, xmmword [rax - 0x40]
movdqu xmmword [rsi + rax - 0x50], xmm1
xorps xmm2, xmm0
movdqu xmm0, xmmword [rdi + rax - 0x30]
movdqu xmm1, xmmword [rax - 0x30]
movdqu xmmword [rsi + rax - 0x40], xmm2
xorps xmm1, xmm0
movdqu xmm0, xmmword [rdi + rax - 0x20]
movdqu xmm2, xmmword [rax - 0x20]
movdqu xmmword [rsi + rax - 0x30], xmm1
xorps xmm2, xmm0
movdqu xmmword [rsi + rax - 0x20], xmm2
cmp r11, rbx
jb 0x1401f5960
mov rsi, qword [rsp + 0x18]
cmp r10, 8
jb 0x1401f59ff
mov r10, r9
and r10, 0xfffffffffffffff8
mov rbx, rdx
lea rax, [r11 + r8]
sub rbx, r8
mov rdi, rcx
sub rdi, r8
nop
movq xmm1, qword [rax + rbx]
add r11, 8
movq xmm0, qword [rax]
lea rax, [rax + 8]
xorps xmm1, xmm0
movq qword [rdi + rax - 8], xmm1
cmp r11, r10
jb 0x1401f59e0
mov rdi, qword [rsp]
mov rbx, qword [rsp + 0x10]
cmp r11, r9
jae 0x1401f5a36
sub rdx, r8
lea r10, [r11 + r8]
sub rcx, r8
sub r9, r11
nop word [rax + rax]
movzx eax, byte [r10 + rdx]
xor al, byte [r10]
mov byte [rcx + r10], al
lea r10, [r10 + 1]
sub r9, 1
jne 0x1401f5a20
add rsp, 8
ret

Function at 0x1401fb9c4
Capabilities:
Parse pe header

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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x30
xor edi, edi
mov esi, edx
mov rbp, rcx
test r8, r8
jne 0x1402098d3
call fcn.140209720
mov dword [rax], reloc.WS2_32.dll_shutdown
call fcn.1402095b4
xor eax, eax
jmp 0x140209961
mov rdx, r9
mov rcx, r8
call fcn.140209838
mov rbx, rax
test rax, rax
je 0x14020995e
lea rax, [rsp + 0x50]
mov rdx, rsi
mov qword [rsp + 0x28], rax
lea r8, [0x140209764]
mov eax, dword [rsp + 0x60]
mov r9, rbx
mov rcx, rbp
mov dword [rsp + 0x20], eax
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rdx, rax
test rax, rax
jne 0x14020994b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140209694
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x140209932
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x140209941
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rcx, rbx
call fcn.14021df24
jmp 0x14020995e
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x14020995b
mov eax, dword [rsp + 0x50]
mov dword [rcx], eax
mov rdi, rdx
mov rax, rdi
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret

Function at 0x140211ac4
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1050
call fcn.1401fb0a0
sub rsp, rax
mov rax, qword [0x140423a00]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.14021112c
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x140211b13
mov rax, rbp
jmp 0x140211c1b
mov rax, qword [rbx]
mov rcx, r14
sub rax, qword [rbx + 8]
and ecx, 0x3f
cqo
mov rbx, r14
sub rax, rdx
sar rbx, 6
sar rax, 1
mov r9, r15
lea r12, [rcx + rcx*8]
mov rsi, rax
lea rax, [0x140000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0x42ba10]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.14022243c
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0x42ba10]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x140211c17
mov rcx, qword [rcx + r12*8 + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 0x1000
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140211c17
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.14022243c
test rax, rax
js 0x140211c17
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x140211c17
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x140211c09
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x140211c09
cmp byte [rcx], 0xd
jne 0x140211bef
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x140211bfe
cmp byte [rcx + 1], 0xa
jne 0x140211bfe
inc rcx
jmp 0x140211bfe
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x423e40]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x140211bd1
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x140211c1b
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.1401fad50
mov rbx, qword [rsp + 0x1090]
add rsp, 0x1050
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x140212e18
Capabilities:
Get disk information

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x250
mov rax, qword [0x140423a00]
xor rax, rsp
mov qword [rsp + 0x240], rax
lea rdx, [0x1402e9900]
mov rbp, rcx
call fcn.140223160
xor edi, edi
test rax, rax
je 0x140212efe
mov ebx, edi
call fcn.140209720
mov r14d, dword [rax]
call fcn.140209720
mov r8d, 0x104
lea rcx, [rsp + 0x30]
mov rdx, rbp
mov dword [rax], edi
call fcn.1402230ac
mov rsi, rax
test rax, rax
je 0x140212e8f
call fcn.140209720
mov dword [rax], r14d
jmp 0x140212eb9
call fcn.140209720
cmp dword [rax], 0x22
jne 0x140212ef6
call fcn.140209720
xor r8d, r8d
mov rdx, rbp
xor ecx, ecx
mov dword [rax], r14d
call fcn.1402230ac
mov rbx, rax
mov rsi, rax
test rax, rax
je 0x140212ef6
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], di
jne 0x140212ebd
cmp rax, 3
je 0x140212ed8
mov rcx, rsi
call fcn.140212d74
test al, al
je 0x140212ee9
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x140212ee9
mov dil, 1
mov rcx, rbx
call fcn.140209748
mov al, dil
jmp 0x140212f00
mov rcx, rbx
call fcn.140209748
xor al, al
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.1401fad50
lea r11, [rsp + 0x250]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret

Function at 0x1402133bc
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x14021342b
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14021342b
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14021342b
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14021342b
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14021342b
cmp dword [rcx + 0x84], 0xe
jbe 0x14021342b
cmp dword [rcx + 0xf8], 0
je 0x14021342b
mov ecx, ebx
call fcn.1402134dc
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.1402132b8
nop
cmp dword [rbp + 0x20], 0
je 0x140213479
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140213484
int3
xor r8d, r8d
lea edx, [r8 + 2]
jmp 0x1402133bc

Function at 0x1402135c0
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x1402133bc
Function at 0x140221674
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x14042ba10]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x1402216cb
cmp word [rdx], r13w
jne 0x1402216cb
or byte [rax + rdi*8 + 0x38], cl
jmp 0x1402216d0
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x1402217f5
mov r11d, recv
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x140221816
lea r9, [rdx + 2]
cmp cx, r11w
je 0x140221709
mov rdx, r9
mov word [rbx], cx
jmp 0x140221730
cmp r9, r8
jae 0x140221740
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x1402216ea
jmp 0x1402217f5
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1402217ea
cmp dword [rsp + 0x80], esi
je 0x1402217ea
lea r8, [0x14042ba10]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x1402217c2
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x140221792
mov word [rbx], r13w
jmp 0x1402217f2
mov ecx, recv
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x14022179f
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x1402217f2
cmp word [rsp + 0x70], r13w
jne 0x1402217cf
cmp rbx, r14
je 0x14022178c
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.140222444
cmp word [rsp + 0x70], r13w
je 0x1402217f5
mov ecx, recv
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x14042ba10]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x1402217ef
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x1402217f5
Function at 0x1402225e0
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x1402225f6
mov al, 1
jmp 0x140222656
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x140222607
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x140222654
mov ecx, dword [rcx + 0x18]
nop
call fcn.140222bd4
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140222654
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140222654
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140222654
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x140222656
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x140226450
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x140226480
xor eax, eax
jmp 0x140226543
mov rbp, rbx
cmp word [rax], si
je 0x1402264a5
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14022648c
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x140226488
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.140224614
movsxd r14, eax
test eax, eax
jne 0x1402264e3
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x140226479
mov rcx, r14
call fcn.14021df60
mov rdi, rax
test rax, rax
jne 0x1402264fc
xor ecx, ecx
call fcn.14021df24
jmp 0x1402264d8
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.140224614
test eax, eax
jne 0x14022652d
mov rcx, rdi
call fcn.14021df24
jmp 0x140226537
xor ecx, ecx
call fcn.14021df24
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret

Function at 0x140226560
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x1402265e7
mov rsi, rbx
cmp word [rax], bp
je 0x1402265a6
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x140226590
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14022658c
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14021df60
mov rdi, rax
test rax, rax
je 0x1402265d4
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140239dc0
mov rbp, rdi
xor ecx, ecx
call fcn.14021df24
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14022cc48
Capabilities:
Clear file content

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.140222444
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.140222444
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x14022cd98
cmp rax, 0xffffffffffffffff
je 0x14022cd98
xor edi, edi
test rbp, rbp
jle 0x14022cd43
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14021deac
mov rbx, rax
test rax, rax
jne 0x14022ccd0
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x14022cd39
mov edx, 0x8000
mov ecx, r14d
call fcn.140212540
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.140221320
cmp eax, 0xffffffff
je 0x14022cd19
cdqe
sub rbp, rax
test rbp, rbp
jg 0x14022cce0
mov edx, r15d
mov ecx, r14d
call fcn.140212540
jmp 0x14022cd39
cmp byte [rsi + 0x38], dil
je 0x14022cd30
cmp dword [rsi + 0x34], 5
jne 0x14022cd30
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], send
cmp byte [rsi + 0x30], dil
je 0x14022cd39
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14021df24
jmp 0x14022cdac
jns 0x14022cdac
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.140222444
cmp rax, 0xffffffffffffffff
jne 0x14022cd64
cmp byte [rsi + 0x30], dil
je 0x14022cdac
mov edi, dword [rsi + 0x2c]
jmp 0x14022cdac
mov ecx, r14d
call fcn.140222bd4
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x14022cdac
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, recv
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], send
jmp 0x14022cdac
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x14022cda5
mov eax, dword [rsi + 0x2c]
jmp 0x14022cdaa
mov eax, reloc.WS2_32.dll_shutdown
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.140222444
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret
Function at 0x14022ed60
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 0x14022eda4
call qword [sym.imp.WS2_32.dll_getsockname]
jmp 0x14022edaa
call qword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x14022edb2
xor eax, eax
jmp 0x14022ee2c
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 0x14022ee07
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
mov ebx, 1
mov dword [rdi], eax
jmp 0x14022ee25
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x57
jne 0x14022ee25
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 0x14022f070
Capabilities:
Get file size

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x50
mov r15d, r9d
mov rsi, r8
mov r14, rdx
mov rbp, rcx
mov rbx, qword [rdx + 8]
xor edi, edi
test rbx, rbx
je 0x14022f125
cmp qword [rbx], rdi
je 0x14022f117
lea rcx, str.kernel32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test rax, rax
jne 0x14022f0c6
mov rax, 0xffffffffffffffff
jmp 0x14022f14e
lea rdx, str.CreateFileTransactedA
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x14022f11c
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], rdi
mov rcx, qword [rbx]
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
mov r8d, 1
mov rcx, rbp
call rax
jmp 0x14022f14e
cmp dword [rbx + 8], edi
jne 0x14022f125
mov rax, 0xffffffffffffffff
jmp 0x14022f14e
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 1
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileA]
cmp rax, 0xffffffffffffffff
jne 0x14022f15b
call fcn.14022ddb0
jmp 0x14022f160
mov qword [r14], rax
mov eax, edi
test eax, eax
js 0x14022f252
lea rdx, [rsp + 0x7c]
mov rcx, qword [r14]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x78], eax
cmp eax, 0xffffffff
jne 0x14022f18c
call fcn.14022ddb0
test eax, eax
js 0x14022f252
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x14022f24d
cmp rcx, r15
ja 0x14022f246
mov rbx, qword [r14]
lea rdx, [rsp + 0x7c]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x78], eax
mov r9, qword [rsp + 0x78]
shr r9, 0x20
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], eax
xor edx, edx
mov r8d, 2
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov rcx, rax
mov qword [rsi + 0x10], rax
test rax, rax
jne 0x14022f1f0
call fcn.14022ddb0
mov ebx, eax
jmp 0x14022f252
mov rax, qword [rsp + 0x78]
mov qword [rsi + 8], rax
mov dword [rsi + 0x20], 4
mov qword [rsi + 0x18], rdi
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 4
call qword [sym.imp.KERNEL32.dll_MapViewOfFileEx]
mov qword [rsi], rax
test rax, rax
jne 0x14022f240
call fcn.14022ddb0
mov ebx, eax
mov rcx, qword [rsi + 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 0x10], rdi
mov eax, ebx
jmp 0x14022f252
mov ebx, edi
mov eax, ebx
jmp 0x14022f252
mov eax, 0x800700df
jmp 0x14022f252
mov eax, 0x800703ee
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rdi
ret

Function at 0x14022f2e0
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 0x14022f300
Capabilities:
Set socket configuration

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