joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400196a0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
push rsi
push rdi
push rbx
sub rsp, 0x28
lea rbp, [rsp + 0x20]
mov esi, dword [0x140056078]
test esi, esi
je 0x14001972c
dec esi
mov ecx, esi
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
ja 0x140019723
je 0x140019721
movzx eax, byte [0x1400670e8]
mov ecx, 0x18
call fcn.14004a330
test rax, rax
je 0x14001974d
mov qword [rax], 0
mov byte [rax + 8], 0
mov dword [rax + 0x10], esi
mov ecx, esi
mov rbx, rax
call sub.kernel32.dll_TlsGetValue
mov rdi, rax
mov ecx, esi
mov rsi, rbx
mov rdx, rbx
call sub.kernel32.dll_TlsSetValue
test rdi, rdi
je 0x14001971c
mov rcx, qword [0x1400670d0]
xor edx, edx
mov r8, rdi
call fcn.14005452c
mov rax, rsi
jmp 0x140019723
xor eax, eax
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop rbp
ret
lea rcx, [0x140056060]
call fcn.140018c10
mov esi, eax
mov ecx, esi
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
jbe 0x1400196c6
jmp 0x140019723
mov ecx, 8
mov edx, 0x18
call fcn.140004690
int3
Function at 0x14001cc50
Capabilities:
Read file via mapping

