joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1411ea0b0
Capabilities:
Decompress data using aplib

Disassembly:
call 0x1411ea237
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x1411ea0e1
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1411ea0c7
add dl, dl
jne 0x1411ea0ee
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1411ea14e
xor eax, eax
add dl, dl
jne 0x1411ea0fd
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1411ea205
add dl, dl
jne 0x1411ea10e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1411ea11b
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1411ea128
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1411ea135
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1411ea142
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x1411ea0d6
mov eax, 1
add dl, dl
jne 0x1411ea15e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1411ea16b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1411ea153
sub eax, ebx
mov ebx, 1
jne 0x1411ea1a4
mov ecx, 1
add dl, dl
jne 0x1411ea186
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1411ea193
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1411ea17b
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1411ea0d6
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1411ea1c0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1411ea1cd
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1411ea1b5
cmp eax, 0x7d00
jae 0x1411ea1f3
cmp eax, 0x500
jb 0x1411ea1ee
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1411ea0d6
cmp eax, 0x7f
ja 0x1411ea1f6
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1411ea0d6
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1411ea22a
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x1411ea0d6
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x1400015f0
Capabilities:
Encode data using xor

Disassembly:
xor eax, eax
movabs r8, 0x55c91b1795f78f4d
mov rdx, rcx
nop
mov rcx, rax
mov r9, r8
and ecx, 7
shl rcx, 3
shr r9, cl
xor byte [rdx + rax], r9b
add rax, 1
cmp rax, 0x13
jne 0x140001600
mov byte [rdx + 0x13], 0
ret

Function at 0x140001630
Capabilities:
Encode data using xor

Disassembly:
xor eax, eax
movabs r8, 0x55c91b1795f78f4d
mov rdx, rcx
nop
mov rcx, rax
mov r9, r8
and ecx, 7
shl rcx, 3
shr r9, cl
xor byte [rdx + rax], r9b
add rax, 1
cmp rax, 0x12
jne 0x140001640
mov byte [rdx + 0x12], 0
ret

Function at 0x140001670
Capabilities:
Encode data using xor

Disassembly:
xor eax, eax
movabs r8, 0x55c91b1795f78f4d
mov rdx, rcx
nop
mov rcx, rax
mov r9, r8
and ecx, 7
shl rcx, 3
shr r9, cl
xor byte [rdx + rax], r9b
add rax, 1
cmp rax, 0x16
jne 0x140001680
mov byte [rdx + 0x16], 0
ret

Function at 0x1400016f0
Capabilities:
Encode data using xor

Disassembly:
xor eax, eax
movabs r8, 0x55c91b1795f78f4d
mov rdx, rcx
nop
mov rcx, rax
mov r9, r8
and ecx, 7
shl rcx, 3
shr r9, cl
xor byte [rdx + rax], r9b
add rax, 1
cmp rax, 0x15
jne 0x140001700
mov byte [rdx + 0x15], 0
ret

Function at 0x140001730
Capabilities:
Encode data using xor

Disassembly:
xor eax, eax
movabs r8, 0x55c91b1795f78f4d
mov rdx, rcx
nop
mov rcx, rax
mov r9, r8
and ecx, 7
shl rcx, 3
shr r9, cl
xor byte [rdx + rax], r9b
add rax, 1
cmp rax, 0x17
jne 0x140001740
mov byte [rdx + 0x17], 0
ret

Function at 0x140001790
Capabilities:
Encode data using xor

Disassembly:
xor eax, eax
movabs r8, 0x55c91b1795f78f4d
mov rdx, rcx
nop
mov rcx, rax
mov r9, r8
and ecx, 7
shl rcx, 3
shr r9, cl
xor byte [rdx + rax], r9b
add rax, 1
cmp rax, 0x14
jne 0x1400017a0
mov byte [rdx + 0x14], 0
ret

Function at 0x1400017f0
Capabilities:
Encode data using xor

