joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1401c1180
Capabilities:
Allocate thread local storage

Disassembly:
push rsi
sub rsp, 0x20
mov rsi, rcx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x1401c1195
mov dword [rsi], eax
cmp eax, 0xffffffff
setne al
add rsp, 0x20
pop rsi
ret

Function at 0x1401c2ce8
Capabilities:
Read pipe
Write file on windows
Write pipe

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x138
mov rdi, rdx
mov rsi, rcx
mov rax, qword [0x1403ac028]
xor rax, rsp
mov qword [rsp + 0x130], rax
movabs r15, 0xaaaaaaaaaaaaaaaa
lea r14, [rsp + 0xe0]
mov qword [r14 + 8], r15
lea rbx, [rcx + 0x60]
lea r12, [rcx + 0x58]
lea r13, [rcx + 0x54]
mov ebp, dword [rcx + 0x30]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [r14], 1
mov dword [r14 + 4], eax
mov dword [r14 + 8], ebp
mov qword [r14 + 0x10], r13
mov qword [r14 + 0x18], r12
mov qword [r14 + 0x20], rbx
movups xmm0, xmmword [rsi + 0x20]
movups xmmword [r14 + 0x28], xmm0
xor ebx, ebx
mov qword [r14 + 0x48], rbx
xorps xmm0, xmm0
movups xmmword [r14 + 0x38], xmm0
lea r9, [rsp + 0x90]
mov qword [r9 + 8], r15
mov qword [r9], rbx
mov dword [r9 + 8], ebx
movups xmmword [r9 + 0x10], xmm0
movups xmmword [r9 + 0x20], xmm0
movups xmmword [r9 + 0x30], xmm0
movups xmmword [r9 + 0x40], xmm0
lea rax, [rsp + 0x8c]
mov dword [rax], ebx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0x50
mov rcx, rdi
mov rdx, r14
mov r8d, 0x50
call qword [sym.imp.KERNEL32.dll_TransactNamedPipe]
test eax, eax
je 0x1401c2e93
xor ebx, ebx
cmp dword [rsp + 0x90], 2
jne 0x1401c2e93
cmp dword [rsp + 0x94], 0
je 0x1401c2e93
cmp qword [rsp + 0xc8], 0
je 0x1401c2e93
cmp qword [rsp + 0xd0], 0
je 0x1401c2e93
cmp qword [rsp + 0xd8], 0
je 0x1401c2e93
lea rdx, [rsp + 0x38]
mov qword [rdx + 8], r15
mov dword [rdx + 8], 0
xorps xmm0, xmm0
movups xmmword [rdx + 0x10], xmm0
movups xmmword [rdx + 0x20], xmm0
movups xmmword [rdx + 0x30], xmm0
movups xmmword [rdx + 0x40], xmm0
mov qword [rdx], 3
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x8c]
mov rcx, rdi
mov r8d, 0x50
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
setne bl
je 0x1401c2e93
mov rax, qword [rsp + 0xc8]
mov qword [rsi + 0x38], rax
mov rax, qword [rsp + 0xd0]
mov qword [rsi + 0x40], rax
mov rax, qword [rsp + 0xd8]
mov qword [rsi + 0x48], rax
mov eax, dword [rsp + 0x94]
mov dword [rsi + 0x50], eax
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.140203460
mov eax, ebx
add rsp, 0x138
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x1401d58a6
Capabilities:
Terminate process

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov rsi, rcx
call fcn.1400f3fa0
test al, al
je 0x1401d58d4
mov rcx, qword [rsi]
mov edx, gethostbyname
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rsi]
mov edx, 1
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
lea rdi, [rsi + 0x30]
mov rcx, rdi
xor edx, edx
call fcn.1401d5952
mov rcx, qword [rsi + 0x48]
mov qword [rsi + 0x48], 0
test rcx, rcx
je 0x1401d58f8
call fcn.1400fea50
mov rcx, qword [rsi + 0x38]
movabs rax, 0xfffffffc00000000
and rax, rcx
cmp rax, qword [0x1403bc448]
jne 0x1401d5917
call fcn.14004472e
mov qword [rsi + 0x38], 0
mov rcx, rdi
xor edx, edx
call fcn.1401d5952
lea rcx, [rsi + 0x28]
call fcn.140055c40
lea rcx, [rsi + 0x20]
call fcn.140055c40
lea rcx, [rsi + 0x18]
call fcn.140055c40
mov rcx, rsi
add rsp, 0x28
pop rdi
pop rsi
jmp fcn.1400f3f00
Function at 0x1401d63a6
Capabilities:
Terminate process

Disassembly:
push rsi
sub rsp, 0x20
mov rsi, rcx
call fcn.1400f3fa0
test al, al
je 0x1401d63c8
mov rcx, qword [rsi]
xor edx, edx
add rsp, 0x20
pop rsi
jmp qword [sym.imp.KERNEL32.dll_TerminateProcess]
nop
add rsp, 0x20
pop rsi
ret

Function at 0x1401e70d4
Capabilities:
Initialize winsock library

Disassembly:
jmp 0x1401e70d4
push rsi
sub rsp, 0x1c0
mov rax, qword [0x1403ac028]
xor rax, rsp
mov qword [rsp + 0x1b8], rax
lea rsi, [rsp + 0x20]
mov r8d, 0x198
mov rcx, rsi
mov dl, 0xaa
call fcn.1402055c0
mov cx, 0x202
mov rdx, rsi
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x1401e713d
movzx eax, byte [rsp + 0x21]
shl eax, 8
cmp eax, 0x200
jne 0x1401e7153
mov rcx, qword [rsp + 0x1b8]
xor rcx, rsp
call fcn.140203460
nop
add rsp, 0x1c0
pop rsi
ret
lea rdx, str.WSAStartup_failed_with_error:__d_n
mov ecx, 0xfffffffd
mov r8d, eax
call fcn.14014fd13
jmp 0x1401e716a
lea rdx, str.Could_not_find_a_usable_version_of_Winsock.dll_n
mov ecx, 0xfffffffd
call fcn.14014fd13
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, 0xffffffff
call fcn.1402165c4
int3
Function at 0x1401e8cc8
Capabilities:
Resume thread

Disassembly:
push rsi
sub rsp, 0x20
mov rsi, rcx
lea rdx, [rcx + 0x10]
mov rcx, qword [rcx + 8]
call fcn.1400bdd12
mov rcx, qword [rsi + 8]
add rsp, 0x20
pop rsi
jmp fcn.1400bf313

Function at 0x1401eba80
Capabilities:
Reference processor manufacturer constants

Disassembly:
push rsi
push rdi
mov r8, rcx
xor edi, edi
xor ecx, ecx
xor eax, eax
xchg rbx, r9
cpuid
xchg rbx, r9
test eax, eax
jle 0x1401ebba7
mov r10d, eax
xor ecx, ecx
mov eax, 1
xchg rbx, r9
cpuid
xchg rbx, r9
mov r9d, ecx
mov r11d, edx
mov esi, eax
cmp r10d, 7
jb 0x1401ebada
mov eax, 7
xor ecx, ecx
xchg rbx, rdi
cpuid
xchg rbx, rdi
mov r10d, ecx
and edi, 0x20
shr r10b, 4
and r10b, 1
jmp 0x1401ebadd
xor r10d, r10d
mov dword [r8], esi
mov eax, esi
and eax, 0xf
mov dword [r8 + 8], eax
shr esi, 0xc
and esi, 3
mov dword [r8 + 4], esi
mov eax, r11d
shr eax, 0x17
and al, 1
mov byte [r8 + 0xc], al
mov eax, r11d
shr eax, 0x19
and al, 1
mov byte [r8 + 0xd], al
shr r11d, 0x1a
and r11b, 1
mov byte [r8 + 0xe], r11b
mov eax, r9d
and al, 1
mov byte [r8 + 0xf], al
mov eax, r9d
shr eax, 9
and al, 1
mov byte [r8 + 0x10], al
mov eax, r9d
shr eax, 0x13
and al, 1
mov byte [r8 + 0x11], al
mov eax, r9d
shr eax, 0x14
and al, 1
mov byte [r8 + 0x12], al
mov eax, r9d
shr eax, 0x17
and al, 1
mov byte [r8 + 0x13], al
mov eax, r9d
shr eax, 0x1f
mov byte [r8 + 0x1a], al
mov eax, r9d
not eax
test eax, 0x1c000000
jne 0x1401ebb74
xor ecx, ecx
xgetbv
not eax
test al, 6
sete al
jmp 0x1401ebb76
xor eax, eax
mov byte [r8 + 0x14], al
mov ecx, r9d
shr ecx, 0x19
and cl, 1
mov byte [r8 + 0x17], cl
shr r9d, 0xc
and r9b, 1
mov byte [r8 + 0x15], r9b
test al, al
setne al
test edi, edi
setne cl
and cl, al
mov byte [r8 + 0x16], cl
mov byte [r8 + 0x18], r10b
xor ecx, ecx
mov eax, 0x80000000
xchg rbx, r9
cpuid
xchg rbx, r9
cmp eax, 0x80000006
jle 0x1401ebbdc
mov eax, 0x80000007
xor ecx, ecx
xchg rbx, r9
cpuid
xchg rbx, r9
shr edx, 8
and dl, 1
mov byte [r8 + 0x19], dl
test dl, dl
jne 0x1401ebc19
jmp 0x1401ebbe5
movzx edx, byte [r8 + 0x19]
test dl, dl
jne 0x1401ebc19
cmp byte [r8 + 0x1a], 0
je 0x1401ebc19
mov eax, 0x40000000
xor ecx, ecx
xchg rbx, r9
cpuid
xchg rbx, r9
cmp r9d, 0x7263694d
jne 0x1401ebc19
cmp ecx, 0x666f736f
jne 0x1401ebc19
cmp edx, 0x76482074
jne 0x1401ebc19
mov byte [r8 + 0x19], 1
pop rdi
pop rsi
ret
Function at 0x1401ec2f0
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov esi, ecx
mov rax, qword [0x1403ac028]
xor rax, rsp
mov qword [rsp + 0x40], rax
test rdx, rdx
je 0x1401ec3a7
cmp dword [0x1403eca68], esi
jg 0x1401ec3a7
mov rdi, rdx
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
movsxd r15, eax
mov ecx, 0xfffffff4
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov r14, rax
mov qword [rsp + 0x30], r15
lea rbp, [rdi + r15]
lea r15, [rsp + 0x3c]
mov r13, qword [sym.imp.KERNEL32.dll_WriteFile]
mov r12, rdi
nop dword [rax]
cmp r12, rbp
jae 0x1401ec397
mov dword [rsp + 0x3c], 0
mov r8d, ebp
sub r8d, r12d
mov qword [rsp + 0x20], 0
mov rcx, r14
mov rdx, r12
mov r9, r15
call r13
test eax, eax
je 0x1401ec397
mov eax, dword [rsp + 0x3c]
add r12, rax
test eax, eax
jne 0x1401ec360
test ebx, ebx
je 0x1401ec3a7
mov rax, qword [rsp + 0x30]
cmp byte [rax + rdi - 1], 0xa
jne 0x1401ec3cf
cmp esi, 3
je 0x1401ec443
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140203460
nop
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, 0xfffffff4
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rdi, rax
lea r15, [0x140276c6f]
lea r12, [0x140276c70]
lea rbx, [rsp + 0x3c]
mov r14, r15
nop word cs:[rax + rax]
cmp r14, r12
jae 0x1401ec3a7
mov dword [rsp + 0x3c], 0
mov r8d, r15d
sub r8d, r14d
inc r8d
mov qword [rsp + 0x20], 0
mov rcx, rdi
mov rdx, r14
mov r9, rbx
call r13
test eax, eax
je 0x1401ec3a7
mov eax, dword [rsp + 0x3c]
add r14, rax
test eax, eax
jne 0x1401ec400
jmp 0x1401ec3a7
int3
Function at 0x1401eed50
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x20
mov eax, dword [0x1403ecaa0]
mov ecx, dword [0x1403bcfc0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1401eedd9
lea rcx, [0x1403eca90]
call fcn.140176f00
test rax, rax
jne 0x1401eedc6
mov ecx, 4
call fcn.14020216c
mov rdi, rax
mov dword [rax], 0
lea rbx, [0x1403eca90]
mov rcx, rbx
call fcn.140176f00
mov rsi, rax
mov rcx, rbx
mov rdx, rdi
call fcn.140176f40
test rsi, rsi
je 0x1401eedc6
mov rcx, rsi
call fcn.1402021a8
lea rcx, [0x1403eca90]
add rsp, 0x20
pop rbx
pop rdi
pop rsi
jmp fcn.140176f00
lea rcx, [0x1403ecaa0]
call fcn.1402021ec
cmp dword [0x1403ecaa0], 0xffffffff
jne 0x1401eed78
xorps xmm0, xmm0
movups xmmword [0x1403eca90], xmm0
lea rcx, [0x1403eca90]
lea rdx, [0x140052800]
call fcn.140176f90
lea rcx, [0x1403ecaa0]
call fcn.1402022a0
jmp 0x1401eed78
Function at 0x1401f270c
Capabilities:
Allocate or change rwx memory

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x40
mov rsi, r9
mov r14, r8
mov rdi, rdx
mov rbx, rcx
mov rax, qword [0x1403ac028]
xor rax, rsp
mov qword [rsp + 0x38], rax
lea r15, [rsp + 0x34]
mov dword [r15], 0xaaaaaaaa
mov qword [rsp + 0x20], r15
mov r8, r9
mov r9d, 8
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x1401f27b7
movabs rax, 0xaaaaaaaaaaaaaaaa
lea r12, [rsp + 0x28]
mov qword [r12], rax
mov qword [rsp + 0x20], r12
mov rcx, rbx
mov rdx, rdi
mov r8, r14
mov r9, rsi
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov ebp, eax
mov r14, qword [r12]
mov r9d, dword [rsp + 0x34]
mov qword [rsp + 0x20], r15
mov rcx, rbx
mov rdx, rdi
mov r8, rsi
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x1401f27b7
test ebp, ebp
setne al
cmp r14, rsi
sete sil
and sil, al
jmp 0x1401f27b9
xor esi, esi
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.140203460
mov eax, esi
add rsp, 0x40
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret

Function at 0x1401f4a68
Capabilities:
Create pipe

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x50
mov r14, qword [rsp + 0xc8]
mov rax, qword [0x1403ac028]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov qword [r14], 0xffffffffffffffff
mov esi, 5
cmp ecx, 3
jne 0x1401f4b62
mov edi, dword [rsp + 0xc0]
mov r11d, dword [rsp + 0xb8]
mov ecx, dword [rsp + 0xb0]
mov eax, dword [rsp + 0xa8]
mov r10d, dword [rsp + 0xa0]
cmp byte [r8 + 0x17], 0
jns 0x1401f4ace
mov r8, qword [r8]
mov rsi, qword [rdx]
mov dword [rsp + 0x30], edi
mov dword [rsp + 0x28], r11d
mov dword [rsp + 0x20], ecx
mov qword [rsp + 0x38], 0
mov rcx, r8
mov edx, r9d
mov r8d, r10d
mov r9d, eax
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
cmp rax, 0xffffffffffffffff
je 0x1401f4b4c
mov rdi, rax
movabs rax, 0xaaaaaaaaaaaaaaaa
lea rbx, [rsp + 0x40]
mov qword [rbx], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
xor r15d, r15d
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], r15d
mov dword [rsp + 0x30], 3
mov rcx, rax
mov rdx, rdi
mov r8, rsi
mov r9, rbx
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
cmp eax, 1
sbb r15, r15
or r15, qword [rbx]
jmp 0x1401f4b53
mov r15, 0xffffffffffffffff
mov qword [r14], r15
xor eax, eax
cmp r15, 0xffffffffffffffff
sete al
lea esi, [rax + rax*4]
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140203460
mov eax, esi
add rsp, 0x50
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
Function at 0x1401f7112
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xa8
mov rsi, rcx
mov rax, qword [0x1403ac028]
xor rax, rsp
mov qword [rsp + 0xa0], rax
test dl, dl
je 0x1401f719f
lea rax, [0x1401fbc00]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], 0
lea rdi, [0x140399c70]
lea r8, str.NtMapViewOfSection
mov rcx, rsi
mov rdx, rdi
mov r9d, 1
call fcn.1401f6ac4
lea rax, [0x1401fbc70]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], 1
lea r8, str.NtUnmapViewOfSection
mov rcx, rsi
mov rdx, rdi
mov r9d, 1
call fcn.1401f6ac4
jmp 0x1401f71aa
cmp qword [rsi + 0x18], 0
je 0x1401f732e
mov rax, qword [rsi]
test rax, rax
je 0x1401f7356
mov rdi, qword [rax]
mov dword [rsp + 0x20], 1
mov r13, qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov r8d, 0x10000
mov rcx, rdi
xor edx, edx
mov r9d, 0x2000
call r13
mov r14, rax
mov r12, qword [rsi + 0x18]
shl r12, 6
lea rbx, [r12 + 0x60]
mov rcx, rbx
call fcn.1401f68c0
mov r15, rax
mov edx, r15d
and edx, 0xfffff000
add rdx, r14
add r12, 0x105f
and r12, 0xfffffffffffff000
mov dword [rsp + 0x20], 0x40
mov rcx, rdi
mov r8, r12
mov r9d, 0x1000
call r13
test rax, rax
je 0x1401f7359
mov r14, rax
and r15d, 0xfff
add r14, r15
movaps xmm0, xmmword [0x14026fe30]
lea r15, [rsp + 0x40]
movups xmmword [r15 + 0x10], xmm0
movups xmmword [r15 + 0x50], xmm0
movups xmmword [r15 + 0x40], xmm0
movups xmmword [r15 + 0x30], xmm0
movups xmmword [r15 + 0x20], xmm0
mov qword [r15], rbx
mov dword [r15 + 0x18], 0
mov qword [r15 + 8], 0x20
lea rcx, [0x1403ed780]
mov r8d, 0xd8
xor edx, edx
call fcn.1402055c0
mov rcx, rsi
mov rdx, r14
mov r8, rbx
mov r9, r15
call fcn.1401f76c0
mov ebp, eax
test eax, eax
jne 0x1401f7330
movabs rax, 0xaaaaaaaaaaaaaaaa
lea rcx, [rsp + 0x38]
mov qword [rcx], rax
mov qword [rsp + 0x20], rcx
lea r8, [rsp + 0x40]
mov r9d, 0x20
mov rcx, rdi
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov ebp, 0x2a
test eax, eax
je 0x1401f7330
cmp qword [rsp + 0x38], 0x20
jne 0x1401f7330
lea rax, [rsp + 0x34]
mov dword [rax], 0xaaaaaaaa
mov qword [rsp + 0x20], rax
mov rcx, rdi
mov rdx, r14
mov r8, rbx
mov r9d, 0x20
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov rcx, qword [rsi]
test rcx, rcx
je 0x1401f735c
lea rdx, str.g_originals
lea r8, [0x1403ed780]
mov r9d, 0xd8
call fcn.1401d5ece
mov ebp, eax
jmp 0x1401f7330
xor ebp, ebp
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.140203460
mov eax, ebp
add rsp, 0xa8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
int3
int3
int3

Function at 0x1401f96e0
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x28
test rdx, rdx
je 0x1401f9722
mov rsi, rdx
mov rdi, rcx
mov r14d, 0xffffffff
nop word [rax + rax]
cmp rsi, r14
mov ebx, 0xffffffff
cmovb rbx, rsi
mov rcx, rdi
mov edx, ebx
call sub.ADVAPI32.dll_SystemFunction036
test al, al
je 0x1401f972c
add rdi, rbx
sub rsi, rbx
jne 0x1401f9700
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
ret
int3
Function at 0x1401fbbe0
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
sub rsp, 0x28
mov edx, 4
call sub.ADVAPI32.dll_SystemFunction036
test al, al
setne al
add rsp, 0x28
ret

Function at 0x1402020c6
Capabilities:
Create thread

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x38
mov rax, r8
mov r8, rdx
mov rdi, rcx
mov rsi, qword [rsp + 0x90]
mov edx, dword [rsp + 0x80]
mov r10, qword [rsp + 0x88]
mov qword [rsi], 0
mov rcx, qword [rcx]
mov qword [rsp + 0x30], r10
mov dword [rsp + 0x28], edx
mov qword [rsp + 0x20], r9
xor r14d, r14d
xor edx, edx
mov r9, rax
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
test rax, rax
je 0x14020215e
mov rbx, rax
mov rdi, qword [rdi]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r14d
mov dword [rsp + 0x30], 3
mov rcx, rax
mov rdx, rbx
mov r8, rdi
mov r9, rsi
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
xor ecx, ecx
test eax, eax
sete cl
lea eax, [rcx + rcx*4]
add rsp, 0x38
pop rbx
pop rdi
pop rsi
pop r14
ret
add rsp, 0x38
pop rbx
pop rdi
pop rsi
pop r14
jmp fcn.1400f4580

Function at 0x1402029a4
Capabilities:
Parse pe header

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

Function at 0x140202c6c
Capabilities:
Enumerate pe sections

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
movsxd r8, dword [0x14000003c]
lea rsi, [0x140000000]
add r8, rsi
mov rbx, rdx
mov rdi, rcx
cmp dword [r8 + 0x84], 0xd
jbe 0x140202ce4
mov r10d, dword [r8 + 0xf0]
xor r9d, r9d
test r10d, r10d
je 0x140202ce4
movzx ecx, word [r8 + 0x14]
movzx r11d, word [r8 + 6]
add rcx, 0x18
mov r10d, dword [r10 + rsi + 0xc]
add rcx, r8
test r11d, r11d
je 0x140202ce4
mov eax, dword [rcx + 0xc]
cmp r10d, eax
jb 0x140202cd8
mov edx, dword [rcx + 8]
add eax, edx
cmp r10d, eax
jb 0x140202cf6
inc r9d
add rcx, 0x28
cmp r9d, r11d
jb 0x140202cc6
xor eax, eax
mov rbx, qword [rsp + 8]
mov rsi, qword [rsp + 0x10]
mov rdi, qword [rsp + 0x18]
ret
mov dword [rdi], edx
mov eax, dword [rcx + 0x24]
mov dword [rbx], eax
mov eax, dword [rcx + 0xc]
add rax, rsi
jmp 0x140202ce6
Function at 0x14021639c
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 0x1402163d3
call fcn.14021a540
mov dword [rax], reloc.WS2_32.dll_shutdown
call fcn.14021cbf8
xor eax, eax
jmp 0x140216461
mov rdx, r9
mov rcx, r8
call fcn.140216484
mov rbx, rax
test rax, rax
je 0x14021645e
lea rax, [rsp + 0x50]
mov rdx, rsi
mov qword [rsp + 0x28], rax
lea r8, [0x1402164f0]
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 0x14021644b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.14021a5bc
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x140216432
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x140216441
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rcx, rbx
call fcn.1400fea50
jmp 0x14021645e
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x14021645b
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 0x1402165c4
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x14021670c

