joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140066d30
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], r9
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov rbp, r8
mov r12d, edx
mov r14, rcx
xor edx, edx
mov rcx, qword [0x140224818]
mov r8d, 0x1000
xor edi, edi
mov r13d, 0x800
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r15, rax
test rax, rax
je 0x140066f28
movzx edx, word [rsp + 0x30]
mov qword [rsp + 0x70], rbx
mov rbx, rax
mov qword [rsp + 0x78], rsi
nop dword [rax + rax]
cmp rbp, 0xffffffffffffffff
je 0x140066da2
test rbp, rbp
je 0x140066e68
dec rbp
cmp qword [r14 + 8], 0
lea rsi, [r14 + 8]
lea rdx, [rsp + 0x30]
je 0x140066dc6
mov r8d, 2
mov rcx, r14
call fcn.1400669e0
mov dword [rsp + 0x34], eax
jmp 0x140066de3
mov rcx, qword [r14]
lea r9, [rsp + 0x34]
mov r8d, 2
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x34]
movzx edx, word [rsp + 0x30]
cmp eax, 2
jne 0x140066e6c
test dx, dx
je 0x140066dfe
mov word [rbx], dx
add rbx, 2
movzx edx, word [rsp + 0x30]
mov rdi, rbx
lea eax, [r13 - 1]
sub rdi, r15
movsxd rcx, eax
sar rdi, 1
cmp rdi, rcx
jle 0x140066e44
mov rcx, qword [0x140224818]
add r13d, 0x800
movsxd r9, r13d
mov r8, r15
add r9, r9
mov edx, 8
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
movzx edx, word [rsp + 0x30]
mov r15, rax
movsxd rax, edi
lea rbx, [r15 + rax*2]
test dx, dx
je 0x140066e6c
mov edi, 0
test r12d, r12d
jne 0x140066d90
cmp dx, 0xd
je 0x140066e71
cmp dx, 0xa
je 0x140066e77
jmp 0x140066d90
lea rsi, [r14 + 8]
test r12d, r12d
jne 0x140066e7b
cmp dx, 0xa
jne 0x140066ea6
sub rbx, 2
xor edi, edi
mov rcx, qword [rsp + 0x88]
mov rax, rbx
mov rsi, qword [rsp + 0x78]
sub rax, r15
sar rax, 1
mov qword [rcx], rax
mov rax, r15
mov word [rbx], di
mov rbx, qword [rsp + 0x70]
jmp 0x140066f2b
cmp dx, 0xd
jne 0x140066e7b
sub rbx, 2
lea rdx, [rsp + 0x30]
cmp qword [rsi], 0
je 0x140066ed1
mov r8d, 2
mov rcx, r14
call fcn.1400669e0
mov dword [rsp + 0x34], eax
xor edi, edi
jmp 0x140066eea
mov rcx, qword [r14]
lea r9, [rsp + 0x34]
xor edi, edi
mov qword [rsp + 0x20], rdi
lea r8d, [rdi + 2]
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [rsp + 0x30], 0xa
je 0x140066e7d
cmp qword [rsi], 0
je 0x140066f02
add dword [r14 + 0x14], 2
jmp 0x140066e7d
mov rcx, qword [r14]
lea r8, [rsp + 0x3c]
mov r9d, 1
mov qword [rsp + 0x38], 0xfffffffffffffffe
lea edx, [r9 - 3]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x140066e7d
mov rax, rdi
mov rbp, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x140066f50
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x40
mov rdi, r8
mov r15d, edx
mov rsi, rcx
mov r14d, 0x1000
mov rcx, qword [0x140224818]
mov r8d, r14d
xor edx, edx
mov r12, r9
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x1400670ea
movzx r8d, byte [rsp + 0x30]
mov qword [rsp + 0x60], rbx
mov rbx, rax
cmp rdi, 0xffffffffffffffff
je 0x140066fb9
test rdi, rdi
je 0x140067047
dec rdi
mov rdx, rbx
mov rcx, rsi
call fcn.1400bb8c0
mov dword [rsp + 0x34], eax
test eax, eax
jne 0x140066fd1
xor r8b, r8b
jmp 0x140066fd5
movzx r8d, byte [rbx]
cdqe
add rbx, rax
mov byte [rsp + 0x30], r8b
mov rdx, rbx
lea eax, [r14 - 5]
sub rdx, rbp
movsxd rcx, eax
cmp rdx, rcx
jle 0x140067021
mov rcx, qword [0x140224818]
add r14d, 0x1000
movsxd r9, r14d
mov r8, rbp
mov edx, 8
sub ebx, ebp
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
movzx r8d, byte [rsp + 0x30]
mov rbp, rax
movsxd rbx, ebx
add rbx, rax
test r8b, r8b
je 0x140067047
test r15d, r15d
jne 0x140066fa7
cmp r8b, 0xd
je 0x140067050
cmp r8b, 0xa
jne 0x140066fa7
dec rbx
jmp 0x1400670d5
test r15d, r15d
jne 0x1400670d5
cmp r8b, 0xa
jne 0x14006705b
dec rbx
jmp 0x1400670d5
cmp r8b, 0xd
jne 0x1400670d5
dec rbx
lea rdx, [rsp + 0x30]
cmp qword [rsi + 8], 0
je 0x140067084
mov r8d, 1
mov rcx, rsi
call fcn.1400669e0
mov dword [rsp + 0x34], eax
jmp 0x1400670a1
mov rcx, qword [rsi]
lea r9, [rsp + 0x34]
mov r8d, 1
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [rsp + 0x30], 0xa
je 0x1400670d5
cmp qword [rsi + 8], 0
je 0x1400670b4
inc dword [rsi + 0x14]
jmp 0x1400670d5
mov rcx, qword [rsi]
lea r8, [rsp + 0x3c]
mov r9d, 1
mov qword [rsp + 0x38], 0xffffffffffffffff
lea edx, [r9 - 2]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rax, rbx
sub rax, rbp
mov qword [r12], rax
mov rax, rbp
mov byte [rbx], 0
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x78]
add rsp, 0x40
pop r15
pop r14
pop r12
ret
Function at 0x140067110
Capabilities:
Write file on windows

Disassembly:
push rbx
push rbp
push rsi
push r14
sub rsp, 0x38
xor ebp, ebp
movsxd rbx, r8d
mov r14, rdx
mov rsi, rcx
mov dword [rsp + 0x60], ebp
cmp dword [rcx + 0x24], ebp
jne 0x14006720a
cmp dword [rcx + 0x1c], 1
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x30], r15
jne 0x14006716b
mov eax, dword [rcx + 0x14]
lea r9d, [rbp + 1]
mov rcx, qword [rcx]
lea r8, [rsp + 0x7c]
neg eax
cdqe
mov edx, eax
mov qword [rsp + 0x78], rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [rsi + 0x10]
mov dword [rsi + 0x14], eax
mov dword [rsi + 0x1c], ebp
mov ecx, dword [rsi + 0x14]
cmp ecx, ebx
jle 0x1400671cc
mov eax, dword [rsi + 0x10]
mov edx, ebx
sub eax, ecx
movsxd rcx, eax
add rcx, qword [rsi + 8]
sub edx, 1
je 0x1400671c4
sub edx, 1
je 0x1400671bb
cmp edx, 2
je 0x1400671b4
mov r8, rbx
mov rdx, r14
call fcn.14002ce50
sub dword [rsi + 0x14], ebx
mov rax, rbx
mov rdi, qword [rsp + 0x68]
mov r15, qword [rsp + 0x30]
add rsp, 0x38
pop r14
pop rsi
pop rbp
pop rbx
ret
mov eax, dword [r14]
mov dword [rcx], eax
jmp 0x14006719a
movzx eax, word [r14]
mov word [rcx], ax
jmp 0x14006719a
movzx eax, byte [r14]
mov byte [rcx], al
jmp 0x14006719a
mov rcx, rsi
call fcn.140021fd0
mov eax, dword [rsi + 0x10]
mov rdx, r14
cmp ebx, eax
jl 0x1400671fb
mov rcx, qword [rsi]
lea r9, [rsp + 0x60]
mov r8d, ebx
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
movsxd rax, dword [rsp + 0x60]
jmp 0x1400671a0
sub eax, dword [rsi + 0x14]
mov r8, rbx
movsxd rcx, eax
add rcx, qword [rsi + 8]
jmp 0x140067195
movsxd rax, ebp
add rsp, 0x38
pop r14
pop rsi
pop rbp
pop rbx
ret