Disassembly:
xor eax, eax
movabs r8, 0x530d433bc51ddfb3
mov rdx, rcx
nop
mov rcx, rax
mov r9, r8
and ecx, 7
shl rcx, 3
shr r9, cl
xor word [rdx + rax*2], r9w
add rax, 1
cmp rax, 0x23
jne 0x140001800
mov byte [rdx + 0x46], 0
ret
Function at 0x140003e00
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
movaps xmmword [rsp + 0x60], xmm6
movaps xmmword [rsp + 0x70], xmm7
mov ebp, edx
mov r14, rcx
test ebp, ebp
je 0x140003f25
lea rcx, [0x140011600]
xor ebx, ebx
movabs rsi, 0xdbaf4383c59f19cf
call fcn.1400098b0
lea rcx, [0x1400115e0]
mov r15, rax
call fcn.1400098b0
movdqa xmm7, xmmword [0x14038e480]
mov r12, rax
movdqa xmm6, xmmword [0x14038e490]
lea rax, [0x14000ed20]
mov qword [rsp + 0x28], rax
cmp byte [r15], 0
mov r13d, ebx
movaps xmmword [rsp + 0x30], xmm7
movzx edi, byte [r14 + rbx]
movaps xmmword [rsp + 0x40], xmm6
mov byte [rsp + 0x50], 0xcf
jne 0x140003ed8
mov rax, qword [rsp + 0x30]
mov byte [r12 + 0x21], 1
xor r8d, r8d
mov rdx, r12
mov rcx, qword [rsp + 0x28]
mov qword [r12], rax
mov rax, qword [rsp + 0x38]
mov qword [r12 + 8], rax
mov rax, qword [rsp + 0x40]
mov qword [r12 + 0x10], rax
mov rax, qword [rsp + 0x48]
mov qword [r12 + 0x18], rax
mov eax, 0xffffffcf
mov byte [r12 + 0x20], al
mov byte [r15], 1
call fcn.140008ff0
cmp byte [r12 + 0x21], 0
je 0x140003f0c
xor eax, eax
nop word [rax + rax]
mov rcx, rax
mov rdx, rsi
and ecx, 7
shl rcx, 3
shr rdx, cl
xor byte [r12 + rax], dl
add rax, 1
cmp rax, 0x21
jne 0x140003ee8
mov byte [r12 + 0x21], 0
and r13d, 0x1f
xor dil, byte [r12 + r13]
mov byte [r14 + rbx], dil
add rbx, 1
cmp rbp, rbx
jne 0x140003e70
movaps xmm6, xmmword [rsp + 0x60]
movaps xmm7, xmmword [rsp + 0x70]
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x140007c20
Capabilities:
Parse pe header

Disassembly:
push rbx
sub rsp, 0x40
mov qword [rsp + 0x58], rdx
xor edx, edx
test rcx, rcx
mov rbx, r8
je 0x140007c54
cmp word [rcx], 0x5a4d
jne 0x140007c54
movsxd rax, dword [rcx + 0x3c]
cmp eax, 0x400
jg 0x140007c54
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140007c54
mov edx, dword [rcx + 0x28]
add rdx, qword [rsp + 0x58]
mov rcx, rbx
call fcn.140007b60
test eax, eax
jne 0x140007c70
xor eax, eax
add rsp, 0x40
pop rbx
ret
mov rcx, rbx
call fcn.140007bd0
test rax, rax
je 0x140007c65
mov rcx, qword [rbx]
lea rdx, [rax + 0x10]
mov r9d, 8
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x58]
call fcn.1400081f6
not eax
shr eax, 0x1f
add rsp, 0x40
pop rbx
ret
Function at 0x140007e90
Capabilities:
Access peb ldr_data
Encode data using xor
Get ntdll base address
Populate syswhispers2 syscall list
Resolve function by parsing pe exports

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
mov r10d, dword [0x14038c680]
test r10d, r10d
jne 0x14000806e
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov rcx, qword [rax + 0x10]
mov rax, qword [rcx + 0x30]
test rax, rax
je 0x14000807e
xor r9d, r9d
nop dword [rax + rax]
mov rdx, rax
movsxd rax, dword [rax + 0x3c]
mov eax, dword [rdx + rax + 0x88]
test eax, eax
je 0x140007f0f
lea r9, [rdx + rax]
mov eax, dword [r9 + 0xc]
add rax, rdx
mov r8d, dword [rax]
or r8d, 0x20202020
cmp r8d, 0x6c64746e
jne 0x140007f0f
mov eax, dword [rax + 4]
or eax, 0x20202020
cmp eax, 0x6c642e6c
je 0x140007f24
mov rcx, qword [rcx]
mov rax, qword [rcx + 0x30]
test rax, rax
jne 0x140007ed0
test r9, r9
je 0x14000807e
mov eax, dword [r9 + 0x18]
lea r13, [0x14038c684]
xor r11d, r11d
mov edi, dword [r9 + 0x24]
mov r12d, dword [r9 + 0x1c]
lea ecx, [rax - 1]
mov eax, dword [r9 + 0x20]
add rdi, rdx
lea rbx, [rdi + rcx*2]
add r12, rdx
add rax, rdx
lea rsi, [rax + rcx*4]
jmp 0x140007f6c
lea rax, [rbx - 2]
sub rsi, 4
cmp rdi, rbx
je 0x140007ff0
mov rbx, rax
mov eax, dword [rsi]
add rax, rdx
cmp word [rax], 0x775a
jne 0x140007f58
cmp byte [rax], 0
mov ecx, r11d
lea rbp, [r13 + rcx*8]
je 0x14000808b
cmp byte [rax + 1], 0
mov r8d, 0x806810c6
mov ecx, 1
mov r9d, 1
je 0x140007fbe
movzx ecx, word [rax + rcx]
mov r14d, r8d
add r9d, 1
ror r14d, 8
add ecx, r14d
xor r8d, ecx
mov ecx, r9d
cmp byte [rax + rcx], 0
jne 0x140007fa0
movzx eax, word [rbx]
mov dword [rbp], r8d
add r11d, 1
cmp r11d, 0x1f4
mov eax, dword [r12 + rax*4]
mov dword [rbp + 4], eax
jne 0x140007f58
mov dword [0x14038c680], 0x1f4
mov r9d, 0x1f3
jmp 0x140008001
lea r9d, [r11 - 1]
cmp r11d, 1
mov dword [0x14038c680], r11d
je 0x14000806e
lea esi, [r11 - 2]
lea rbx, [0x14038c68c]
nop dword [rax]
mov eax, r11d
sub eax, r10d
cmp eax, 1
je 0x140008065
lea rax, [0x14038c684]
mov edx, esi
sub edx, r10d
lea r8, [rbx + rdx*8]
nop dword [rax + rax]
mov edx, dword [rax + 4]
mov ecx, dword [rax + 0xc]
cmp ecx, edx
jae 0x14000805c
movd xmm0, dword [rax]
movd xmm2, edx
movd xmm3, ecx
movd xmm1, dword [rax + 8]
punpckldq xmm0, xmm2
movq qword [rax + 8], xmm0
punpckldq xmm1, xmm3
movq qword [rax], xmm1
add rax, 8
cmp r8, rax
jne 0x140008030
add r10d, 1
cmp r10d, r9d
jb 0x140008010
mov eax, 1
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
xor eax, eax
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov r8d, 0x5f37bfdf
jmp 0x140007fbe

Function at 0x140008100
Capabilities:
Execute syscall

Disassembly:
pop rax
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x28
mov rcx, r10
call fcn.1400080a0
add rsp, 0x28
mov rcx, qword [rsp + 8]
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x18]
mov r9, qword [rsp + 0x20]
mov r10, rcx
syscall
ret
Function at 0x140008550
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
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.14000e650
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.14000e650
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 0x1400085c0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1403920a4]
test esi, esi
mov rdi, rcx
mov rbp, rdx
mov rbx, r8
jle 0x140008750
mov rax, qword [0x1403920a8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rdi, rdx
jb 0x14000860c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rdi, rdx
jb 0x140008695
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x1400085f0
mov rcx, rdi
call fcn.140009460
test rax, rax
mov r12, rax
je 0x1400087a2
mov rax, qword [0x1403920a8]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call fcn.1400095a0
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x1403920a8]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140008785
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000868e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140008700
add dword [0x1403920a4], 1
cmp ebx, 8
jae 0x1400086c1
test bl, 4
jne 0x140008760
test ebx, ebx
je 0x1400086b6
movzx eax, byte [rbp]
test bl, 2
mov byte [rdi], al
jne 0x140008774
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, ebx
sub ebx, 1
mov rdx, qword [rbp + rax - 8]
cmp ebx, 8
mov qword [rdi + rax - 8], rdx
jb 0x1400086b6
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, ebx
mov qword [rdi + rdx], rcx
jb 0x1400086da
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp eax, 2
mov r8d, 4
mov eax, 0x40
mov rcx, qword [rsp + 0x20]
cmovne r8d, eax
mov rdx, qword [rsp + 0x38]
add rsi, qword [0x1403920a8]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000868e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140008550
xor esi, esi
jmp 0x140008617
mov eax, dword [rbp]
mov ebx, ebx
mov dword [rdi], eax
mov eax, dword [rbp + rbx - 4]
mov dword [rdi + rbx - 4], eax
jmp 0x1400086b6
mov ebx, ebx
movzx eax, word [rbp + rbx - 2]
mov word [rdi + rbx - 2], ax
jmp 0x1400086b6
mov rax, qword [0x1403920a8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call fcn.140008550
lea rcx, str.Address__p_has_no_image_section
mov rdx, rdi
call fcn.140008550
nop
nop dword [rax]
nop word cs:[rax + rax]
Function at 0x140008d70
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x140392100]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1403920e0]
test rbx, rbx
je 0x140008dc4
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x140008dbb
test rsi, rsi
je 0x140008dbb
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140008da0
lea rcx, [0x140392100]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x140008ff0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
jmp 0x140009290
push rdi
push rsi
push rbx
sub rsp, 0x20
mov eax, dword [0x140392148]
test eax, eax
mov rdi, rcx
mov rsi, rdx
je 0x140009320
test r8, r8
je 0x1400092d1
lea rax, [0x140392c30]
cmp r8, rax
je 0x1400092d1
lea rdx, str..._.._src_mingw_w64_mingw_w64_crt_crt_tls_atexit.c
mov r8d, 0x46
lea rcx, str._dso__dso____dso_handle
call sub.msvcrt.dll__assert
mov edx, 0x18
mov ecx, 1
call sub.msvcrt.dll_calloc
test rax, rax
mov rbx, rax
je 0x140009320
mov qword [rax], rdi
mov ecx, dword [0x14038d680]
mov qword [rax + 8], rsi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [0x14038d680]
mov rdx, rbx
mov qword [rbx + 0x10], rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

Function at 0x140009290
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
jmp 0x140009290
push rdi
push rsi
push rbx
sub rsp, 0x20
mov eax, dword [0x140392148]
test eax, eax
mov rdi, rcx
mov rsi, rdx
je 0x140009320
test r8, r8
je 0x1400092d1
lea rax, [0x140392c30]
cmp r8, rax
je 0x1400092d1
lea rdx, str..._.._src_mingw_w64_mingw_w64_crt_crt_tls_atexit.c
mov r8d, 0x46
lea rcx, str._dso__dso____dso_handle
call sub.msvcrt.dll__assert
mov edx, 0x18
mov ecx, 1
call sub.msvcrt.dll_calloc
test rax, rax
mov rbx, rax
je 0x140009320
mov qword [rax], rdi
mov ecx, dword [0x14038d680]
mov qword [rax + 8], rsi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [0x14038d680]
mov rdx, rbx
mov qword [rbx + 0x10], rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
Function at 0x140009460
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x14038f000]
xor edx, edx
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x1400094cf
mov rcx, r9
call fcn.140009330
test eax, eax
je 0x1400094cf
movsxd rax, dword [r9 + 0x3c]
mov rcx, r8
sub rcx, r9
add r9, rax
movzx eax, word [r9 + 0x14]
lea rdx, [r9 + rax + 0x18]
movzx eax, word [r9 + 6]
test eax, eax
je 0x1400094cd
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
mov r8d, dword [rdx + 0xc]
cmp rcx, r8
mov rax, r8
jb 0x1400094c4
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x1400094cf
add rdx, 0x28
cmp rdx, r9
jne 0x1400094b0
xor edx, edx
mov rax, rdx
add rsp, 0x28
ret

Function at 0x140009850
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
xor r9d, r9d
xor edx, edx
xor ecx, ecx
mov dword [0x1403921e0], 0xffffffff
mov r8d, 0xffff
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov qword [0x1403921e8], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x1400098a0
lea rdx, [0x140009760]
mov ecx, eax
mov dword [0x1403921d8], eax
call fcn.14000ec10
test eax, eax
jne 0x1400098a8
add rsp, 0x28
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140009897
call sub.msvcrt.dll_abort
nop
nop
Function at 0x1400098b0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rsi, qword [0x14038efa0]
mov r11d, dword [rsi]
mov rbx, rcx
test r11d, r11d
jne 0x1400098e8
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x140009950
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov r12, qword [rcx + 0x10]
test r12, r12
je 0x140009960
mov esi, dword [0x1403921d8]
mov r13, qword [sym.imp.KERNEL32.dll_GetLastError]
call r13
mov edi, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, edi
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rsi, rsi
je 0x1400099d0
mov rbp, qword [rsi]
cmp rbp, r12
jb 0x140009a18
sub r12, 1
mov rax, qword [rsi + r12*8 + 8]
test rax, rax
jne 0x1400098d7
mov rcx, rbx
call fcn.1400097b0
mov qword [rsi + r12*8 + 8], rax
jmp 0x1400098d7
call fcn.1400097b0
mov qword [rbx + 0x10], rax
jmp 0x1400098d7
mov r10d, dword [rsi]
test r10d, r10d
je 0x140009a7a
mov r9d, dword [0x14038d690]
test r9d, r9d
je 0x140009aa8
lock add dword [0x1403921e0], 1
jne 0x140009adc
mov r12, qword [rbx + 0x10]
test r12, r12
je 0x140009a87
mov eax, dword [rsi]
test eax, eax
je 0x1400098f1
lock sub dword [0x1403921e0], 1
js 0x1400098f1
mov rcx, qword [0x1403921e8]
xor r8d, r8d
mov edx, 1
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
jmp 0x1400098f1
lea rcx, [r12 + 0x21]
mov edx, 8
call sub.msvcrt.dll_calloc
lea rdi, [r12 + 0x20]
test rax, rax
mov rsi, rax
je 0x140009b03
mov qword [rax], rdi
mov ecx, dword [0x1403921d8]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x14000992b
call r13
jmp 0x14000992b
lea rdi, [rbp + rbp]
mov rcx, rsi
lea rax, [r12 + 0x20]
cmp rdi, r12
cmovb rdi, rax
lea rdx, [rdi*8 + 8]
call sub.msvcrt.dll_realloc
test rax, rax
mov rsi, rax
je 0x140009b03
mov qword [rax], rdi
lea rcx, [rax + rbp*8 + 8]
sub rdi, rbp
xor edx, edx
lea r8, [rdi*8]
call sub.msvcrt.dll_memset
jmp 0x1400099f3
call fcn.140009850
mov dword [0x14038d690], 1
mov edx, dword [rsi]
test edx, edx
jne 0x14000997c
mov r12, qword [rbx + 0x10]
test r12, r12
jne 0x1400098f1
mov rax, qword [0x1403921d0]
lea r12, [rax + 1]
mov qword [0x1403921d0], r12
mov qword [rbx + 0x10], r12
jmp 0x140009997
lock add dword [0x14038d694], 1
je 0x140009a61
mov r8d, dword [0x14038d690]
lea rdi, [0x14038d690]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
test r8d, r8d
jne 0x140009a70
nop dword [rax]
xor ecx, ecx
call rbp
mov ecx, dword [rdi]
test ecx, ecx
je 0x140009ad0
jmp 0x140009a70
mov rcx, qword [0x1403921e8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x14000998a
lock sub dword [0x1403921e0], 1
jmp 0x14000998a
call sub.msvcrt.dll_abort
nop
nop dword [rax]
cmp qword [rcx], rdx
jae 0x140009b20
mov qword [rcx], rdx
mov qword [rcx + 0x18], 0
cmp qword [rcx + 8], r8
jae 0x140009b2a
mov qword [rcx + 8], r8
test r9, r9
je 0x140009b34
cmp qword [rcx], rdx
je 0x140009b38
ret
mov qword [rcx + 0x18], r9
ret
Function at 0x140025d30
Capabilities:
Encode data using xor

Disassembly:
test r8d, r8d
je 0x140025e1f
xchg rbx, r11
mov qword [rsp + 0x10], r11
xchg rbx, r11
mov qword [rsp + 0x18], rbp
push rsi
sub rsp, 0x20
mov qword [rsp + 0x30], rdi
xchg rdi, rdx
mov rbx, rdi
xchg rdx, rdi
xchg r8, rdi
mov r8, rcx
xchg r8, rdi
mov esi, r8d
sub rdi, rdx
mov rbp, rcx
sub rdi, 0x63345812
add rdi, 0x63345902
dec rsi
shr rsi, 2
shr rsi, 1
shr rsi, 1
inc rsi
nop dword [rax]
movups xmm0, xmmword [rbx]
xchg r12, rbp
mov rdx, r12
xchg r12, rbp
xchg r14, rcx
mov r14, rbx
xchg r14, rcx
call fcn.140026340
mov ecx, 0x10
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rdi + rbx]
xor byte [rbx], al
inc rbx
sub rcx, 1
jne 0x140025dbb
add rdi, 0xfffffffffffffff0
xchg r11, rbp
movups xmmword [r11 + 0xf0], xmm0
xchg r11, rbp
sub rsi, 1
jne 0x140025d8f
xchg rdi, rbp
mov rbp, qword [rsp + 0x30]
xchg rdi, rbp
xchg rsi, rbx
mov rsi, qword [rsp + 0x38]
xchg rbx, rsi
xchg rbp, r15
mov r15, qword [rsp + 0x40]
xchg rbp, r15
add rsp, 0x20
push rax
push rax
push rax
push rax
push rbx
push rdx
push rax
xchg qword [rsp + 0x38], rsi
add rsp, 0x40
ret