Disassembly:
push rbp
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x90
lea rbp, [rsp + 0x80]
mov rax, r8
mov rdi, rcx
mov dword [rbp - 0x48], 0
xorps xmm0, xmm0
movups xmmword [rbp - 0x40], xmm0
mov dword [rbp - 0x30], 7
mov qword [rbp - 0x2c], 0
mov word [rbp - 0x24], 0
mov byte [rbp - 0x28], 1
lea r8, [rbp - 0x48]
mov rcx, rdx
mov rdx, rax
call fcn.140039a70
mov rsi, rdx
test rax, rax
je 0x14001cd12
mov eax, esi
and eax, 3
cmp eax, 1
jne 0x14001cd06
mov rax, rsi
dec rsi
mov rbx, qword [rax - 1]
mov r14, qword [rax + 7]
mov rax, qword [r14]
test rax, rax
je 0x14001ccd2
mov rcx, rbx
call rax
cmp qword [r14 + 8], 0
je 0x14001ccf5
cmp qword [r14 + 0x10], 0x11
jb 0x14001cce4
mov rbx, qword [rbx - 8]
mov rcx, qword [0x1400670d0]
xor edx, edx
mov r8, rbx
call fcn.14005452c
mov rcx, qword [0x1400670d0]
xor edx, edx
mov r8, rsi
call fcn.14005452c
mov qword [rdi], 0
jmp 0x14001ce7d
lea rcx, [rbp - 0x48]
mov rdx, rsi
call fcn.140039cf0
cmp dword [rbp - 0x48], 2
jne 0x14001cd9f
mov rax, qword [rbp - 0x40]
mov ecx, eax
and ecx, 3
cmp ecx, 1
jne 0x14001cd7f
lea rbx, [rax - 1]
mov r14, qword [rax - 1]
mov r15, qword [rax + 7]
mov rax, qword [r15]
test rax, rax
je 0x14001cd4b
mov rcx, r14
call rax
cmp qword [r15 + 8], 0
je 0x14001cd6e
cmp qword [r15 + 0x10], 0x11
jb 0x14001cd5d
mov r14, qword [r14 - 8]
mov rcx, qword [0x1400670d0]
xor edx, edx
mov r8, r14
call fcn.14005452c
mov rcx, qword [0x1400670d0]
xor edx, edx
mov r8, rbx
call fcn.14005452c
mov qword [rdi], 0
mov rcx, rsi
add rsp, 0x90
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
pop rbp
jmp sub.kernel32.dll_CloseHandle
mov r12, qword [rbp - 0x10]
test rsi, rsi
je 0x14001cded
mov qword [rbp - 0x48], 0
call sub.kernel32.dll_GetCurrentProcess
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
lea r9, [rbp - 0x48]
mov rcx, rax
mov rdx, rsi
mov r8, rax
call sub.kernel32.dll_DuplicateHandle
test eax, eax
je 0x14001ce69
mov rbx, qword [rbp - 0x48]
jmp 0x14001cdef
xor ebx, ebx
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov rcx, rbx
xor edx, edx
mov r8d, 2
xor r9d, r9d
call sub.kernel32.dll_CreateFileMappingA
test rax, rax
je 0x14001ce58
mov r14, rax
mov qword [rsp + 0x20], r12
mov rcx, rax
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call sub.kernel32.dll_MapViewOfFile
mov r15, rax
mov rcx, r14
call sub.kernel32.dll_CloseHandle
test r15, r15
je 0x14001ce58
mov qword [rdi + 8], rbx
mov qword [rdi + 0x10], r15
mov qword [rdi + 0x18], r12
mov qword [rdi], 1
jmp 0x14001ce75
mov qword [rdi], 0
mov rcx, rbx
call sub.kernel32.dll_CloseHandle
jmp 0x14001ce75
call sub.kernel32.dll_GetLastError
mov qword [rdi], 0
mov rcx, rsi
call sub.kernel32.dll_CloseHandle
nop
add rsp, 0x90
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
pop rbp
ret
Function at 0x14003b6c0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x68
lea rbp, [rsp + 0x60]
mov rbx, rdx
mov qword [rbp - 0x20], rcx
movzx eax, byte [rdx + 0x18]
mov byte [rbp + 7], al
mov byte [rdx + 0x18], 0
mov qword [rbp - 0x18], 0
mov qword [rbp - 0x10], 2
mov qword [rbp - 8], 0
movzx r15d, word [rdx + 0x10]
mov rsi, qword [rdx]
mov r12, qword [rdx + 8]
mov eax, 2
xor edi, edi
xor r13d, r13d
mov r14d, r15d
test r15w, r15w
je 0x14003b75b
jmp 0x14003b870
shl edx, 6
or edx, r9d
mov r14d, edx
xor r15d, r15d
mov rsi, rcx
cmp r14w, 0x22
jne 0x14003b823
xor r13b, 1
mov r14d, r15d
test r15w, r15w
jne 0x14003b870
cmp rsi, r12
je 0x14003b882
lea rcx, [rsi + 1]
mov qword [rbx], rcx
movzx r14d, byte [rsi]
test r14b, r14b
jns 0x14003b739
mov edx, r14d
and edx, 0x1f
lea rcx, [rsi + 2]
mov qword [rbx], rcx
movzx r9d, byte [rsi + 1]
and r9d, 0x3f
cmp r14b, 0xdf
jbe 0x14003b730
lea rcx, [rsi + 3]
mov qword [rbx], rcx
movzx r8d, byte [rsi + 2]
shl r9d, 6
and r8d, 0x3f
or r8d, r9d
cmp r14b, 0xf0
jb 0x14003b7dc
lea rcx, [rsi + 4]
mov qword [rbx], rcx
movzx r14d, byte [rsi + 3]
and edx, 7
shl edx, 0x12
shl r8d, 6
and r14d, 0x3f
or r14d, r8d
or r14d, edx
cmp r14d, 0xffff
jbe 0x14003b739
jmp 0x14003b7f2
shl edx, 0xc
or r8d, edx
mov r14d, r8d
cmp r14d, 0xffff
jbe 0x14003b739
lea edx, [r14 + 0xff0000]
shr edx, 0xa
or edx, 0xd800
and r14d, 0x3ff
or r14d, 0xdc00
mov word [rbx + 0x10], r14w
mov rsi, rcx
mov r15d, r14d
mov r14d, edx
jmp 0x14003b73f
movzx ecx, r14w
cmp ecx, 0x3b
jne 0x14003b83a
test r13b, 1
je 0x14003b87e
mov r13b, 1
mov r14w, 0x3b
cmp rdi, qword [rbp - 0x18]
jne 0x14003b84d
lea rcx, [rbp - 0x18]
call fcn.14003a680
mov rax, qword [rbp - 0x10]
mov word [rax + rdi*2], r14w
inc rdi
mov qword [rbp - 8], rdi
mov r14d, r15d
test r15w, r15w
je 0x14003b75b
nop word cs:[rax + rax]
mov word [rbx + 0x10], 0
xor r15d, r15d
jmp 0x14003b73f
mov byte [rbx + 0x18], 1
test rdi, rdi
setne al
or byte [rbp + 7], al
je 0x14003b8c8
mov rdx, qword [rbp - 0x10]
lea rcx, [rbp - 0x40]
mov r8, rdi
call fcn.14001b2d0
movups xmm0, xmmword [rbp - 0x40]
movups xmm1, xmmword [rbp - 0x30]
mov rax, qword [rbp - 0x20]
movups xmmword [rax + 0x10], xmm1
movups xmmword [rax], xmm0
cmp qword [rbp - 0x18], 0
jne 0x14003b8e0
add rsp, 0x68
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
movabs rax, 0x8000000000000000
mov rcx, qword [rbp - 0x20]
mov qword [rcx], rax
cmp qword [rbp - 0x18], 0
je 0x14003b8b7
mov r8, qword [rbp - 0x10]
mov rcx, qword [0x1400670d0]
xor edx, edx
add rsp, 0x68
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp fcn.14005452c
Function at 0x14003b930
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x48
lea rbp, [rsp + 0x40]
movdqa xmmword [rbp - 0x10], xmm6
mov rdi, r8
mov rsi, rcx
mov rcx, qword [rcx + 8]
mov rbx, qword [rsi + 0x10]
xor r14d, r14d
mov eax, 0
cmp rbx, 3
jb 0x14003b9a1
movzx r8d, byte [rbx + rcx - 2]
mov r9d, r8d
and r9b, 0xf0
xor r14d, r14d
cmp r9b, 0xa0
jne 0x14003b9a1
xor r14d, r14d
cmp byte [rbx + rcx - 3], 0xed
jne 0x14003b9a1
movzx r14d, byte [rbx + rcx - 1]
and r8d, 0xf
and r14d, 0x3f
shl r8d, 0x10
shl r14d, 0xa
or r14d, r8d
mov al, 1
cmp rdi, 3
jb 0x14003ba7c
cmp byte [rdx], 0xed
jne 0x14003ba85
movzx r15d, byte [rdx + 1]
mov r8d, r15d
and r8b, 0xf0
cmp r8b, 0xb0
setne r8b
xor al, 1
or al, r8b
jne 0x14003ba85
cmp rbx, 3
jb 0x14003b9e1
add rbx, 0xfffffffffffffffd
mov qword [rsi + 0x10], rbx
movzx r12d, byte [rdx + 2]
shl r15d, 6
lea r8, [rdi + 1]
mov rax, qword [rsi]
mov rcx, rax
sub rcx, rbx
cmp rcx, r8
jb 0x14003bb6f
and r15d, 0x3c0
or r15d, r14d
or r12d, r15d
lea r8d, [r12 + 0x10000]
mov r9d, r8d
shr r9d, 0x12
shr r8d, 4
and r8d, 0xff00
or r8d, r9d
shl r15d, 0xa
and r15d, 0xff0000
or r15d, r8d
shl r12d, 0x18
or r12d, r15d
movd xmm6, r12d
pand xmm6, xmmword [str._a___]
por xmm6, xmmword [0x140059030]
cmp rcx, 3
jbe 0x14003bba1
add rdx, 3
mov rcx, qword [rsi + 8]
movd dword [rcx + rbx], xmm6
add rbx, 4
mov qword [rsi + 0x10], rbx
add rdi, 0xfffffffffffffffd
jmp 0x14003bb13
test rdi, rdi
je 0x14003bb10
lea rax, [rdx + rdi]
mov r9, rdx
jmp 0x14003baa8
add r9, 2
cmp r8, rax
cmovne r8, r9
nop dword [rax]
mov r9, r8
cmp r8, rax
je 0x14003bb10
lea r8, [r9 + 1]
movzx r10d, byte [r9]
test r10b, r10b
jns 0x14003baa0
cmp r10b, 0xe0
jb 0x14003ba8e
cmp r10b, 0xed
jne 0x14003badf
cmp r8, rax
je 0x14003bb10
lea r8, [r9 + 2]
cmp r8, rax
je 0x14003bb10
cmp byte [r9 + 1], 0x9f
ja 0x14003bb0c
add r9, 3
mov r8, r9
jmp 0x14003baa0
add r9, 2
cmp r8, rax
cmove r9, r8
xor r8d, r8d
cmp r9, rax
setne r8b
add r8, r9
cmp r10b, 0xf0
jb 0x14003baa0
xor r9d, r9d
cmp r8, rax
setne r9b
add r8, r9
jmp 0x14003baa0
mov byte [rsi + 0x18], 0
mov rax, qword [rsi]
sub rax, rbx
cmp rax, rdi
jb 0x14003bb42
add rcx, rbx
mov r8, rdi
call sub.msvcrt.dll_memcpy
add rbx, rdi
mov qword [rsi + 0x10], rbx
movaps xmm6, xmmword [rbp - 0x10]
add rsp, 0x48
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov qword [rsp + 0x20], 1
mov r9d, 1
mov rcx, rsi
mov r14, rdx
mov rdx, rbx
mov r8, rdi
call fcn.14001c9a0
mov rdx, r14
mov rcx, qword [rsi + 8]
mov rbx, qword [rsi + 0x10]
jmp 0x14003bb1b
mov qword [rsp + 0x20], 1
mov r9d, 1
mov rcx, rsi
mov r13, rdx
mov rdx, rbx
call fcn.14001c9a0
mov rdx, r13
mov rax, qword [rsi]
mov rbx, qword [rsi + 0x10]
mov rcx, rax
sub rcx, rbx
jmp 0x14003ba00
mov qword [rsp + 0x20], 1
mov r8d, 4
mov r9d, 1
mov rcx, rsi
mov r14, rdx
mov rdx, rbx
call fcn.14001c9a0
mov rdx, r14
mov rax, qword [rsi]
mov rbx, qword [rsi + 0x10]
jmp 0x14003ba5e
Function at 0x14003e350
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
push rsi
push rdi
push rbx
sub rsp, 0x28
lea rbp, [rsp + 0x20]
mov esi, dword [0x140056098]
test esi, esi
je 0x14003e3f6
dec esi
mov ecx, esi
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
ja 0x14003e3ed
je 0x14003e3eb
movzx eax, byte [0x1400670e8]
mov ecx, 0x10
call fcn.14004a330
test rax, rax
je 0x14003e417
mov qword [rax], 0
mov dword [rax + 8], esi
mov ecx, esi
mov rbx, rax
call sub.kernel32.dll_TlsGetValue
mov rdi, rax
mov ecx, esi
mov rsi, rbx
mov rdx, rbx
call sub.kernel32.dll_TlsSetValue
test rdi, rdi
je 0x14003e3e6
mov rax, qword [rdi]
test rax, rax
je 0x14003e3d5
lock dec qword [rax]
jne 0x14003e3d5
mov rcx, qword [rdi]
call fcn.14003e430
mov rcx, qword [0x1400670d0]
xor edx, edx
mov r8, rdi
call fcn.14005452c
mov rax, rsi
jmp 0x14003e3ed
xor eax, eax
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop rbp
ret
lea rcx, [0x140056080]
call fcn.140018c10
mov esi, eax
mov ecx, esi
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
jbe 0x14003e37a
jmp 0x14003e3ed
mov ecx, 8
mov edx, 0x10
call fcn.140004690
int3
Function at 0x1400460b0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbp
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x68
lea rbp, [rsp + 0x60]
mov rsi, rcx
movabs r15, 0x8000000000000000
lea rcx, [rbp - 0x28]
call fcn.140039e00
mov rax, qword [rbp - 0x28]
mov r14, qword [rbp - 0x20]
mov rcx, rax
neg rcx
jo 0x140046111
mov rcx, qword [rbp - 0x18]
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x38], r14
mov qword [rbp - 0x30], rcx
lea rcx, [rbp - 0x10]
lea rdx, [rbp - 0x40]
call fcn.140045fc0
mov rdi, qword [rbp - 0x10]
mov r14, qword [rbp - 8]
cmp rdi, r15
jne 0x140046179
mov eax, r14d
and eax, 3
cmp eax, 1
jne 0x140046169
lea rdi, [r14 - 1]
mov rbx, qword [r14 - 1]
mov r14, qword [r14 + 7]
mov rax, qword [r14]
test rax, rax
je 0x140046135
mov rcx, rbx
call rax
cmp qword [r14 + 8], 0
je 0x140046158
cmp qword [r14 + 0x10], 0x11
jb 0x140046147
mov rbx, qword [rbx - 8]
mov rcx, qword [0x1400670d0]
xor edx, edx
mov r8, rbx
call fcn.14005452c
mov rcx, qword [0x1400670d0]
xor edx, edx
mov r8, rdi
call fcn.14005452c
mov qword [rsi], r15
add rsp, 0x68
pop rbx
pop rdi
pop rsi
pop r14
pop r15
pop rbp
ret
mov rbx, qword [rbp]
mov rcx, r14
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x140046197
mov qword [rsi], rdi
mov qword [rsi + 8], r14
mov qword [rsi + 0x10], rbx
jmp 0x14004616c
mov qword [rsi], r15
test rdi, rdi
je 0x14004616c
mov rcx, qword [0x1400670d0]
xor edx, edx
mov r8, r14
add rsp, 0x68
pop rbx
pop rdi
pop rsi
pop r14
pop r15
pop rbp
jmp fcn.14005452c
Function at 0x140048440
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
mov eax, 0x1078
call fcn.140054390
sub rsp, rax
lea rbp, [rsp + 0x80]
movaps xmmword [rbp + 0xfe0], xmm6
mov rsi, rdx
mov rdi, rcx
lea rcx, [rbp - 0x50]
mov r8d, 0x1000
xor edx, edx
call sub.msvcrt.dll_memset
xorps xmm6, xmm6
lea r13, [rbp + 0xfd4]
lea rbx, [0x14003f0a0]
lea r14, [rbp + 0xfb0]
mov dword [rbp + 0xfd4], 0
movaps xmmword [rbp + 0xfb0], xmm6
mov qword [rbp + 0xfc0], 0
mov qword [rbp + 0xfc8], r13
mov qword [rsp + 0x20], rbx
mov rcx, rdi
lea rdx, [rbp - 0x50]
mov r8d, 0x1000
mov r9, r14
call sub.kernel32.dll_ReadFileEx
test eax, eax
je 0x140048520
nop dword [rax + rax]
mov ecx, 0xffffffff
mov edx, 1
call sub.kernel32.dll_SleepEx
cmp dword [rbp + 0xfd4], 1
jne 0x1400484e0
mov eax, dword [rbp + 0xfd8]
mov r15d, dword [rbp + 0xfdc]
mov rcx, rax
shl rcx, 0x20
or rcx, 2
test eax, eax
cmovne r15, rcx
jne 0x140048533
jmp 0x140048576
call sub.kernel32.dll_GetLastError
mov r15d, eax
shl r15, 0x20
or r15, 2
mov rcx, r15
mov eax, ecx
and eax, 3
shr rcx, 0x20
cmp eax, 2
jne 0x140048560
call fcn.140019d10
cmp al, 0xb
mov eax, 0
cmove r15, rax
je 0x140048576
jmp 0x140048644
cmp rcx, 0xb
mov eax, 0
cmove r15, rax
cmp ecx, 0xb
jne 0x140048644
test r15, r15
je 0x140048619
cmp r15, 0x1000
ja 0x1400486b8
xor r12d, r12d
nop
cmp r15, r12
jb 0x1400486a4
mov r8d, r15d
sub r8d, r12d
lea rdx, [r12 + rbp]
add rdx, 0xffffffffffffffb0
mov dword [rbp + 0xfd4], 0
movaps xmmword [rbp + 0xfb0], xmm6
mov qword [rbp + 0xfc0], 0
mov qword [rbp + 0xfc8], r13
mov qword [rsp + 0x20], rbx
mov rcx, rsi
mov r9, r14
call sub.kernel32.dll_WriteFileEx
test eax, eax
je 0x140048614
nop
mov ecx, 0xffffffff
mov edx, 1
call sub.kernel32.dll_SleepEx
cmp dword [rbp + 0xfd4], 1
jne 0x1400485e0
cmp dword [rbp + 0xfd8], 0
jne 0x140048619
mov eax, dword [rbp + 0xfdc]
add r12, rax
cmp r12, r15
jne 0x140048590
jmp 0x140048497
call sub.kernel32.dll_GetLastError
mov rcx, rdi
call sub.kernel32.dll_CloseHandle
mov rcx, rsi
call sub.kernel32.dll_CloseHandle
movaps xmm6, xmmword [rbp + 0xfe0]
add rsp, 0x1078
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov eax, r15d
and eax, 3
cmp eax, 1
jne 0x140048619
lea rbx, [r15 - 1]
mov r14, qword [r15 - 1]
mov r12, qword [r15 + 7]
mov rax, qword [r12]
test rax, rax
je 0x140048669
mov rcx, r14
call rax
cmp qword [r12 + 8], 0
je 0x14004868e
cmp qword [r12 + 0x10], 0x11
jb 0x14004867d
mov r14, qword [r14 - 8]
mov rcx, qword [0x1400670d0]
xor edx, edx
mov r8, r14
call fcn.14005452c
mov rcx, qword [0x1400670d0]
xor edx, edx
mov r8, rbx
call fcn.14005452c
jmp 0x140048619
lea r8, str.std_src_syspalwindowspipe.rs
mov rcx, r12
mov rdx, r15
call fcn.140006bc0
jmp 0x1400486cc
lea r8, str.std_src_syspalwindowspipe.rs
mov edx, 0x1000
mov rcx, r15
call fcn.140005740
ud2
Function at 0x140055020
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.140055de0
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.140055de0
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x140055090
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140067194]
mov rbx, rcx
test esi, esi
jle 0x1400551c0
mov rax, qword [0x140067198]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400550db
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140055165
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x1400550c0
mov rcx, rbx
call fcn.140055b00
mov rdi, rax
test rax, rax
je 0x1400551e2
mov rax, qword [0x140067198]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140055c40
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140067198]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1400551c7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x14005515e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140055170
add dword [0x140067194], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x140067198]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14005515e
call qword [sym.imp.kernel32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140055020
nop dword [rax]
xor esi, esi
jmp 0x1400550e8
mov rax, qword [0x140067198]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140055020
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140055020
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140055770
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140067200]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400671e0]
test rbx, rbx
je 0x1400557cc
mov rbp, qword [sym.imp.kernel32.dll_TlsGetValue]
mov rdi, qword [sym.imp.kernel32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test rsi, rsi
je 0x1400557c3
test eax, eax
jne 0x1400557c3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400557a8
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x140055b00
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x14005f640]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140055b20
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140055b28
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140055b20
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x140055b7d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x140055b74
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140055b20
add rax, 0x28
cmp rax, r9
jne 0x140055b60
xor eax, eax
ret