Function at 0x140067220
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rsi
sub rsp, 0x30
xor esi, esi
mov rbx, rcx
mov dword [rsp + 0x48], esi
test rdx, rdx
je 0x140067317
cmp word [rdx], si
je 0x140067317
test r8d, r8d
jne 0x14006724e
mov r8d, dword [rcx + 0x20]
cmp r8d, 0x19
jne 0x1400672ae
mov rax, 0xffffffffffffffff
nop dword [rax + rax]
cmp word [rdx + rax*2 + 2], si
lea rax, [rax + 1]
jne 0x140067260
lea r8d, [rax + rax]
cmp qword [rcx + 8], rsi
je 0x14006728b
call fcn.140067110
mov dword [rsp + 0x48], eax
cdqe
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rsi
ret
mov rcx, qword [rcx]
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
movsxd rax, dword [rsp + 0x48]
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rsi
ret
cmp r8d, 2
mov qword [rsp + 0x40], rdi
mov ecx, 0xfde9
lea r8, [rsp + 0x58]
cmovne ecx, esi
call fcn.1400bb9f0
mov rdi, rax
test rax, rax
je 0x140067312
mov rdx, rax
mov r8d, dword [rsp + 0x58]
cmp qword [rbx + 8], rsi
je 0x1400672ed
mov rcx, rbx
call fcn.140067110
mov dword [rsp + 0x48], eax
jmp 0x140067300
mov rcx, qword [rbx]
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [0x140224818]
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rdi, qword [rsp + 0x40]
movsxd rax, dword [rsp + 0x48]
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rsi
ret
Function at 0x140069760
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
bt r8d, 0x10
jae 0x14006994f
mov rax, rsp
push r12
push r14
sub rsp, 0xc8
mov r12, rdx
mov r14, rcx
test rcx, rcx
je 0x140069944
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov ebp, dword [rsp + 0x100]
mov qword [rax + 0x18], rsi
mov qword [rax - 0x18], rdi
lea rdi, [0x14013841c]
mov qword [rax - 0x20], r13
mov qword [rax - 0x28], r15
mov eax, dword [rcx]
movsxd r15, dword [rcx + 4]
cdq
and edx, 7
add eax, edx
sar eax, 3
test r9, r9
movsxd r13, eax
cmovne rdi, r9
cmp ebp, 0x18
jne 0x1400697eb
mov rcx, rdi
call fcn.140039b80
mov rdi, rax
mov rbx, 0xffffffffffffffff
nop
inc rbx
cmp byte [rax + rbx], 0
jne 0x1400697e0
jmp 0x14006982a
cmp ebp, 0x19
jne 0x14006980f
mov rbx, 0xffffffffffffffff
nop word [rax + rax]
inc rbx
cmp word [rdi + rbx*2], 0
jne 0x140069800
add rbx, rbx
jmp 0x14006982a
mov rcx, rdi
call fcn.140039de0
mov rdi, rax
mov rbx, 0xffffffffffffffff
inc rbx
cmp byte [rax + rbx], 0
jne 0x140069821
mov rdx, rdi
cmp rbx, r15
jle 0x14006987d
mov r8d, ebx
mov rcx, r14
call qword [r12 + 0x18]
mov rcx, r14
call qword [r12 + 0x20]
lea rdx, [r14 + 8]
mov r8, r13
lea rcx, [rsp + 0x20]
call fcn.14002ce50
mov eax, r15d
lea rcx, [rsp + 0x20]
sub eax, r13d
add rcx, r13
movsxd r8, eax
xor edx, edx
call fcn.140001690
mov edx, 1
mov rcx, r14
call qword [r12 + reloc.WS2_32.dll_recv]
jmp 0x1400698a1
mov r8, rbx
lea rcx, [rsp + 0x20]
call fcn.14002ce50
mov eax, r15d
lea rcx, [rsp + 0x20]
sub eax, ebx
add rcx, rbx
movsxd r8, eax
xor edx, edx
call fcn.140001690
lea rcx, [r14 + 0x48]
mov r8, r15
lea rdx, [rsp + 0x20]
call fcn.14002ce50
mov r13, qword [rsp + 0xb8]
mov rbx, qword [rsp + 0xe0]
test r15d, r15d
jle 0x1400698f8
xor edx, edx
lea rcx, [rsp + 0x20]
mov rax, r14
sub rax, rcx
nop dword [rax]
nop dword [rax + rax]
lea rcx, [rsp + 0x20]
add rcx, rdx
inc rdx
xor byte [rcx], 0x36
xor byte [rax + rcx + 0x48], 0x5c
cmp rdx, r15
jl 0x1400698e0
mov r8d, r15d
lea rdx, [rsp + 0x20]
mov rcx, r14
call qword [r12 + 0x18]
mov r15, qword [rsp + 0xb0]
mov rsi, qword [rsp + 0xf0]
cmp ebp, 0x18
jne 0x140069927
mov rcx, rdi
call fcn.140039c60
jmp 0x140069934
cmp ebp, 0x19
je 0x140069934
mov rcx, rdi
call fcn.140039c60
mov rbp, qword [rsp + 0xe8]
mov rdi, qword [rsp + 0xc0]
add rsp, 0xc8
pop r14
pop r12
ret

Function at 0x14006c4b0
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
movsxd rbx, ecx
mov ecx, dword [0x140223a04]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
add rbx, qword [rax]
mov rax, rbx
add rsp, 0x20
pop rbx
ret
Function at 0x14006c5d4
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x40
cmp dword [0x14022af48], 0
lea rbx, [0x14022af58]
mov r14, rdx
mov r15, rcx
jne 0x14006c621
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov rcx, rbx
mov dword [0x14022af4c], eax
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x14022af48], 1
mov ecx, dword [0x14022af4c]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbp, rax
test rax, rax
jne 0x14006c6f6
mov rcx, qword [0x140224818]
lea edx, [rax + 8]
lea r8d, [rax + 0x28]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x14006c721
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [0x14022af50]
test rax, rax
je 0x14006c671
mov qword [rax], rbp
mov rcx, rbx
mov qword [rbp + 8], rax
mov qword [0x14022af50], rbp
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
and dword [rsp + 0x30], 0
lea r9, [rbp + 0x20]
and dword [rsp + 0x28], 0
mov rcx, rax
mov r8, rdi
mov dword [rsp + 0x20], 0x100000
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov rdx, qword [rbp + 0x20]
lea rcx, [rbp + 0x18]
mov r9, rbp
mov dword [rsp + 0x28], 8
or dword [rsp + 0x20], 0xffffffff
lea r8, [0x14006c7f0]
call qword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
mov ecx, dword [0x14022af4c]
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rcx, qword [0x140224818]
xor edx, edx
lea r8d, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
je 0x14006c721
mov qword [rax + 8], r15
mov qword [rax + 0x10], r14
mov rcx, qword [rbp + 0x10]
mov qword [rax], rcx
mov qword [rbp + 0x10], rax
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x40
pop r15
pop r14
pop rdi
ret

Function at 0x14006c810
Capabilities:
Set thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
mov rcx, qword [0x140229a30]
xor edx, edx
lea r8d, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rcx, qword [0x140229a30]
xor edx, edx
mov rbx, rax
lea r8d, [rdx + 0x10]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbx + 8], reloc.WS2_32.dll_recv
mov rdx, rbx
mov qword [rbx], rax
mov qword [rbx + 0x10], 0
mov ecx, dword [0x140223a04]
add rsp, 0x20
pop rbx
jmp qword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x1400835f8
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, [0x14022b3e0]
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 0x14008364f
cmp word [rdx], r13w
jne 0x14008364f
or byte [rax + rdi*8 + 0x38], cl
jmp 0x140083654
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x140083779
mov r11d, reloc.WS2_32.dll_listen
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x14008379a
lea r9, [rdx + 2]
cmp cx, r11w
je 0x14008368d
mov rdx, r9
mov word [rbx], cx
jmp 0x1400836b4
cmp r9, r8
jae 0x1400836c4
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 0x14008366e
jmp 0x140083779
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 0x14008376e
cmp dword [rsp + 0x80], esi
je 0x14008376e
lea r8, [0x14022b3e0]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x140083746
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x140083716
mov word [rbx], r13w
jmp 0x140083776
mov ecx, reloc.WS2_32.dll_listen
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 0x140083723
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x140083776
cmp word [rsp + 0x70], r13w
jne 0x140083753
cmp rbx, r14
je 0x140083710
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.14008c6fc
cmp word [rsp + 0x70], r13w
je 0x140083779
mov ecx, reloc.WS2_32.dll_listen
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, [0x14022b3e0]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x140083773
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x140083779
Function at 0x14008ce10
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x14008cf58
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 0x14008cfc7
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14008cfc7
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14008cfc7
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14008cfc7
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14008cfc7
cmp dword [rcx + 0x84], 0xe
jbe 0x14008cfc7
cmp dword [rcx + 0xf8], 0
je 0x14008cfc7
mov ecx, ebx
call fcn.14008ce90
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.14008d0ec
nop
cmp dword [rbp + 0x20], 0
je 0x14008d015
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.14008cf24
int3

Function at 0x140098b80
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 8], rcx
push rbx
push rbp
push rdi
push r13
push r15
sub rsp, 0x30
mov r13d, dword [rcx + 0x64]
mov rdi, rcx
mov rbx, qword [rcx + 0x270]
cmp r13d, 1
mov r8d, 0x2fe
mov qword [rsp + 0x68], rbx
sete al
mov edx, 1
mov byte [rbx + 0x38], al
mov rax, qword [rcx + 8]
mov ecx, 0x100
mov r9d, dword [rdi + 0x7c]
cmovne r8d, ecx
mov rcx, rdi
call qword [rax + reloc.WS2_32.dll_recv]
mov ebp, dword [rbx + 0x28]
xor r15d, r15d
mov qword [rbx + 0x30], rax
cmp dword [rdi + 0x7c], r15d
jle 0x140098d01
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x28], r12
lea r12, [rbx + 0x3c]
mov qword [rsp + 0x20], r14
xor r14d, r14d
nop dword [rax]
mov esi, dword [r12]
mov eax, ebp
cdq
idiv esi
mov ebp, eax
cmp r13d, 1
jne 0x140098c1d
mov rax, qword [rbx + 0x30]
add qword [rax + r14], 0xff
mov rax, qword [rbx + 0x30]
lea r11d, [rsi*2 - 2]
xor r8d, r8d
xor r10d, r10d
mov rdi, qword [r14 + rax]
lea eax, [rsi + 0xfe]
cdq
idiv r11d
xor ebx, ebx
mov r9d, eax
cmp r10d, r9d
jle 0x140098c77
imul ecx, r8d, 0x1fe
add ecx, 0xfe
add ecx, esi
nop word [rax + rax]
add ecx, 0x1fe
inc r8d
mov eax, ecx
cdq
idiv r11d
mov r9d, eax
cmp r10d, eax
jg 0x140098c60
movzx eax, r8b
inc r10d
movzx ecx, bpl
imul ecx, eax
mov byte [rbx + rdi], cl
inc rbx
cmp rbx, 0xff
jle 0x140098c42
cmp r13d, 1
jne 0x140098cd3
mov ecx, r13d
lea rdx, [rdi - 1]
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rdi]
mov byte [rdx], al
lea rdx, [rdx - 1]
movzx eax, byte [rdi + 0xff]
mov byte [rdi + rcx + 0xff], al
inc rcx
cmp rcx, 0xff
jle 0x140098cb0
mov rax, qword [rsp + 0x60]
inc r15d
mov rbx, qword [rsp + 0x68]
add r12, 4
add r14, 8
cmp r15d, dword [rax + 0x7c]
jl 0x140098c00
mov r14, qword [rsp + 0x20]
mov r12, qword [rsp + 0x28]
mov rsi, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r13
pop rdi
pop rbp
pop rbx
ret
Function at 0x1400a39a0
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
push rbx
sub rsp, 0x30
mov rbx, rcx
test rcx, rcx
je 0x1400a3a80
mov rdx, rcx
lea r8, [rsp + 0x40]
mov ecx, 2
call fcn.1400ecdb0
test eax, eax
jne 0x1400a3a80
lea r8, [rsp + 0x20]
mov rdx, rbx
lea ecx, [rax + 0x17]
call fcn.1400ecdb0
test eax, eax
jne 0x1400a3a80
mov qword [rsp + 0x48], rsi
xor esi, esi
mov qword [rsp + 0x50], rdi
mov rdi, 0xffffffffffffffff
inc rdi
cmp byte [rbx + rdi], sil
jne 0x1400a39f7
mov r8, rdi
mov edx, 0x2e
mov rcx, rbx
call fcn.1400ecd90
test rax, rax
je 0x1400a3a3c
sub rax, rbx
mov edx, 0x2e
mov r8, rax
mov rcx, rbx
call fcn.1400ecd90
mov rsi, rax
test rax, rax
je 0x1400a3a3c
inc rsi
mov rcx, rbx
sub rcx, rsi
add rdi, rcx
test rsi, rsi
cmovne rbx, rsi
lea rsi, [rdi + rbx]
mov edi, 0x1505
cmp rbx, rsi
jae 0x1400a3a6c
movzx ecx, byte [rbx]
call fcn.1400b1a60
imul rdi, rdi, 0x21
movsx rcx, al
inc rbx
xor rdi, rcx
cmp rbx, rsi
jb 0x1400a3a51
mov rsi, qword [rsp + 0x48]
movzx eax, dil
mov rdi, qword [rsp + 0x50]
add rsp, 0x30
pop rbx
ret
xor eax, eax
add rsp, 0x30
pop rbx
ret
Function at 0x1400ae0c0
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 0x1400ae0fb
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, gethostname
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 0x1400ae4f0
Capabilities:
Receive data
Receive data on socket
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 r12
push r14
push r15
sub rsp, 0xa0
mov rsi, rcx
mov r15, r8
mov rcx, qword [rcx + 0x260]
mov eax, 0x258
cmp rdx, rcx
mov r8d, 0x260
mov ebx, 0x2a0
mov r14, r9
cmove eax, r8d
mov rbp, qword [rax + rsi]
mov eax, 0x2c0
cmove ebx, eax
mov rax, qword [rsi + 0x430]
add rbx, rsi
xor r12d, r12d
mov rdi, qword [rbx + 8]
sub rdi, qword [rbx + 0x10]
test byte [rax + 0x7c], 3
je 0x1400ae609
cmp rdx, rcx
mov eax, 0x280
mov r8d, 0x288
lea rcx, [0x1400ae110]
cmove eax, r8d
cmp qword [rax + rsi], rcx
jne 0x1400ae609
cmp qword [rbx], r12
je 0x1400ae590
test rdi, rdi
je 0x1400ae609
mov rdx, 0xffffffffffffffff
xor r9d, r9d
mov r8, rdx
mov rcx, rbp
call fcn.1400b1060
cmp eax, 0xffffffff
je 0x1400ae609
test al, 1
je 0x1400ae609
cmp qword [rbx], r12
jne 0x1400ae5da
mov rax, qword [rsi]
mov ecx, dword [rax + 0xb68]
add ecx, ecx
movsxd rcx, ecx
mov qword [rbx + 8], rcx
call qword [fcn.14005af78]
mov rdi, qword [rbx + 8]
mov qword [rbx], rax
mov qword [rbx + 0x10], r12
mov qword [rbx + 0x18], r12
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400ae605
mov rdx, qword [rbx + 0x10]
xor r9d, r9d
add rdx, rcx
mov r8d, edi
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_recv]
movsxd rcx, eax
test eax, eax
jle 0x1400ae609
add qword [rbx + 0x10], rcx
jmp 0x1400ae609
mov qword [rbx + 8], r12
xor r9d, r9d
mov r8d, r14d
mov rdx, r15
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_send]
movsxd rdi, eax
cmp rdi, 0xffffffffffffffff
jne 0x1400ae677
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp eax, 0x2733
jne 0x1400ae643
mov rcx, qword [rsp + 0xe0]
lea eax, [rdi + 0x52]
mov qword [rcx], r12
jmp 0x1400ae685
mov r8d, 0x80
lea rdx, [rsp + 0x20]
mov ecx, ebx
call fcn.1400fbde0
mov rcx, qword [rsi]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.1400adf10
mov rax, qword [rsi]
mov dword [rax + 0x1140], ebx
mov eax, gethostname
jmp 0x1400ae67a
mov eax, r12d
mov rcx, qword [rsp + 0xe0]
mov qword [rcx], rdi
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
ret