Function at 0x140025e20
Capabilities:
Encode data using xor

Disassembly:
xchg r15, rbx
mov qword [rsp + 8], r15
xchg r15, rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
nop
mov qword [rsp - 8], rdi
sub rsp, 8
sub rsp, 0x20
mov edi, r8d
xchg rdi, rdx
mov rbx, rdi
xchg rdi, rdx
lea r9, [rcx + 0xf0]
xchg rsi, r14
mov r14, rcx
xchg r14, rsi
test r8d, r8d
je 0x140025edf
dec rdi
shr rdi, 3
shr rdi, 1
inc rdi
nop dword [rax]
nop word [rax + rax]
xchg rbx, rax
mov rbx, rax
xchg rbx, rax
sub r9, rbx
mov edx, 0x10
nop dword [rax + rax]
movzx ecx, byte [r9 + rax]
xor byte [rax], cl
lea rax, [rax + 1]
sub rdx, 1
jne 0x140025e96
xchg r11, rsi
mov rdx, r11
xchg rsi, r11
xchg rbx, rcx
mov rbx, rcx
xchg rcx, rbx
call fcn.140025f80
xchg rbx, r9
mov rbx, r9
xchg r9, rbx
neg rbx
add rbx, 0xfffffffffffffff0
neg rbx
sub rdi, 1
jne 0x140025e82
xchg rsi, r9
movups xmm0, xmmword [rsi]
xchg r9, rsi
xchg rbx, r9
mov r9, qword [rsp + 0x30]
xchg r9, rbx
xchg r9, rbp
mov r9, qword [rsp + 0x38]
xchg rbp, r9
xchg r9, rsi
movups xmmword [r9 + 0xf0], xmm0
xchg r9, rsi
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
nop
xchg qword [rsp], rdi
add rsp, 8
ret