Function at 0x140216c0c
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rdx, qword [rcx + 0x10]
mov rbx, rcx
mov ecx, dword [rcx + 0x18]
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov edi, eax
test eax, eax
jne 0x140216c47
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.14021a5bc
call fcn.14021a540
mov eax, dword [rax]
jmp 0x140216cbe
cmp rdi, qword [rbx + 0x18]
ja 0x140216c53
mov qword [rbx + 0x20], rdi
jmp 0x140216cbc
cmp byte [rbx + 0x28], 0
lea rsi, [rdi + 1]
je 0x140216c6a
mov rcx, qword [rbx + 0x10]
call fcn.1400fea50
mov byte [rbx + 0x28], 0
lea rcx, [rdi*2 + 2]
call fcn.1400fe9f0
mov qword [rbx + 0x10], rax
mov r8, rax
neg rax
mov edx, 0
sbb eax, eax
not eax
and eax, 0xc
cmove rdx, rsi
test eax, eax
sete cl
mov byte [rbx + 0x28], cl
mov qword [rbx + 0x18], rdx
test eax, eax
jne 0x140216cbe
mov ecx, dword [rbx + 0x18]
mov rdx, r8
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov eax, eax
test rax, rax
je 0x140216c31
mov qword [rbx + 0x20], rax
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x140216fe4
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.14021d6a0
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14021d6a0
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140217134
cmp rax, 0xffffffffffffffff
je 0x140217134
xor edi, edi
test rbp, rbp
jle 0x1402170df
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.1400feae0
mov rbx, rax
test rax, rax
jne 0x14021706c
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x1402170d5
mov edx, 0x8000
mov ecx, r14d
call fcn.14021f578
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.140223044
cmp eax, 0xffffffff
je 0x1402170b5
cdqe
sub rbp, rax
test rbp, rbp
jg 0x14021707c
mov edx, r15d
mov ecx, r14d
call fcn.14021f578
jmp 0x1402170d5
cmp byte [rsi + 0x38], dil
je 0x1402170cc
cmp dword [rsi + 0x34], 5
jne 0x1402170cc
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], reloc.WS2_32.dll_listen
cmp byte [rsi + 0x30], dil
je 0x1402170d5
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.1400fea50
jmp 0x140217148
jns 0x140217148
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14021d6a0
cmp rax, 0xffffffffffffffff
jne 0x140217100
cmp byte [rsi + 0x30], dil
je 0x140217148
mov edi, dword [rsi + 0x2c]
jmp 0x140217148
mov ecx, r14d
call fcn.14021b48c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140217148
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, reloc.WS2_32.dll_listen
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], reloc.WS2_32.dll_listen
jmp 0x140217148
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x140217141
mov eax, dword [rsi + 0x2c]
jmp 0x140217146
mov eax, reloc.WS2_32.dll_shutdown
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14021d6a0
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