Function at 0x140055b80
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14005f640]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x140055b9f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140055ba8
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x140055b9f
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x140055c40
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14005f640]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x140055c5f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140055c68
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x140001000
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Terminate process

Disassembly:
sub rsp, 0x448
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x430], rax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, 0x927c0
jae 0x140001032
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
lea rdx, [rsp + 0x30]
mov ecx, 7
lea rax, [0x140002250]
nop dword [rax]
nop word [rax + rax]
lea rdx, [rdx + 0x80]
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
lea rax, [rax + 0x80]
movups xmmword [rdx - 0x80], xmm0
movups xmm0, xmmword [rax - 0x60]
movups xmmword [rdx - 0x70], xmm1
movups xmm1, xmmword [rax - 0x50]
movups xmmword [rdx - 0x60], xmm0
movups xmm0, xmmword [rax - 0x40]
movups xmmword [rdx - 0x50], xmm1
movups xmm1, xmmword [rax - 0x30]
movups xmmword [rdx - 0x40], xmm0
movups xmm0, xmmword [rax - 0x20]
movups xmmword [rdx - 0x30], xmm1
movups xmm1, xmmword [rax - 0x10]
movups xmmword [rdx - 0x20], xmm0
movups xmmword [rdx - 0x10], xmm1
sub rcx, 1
jne 0x140001050
mov rcx, qword [rax + 0x70]
lea r9, [rsp + 0x20]
movups xmm0, xmmword [rax]
mov r8d, 0x40
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rdx], xmm0
movups xmm0, xmmword [rax + 0x20]
movups xmmword [rdx + 0x10], xmm1
movups xmm1, xmmword [rax + 0x30]
movups xmmword [rdx + 0x20], xmm0
movups xmm0, xmmword [rax + 0x40]
movups xmmword [rdx + 0x30], xmm1
movups xmm1, xmmword [rax + 0x50]
movups xmmword [rdx + 0x40], xmm0
movups xmm0, xmmword [rax + 0x60]
movups xmmword [rdx + 0x50], xmm1
movups xmmword [rdx + 0x60], xmm0
mov qword [rdx + 0x70], rcx
movzx ecx, byte [rax + 0x78]
mov byte [rdx + 0x78], cl
mov edx, 0x3f9
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
lea rax, [rsp + 0x30]
call rax
xor eax, eax
mov rcx, qword [rsp + 0x430]
xor rcx, rsp
call fcn.140001140
add rsp, 0x448
ret

Function at 0x140001a08
Capabilities:
Parse pe header

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

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov rbx, r8
mov r14, rdx
mov rdi, rcx
je 0x1400033b7
mov rbx, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x40]
mov qword [rsp + 0x30], rbp
mov qword [rsp + 0x38], rsi
mov rsi, rbx
mov r9, qword [rax]
test r9, r9
je 0x1400033d8
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x1400033da
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x14000343b
test ecx, ecx
jle 0x140003413
cmp rbx, rbp
mov rcx, r9
cmovl rbp, rbx
mov r8, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rdi + 0x58]
sub rbx, rbp
add r14, rbp
sub dword [rax], ebp
mov rcx, qword [rdi + 0x40]
movsxd rax, ebp
add qword [rcx], rax
test rbx, rbx
jle 0x14000343b
cmp qword [rdi + 0x80], 0
je 0x14000343b
lfence
mov r9, qword [rdi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
sub rbx, rax
mov rbp, qword [rsp + 0x30]
sub rsi, rbx
mov rbx, qword [rsp + 0x40]
mov rax, rsi
mov rsi, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret