joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140005518
Capabilities:
Parse pe header

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r14
push r15
sub rsp, 0x20
mov esi, r8d
mov ebx, edx
mov r14d, ecx
test r8d, r8d
jne 0x1400052ec
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400052ec
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400052ec
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400052ec
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400052ec
cmp dword [rcx + 0x84], 0xe
jbe 0x1400052ec
cmp dword [rcx + 0xf8], esi
je 0x1400052ec
mov ecx, r14d
call fcn.140005434
mov ecx, 2
call fcn.140009578
nop
cmp byte [0x14001c1a8], 0
jne 0x1400053b6
mov r15d, 1
mov eax, r15d
xchg dword [0x14001c19c], eax
test ebx, ebx
jne 0x14000535f
mov rdi, qword [section..data]
mov edx, edi
and edx, 0x3f
lea ecx, [rbx + 0x40]
sub ecx, edx
xor eax, eax
ror rax, cl
xor rax, rdi
mov rcx, qword [0x14001c1a0]
cmp rcx, rax
je 0x140005356
xor rdi, rcx
mov ecx, edx
ror rdi, cl
mov rcx, rdi
call qword [fcn.140002df4]
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call rdi
lea rcx, [0x14001c1b8]
jmp 0x14000536b
cmp ebx, r15d
jne 0x140005371
lea rcx, [0x14001c1d0]
call fcn.140005a28
nop
test ebx, ebx
jne 0x140005388
lea rdx, [0x140011368]
lea rcx, [0x140011348]
call fcn.1400051ac
lea rdx, [0x140011378]
lea rcx, [0x140011370]
call fcn.1400051ac
movzx eax, byte [0x14001c1a8]
test esi, esi
cmove eax, r15d
mov byte [0x14001c1a8], al
jmp 0x1400053b6
mov ecx, 2
call fcn.1400095cc
test esi, esi
jne 0x1400053cd
mov ecx, r14d
call fcn.1400053e8
int3
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x40]
mov r14, qword [rsp + 0x48]
add rsp, 0x20
pop r15
ret
xor r8d, r8d
xor edx, edx
jmp 0x14000527c
Function at 0x140004907
Capabilities:
Delete directory

Disassembly:
push rbp
push r15
xor rax, rax
push rax
push rax
sub rsp, 0x28
call fcn.1400123e0
mov r15, qword [0x14002048c]
cmp r15, 1
jne 0x1400049d6
push qword [0x14002057c]
pop rcx
call fcn.14000d5b4
mov r15, rax
and r15, r15
jle 0x14000496c
mov rcx, qword [0x14002057c]
call fcn.14000d5bc
mov rcx, qword [0x14002057c]
call fcn.14000d5d0
or rax, rax
je 0x14000496c
mov rbp, qword [0x140020584]
push qword [rbp + 0x10]
pop rcx
call fcn.14000da6c
jmp 0x140004949
push qword [0x14002056c]
pop rcx
call fcn.14000d5b4
mov qword [rsp + 0x28], rax
mov r15, qword [rsp + 0x28]
and r15, r15
jle 0x1400049d6
push 5
push 0
push 1
push qword [0x14002056c]
pop rcx
pop rdx
pop r8
pop r9
call fcn.140009070
mov rcx, qword [0x14002056c]
call fcn.14000d5bc
mov rcx, qword [0x14002056c]
call fcn.14000d5d0
or rax, rax
je 0x1400049d6
mov rbp, qword [0x140020574]
push qword [rbp + 0x14]
pop rcx
call sub.KERNEL32.dll_RemoveDirectoryW
jmp 0x1400049b3
mov rax, 1
jmp 0x1400049e2
add rsp, 0x38
pop r15
pop rbp
ret

Function at 0x140006a58
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x48
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x30], rcx
call sub.KERNEL32.dll_GetLastError
mov qword [rsp + 0x38], rax
mov rcx, qword [0x14001f190]
call sub.KERNEL32.dll_TlsGetValue
mov rcx, qword [rsp + 0x30]
mov qword [rax + 0x10], rcx
mov rcx, qword [rsp + 0x38]
call sub.KERNEL32.dll_SetLastError
mov rax, qword [rsp + 0x28]
add rsp, 0x48
ret

Function at 0x14000720c
Capabilities:
Terminate thread

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, rcx
call fcn.14000719c
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateThread]
lea rcx, [0x140021170]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400205b8]
jmp 0x140007248
cmp qword [rbx + 0x18], rdi
je 0x14000724f
mov rbx, qword [rbx]
test rbx, rbx
jne 0x14000723f
jmp 0x140007269
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rbx + 0x10]
lea rcx, [0x1400205b8]
call fcn.140011c68
lea rcx, [0x140021170]
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
adc al, 0xb3
cmp bh, al
adc dword [rdi + 0x52], esp
adc edi, dword [0x115bc0918]
je str._5_bW
invalid
invalid
sbb al, 0x8c
sub al, 0x7f
add eax, 0x2da0d341
test byte [rsi - 0x4640a8f8], bh
cmp al, 0x35
or byte [rdi - 0x41], dl
mov ecx, 0xc2f5d14a
scasb al, byte [rdi]
invalid
cmp al, 0x35
or byte [rdi - 0x41], dl
mov ecx, 0xc2f5d14a
scasb al, byte [rdi]
jge 0x14003f6a8
invalid
clc
clc
invalid
xor dl, byte [rdx + rax*4 - 0x74]
mov al, 0x47
mov ecx, 0x68cfe67c
sar dword [rax], 0x95
push rdx
invalid
call [rdi - 0x2c37dffb]
invalid
adc al, 0xeb
invalid
xchg esi, eax
or byte [0x1b3247249], ah
and eax, 0x73207b9c
invalid
jg 0x14003f67e
jb 0x14003f6be
mov esp, 0x9d16c421
sbb cl, byte [rax - 0x703a9d8e]
jb 0x14003f721
invalid
invalid
cmp dword [rax - 0x287c6586], eax
sbb al, 0x70
pop rdi
invalid
invalid
Function at 0x140001c11
Capabilities:
Encode data using xor

Disassembly:
xor eax, eax
mov r9b, byte [rdx + rax]
xor byte [rcx + rax], r9b
inc rax
cmp r8, rax
jne 0x140001c13
ret

Function at 0x140001d36
Capabilities:
Encode data using xor

Disassembly:
xor eax, eax
mov r8, qword [rdx + rax]
xor qword [rcx + rax], r8
add rax, 8
cmp rax, 0x40
jne 0x140001d38
ret
Function at 0x140008e70
Capabilities:
Encrypt data using aes via x86 extensions

Disassembly:
sub rsp, 0x118
mov r10, rcx
lea rcx, [rsp + 0x20]
call fcn.1400089ba
mov edx, eax
shl rdx, 4
movups xmm0, xmmword [rsp + rdx + 0x20]
xor edx, edx
movups xmmword [r10], xmm0
inc rdx
cmp edx, eax
jae 0x140008eb9
mov ecx, eax
sub ecx, edx
shl rcx, 4
aesimc xmm0, xmmword [rsp + rcx + 0x20]
mov rcx, rdx
shl rcx, 4
movups xmmword [r10 + rcx], xmm0
jmp 0x140008e95
movups xmm1, xmmword [rsp + 0x20]
mov edx, eax
shl edx, 4
movups xmmword [r10 + rdx], xmm1
add rsp, 0x118
ret

Function at 0x14000bea5
Capabilities:
Encode data using xor

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
xor edi, edi
mov ebp, 0x20
mov r10d, edx
mov edx, r8d
mov esi, ecx
mov ebx, r8d
call fcn.14000b21c
lea r11d, [rax - 1]
and r11d, esi
mov esi, 0x1f
mov r12d, ebp
mov edx, r11d
mov eax, r10d
sub r12d, esi
mov ecx, r12d
shl edx, cl
mov ecx, esi
shr eax, cl
mov ecx, ebx
or edx, eax
call fcn.14000b3e4
mov r8d, r11d
mov ecx, esi
sub edx, ebx
shr r8d, cl
xor eax, 1
mov ecx, r12d
or eax, r8d
shr edx, cl
mov ecx, esi
mov r8d, eax
xor edx, r11d
neg r8d
and edx, r8d
xor r11d, edx
mov edx, ebx
shl edx, cl
mov ecx, edx
mov edx, r10d
sub edx, ecx
mov ecx, esi
xor edx, r10d
shl eax, cl
and edx, r8d
or edi, eax
xor r10d, edx
dec esi
jne 0x14000bed2
mov edx, r10d
mov ecx, ebx
call fcn.14000b3e4
sub edx, ebx
xor eax, 1
xor edx, r10d
or eax, r11d
mov ecx, eax
or eax, edi
neg ecx
and edx, ecx
xor edx, r10d
mov dword [r9], edx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x14000f2c6
Capabilities:
Encode data using xor

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov r12, qword [rcx + 0x48]
mov rbx, rcx
mov ebp, edx
mov rdi, r8
mov rsi, r9
test r12, r12
je 0x14000f36c
mov edx, 0x10
lea rax, [rbx + r12]
sub rdx, r12
cmp rdx, r9
cmova rdx, r9
xor ecx, ecx
test ebp, ebp
je 0x14000f34f
inc rax
cmp rcx, rdx
je 0x14000f323
mov r9b, byte [rdi + rcx]
mov r8b, byte [rax + 0x37]
xor r8d, r9d
mov byte [rax + 0x37], r9b
mov byte [rdi + rcx], r8b
inc rcx
jmp 0x14000f303
add r12, rdx
cmp r12, 0xf
jbe 0x14000f3f7
mov rcx, qword [rbx]
add rdi, rdx
sub rsi, rdx
mov r9d, 0x10
lea rdx, [rbx + 0x18]
lea r8, [rbx + 0x38]
mov rax, qword [rcx]
call qword [rax + 0x30]
jmp 0x14000f36c
inc rax
cmp rcx, rdx
je 0x14000f323
mov r8b, byte [rax + 0x37]
xor r8b, byte [rdi + rcx]
mov byte [rdi + rcx], r8b
inc rcx
mov byte [rax + 0x37], r8b
jmp 0x14000f34f
mov rcx, qword [rbx]
mov r12, rsi
lea r13, [rbx + 8]
and rsi, 0xfffffffffffffff0
and r12d, 0xf
lea r8, [rbx + 0x18]
mov r9, rdi
mov rdx, r13
mov rax, qword [rcx]
mov qword [rsp + 0x20], rsi
test ebp, ebp
je 0x14000f399
call qword [rax + 0x20]
jmp 0x14000f39c
call qword [rax + 0x18]
test r12, r12
je 0x14000f3f7
mov rcx, qword [rbx]
xorps xmm0, xmm0
mov r9d, 0x10
lea r8, [rbx + 0x38]
movups xmmword [rbx + 0x38], xmm0
mov rdx, r13
add rsi, rdi
mov rax, qword [rcx]
call qword [rax + 0x28]
xor eax, eax
test ebp, ebp
je 0x14000f3e1
mov dl, byte [rbx + rax + 0x38]
mov cl, byte [rsi + rax]
xor edx, ecx
mov byte [rbx + rax + 0x38], cl
mov byte [rsi + rax], dl
inc rax
cmp r12, rax
jne 0x14000f3c7
jmp 0x14000f3f7
mov dl, byte [rbx + rax + 0x38]
xor dl, byte [rsi + rax]
mov byte [rsi + rax], dl
mov byte [rbx + rax + 0x38], dl
inc rax
cmp r12, rax
jne 0x14000f3e1
mov qword [rbx + 0x48], r12
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret

Function at 0x14000fd9f
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rbx, rcx
mov rcx, rdx
mov rsi, rdx
call sub.msvcrt.dll_strlen
mov rcx, rsi
mov r9, rbx
mov edx, 1
mov r8, rax
call sub.msvcrt.dll_fwrite
mov rcx, rbx
add rsp, 0x28
pop rbx
pop rsi
jmp fcn.14005f738
Function at 0x14001038f
Capabilities:
Encode data using xor

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x70
mov rsi, qword [rcx + 8]
lea rax, [rsi + 1]
mov qword [rcx + 8], rax
lea r12, [rsp + 0x63]
mov rbx, rcx
mov ebp, edx
mov rcx, r12
mov rdx, rsi
mov edi, r8d
mov qword [rsp + 0xb8], r9
rol di, 8
call fcn.14000dd8b
mov byte [rsp + 0x6b], bpl
mov eax, dword [rsp + 0xc0]
lea rcx, [rsp + 0x4f]
mov word [rsp + 0x6c], di
mov r8, qword [rsp + 0xb8]
xchg al, ah
mov word [rsp + 0x6e], ax
mov rax, qword [rbx + 0x30]
mov qword [rsp + 0x57], rax
mov eax, dword [rbx + 0x38]
mov dword [rsp + 0x5f], eax
lea rax, [rsp + 0x57]
mov rdx, rax
xor byte [rax + 0xb], sil
dec rax
shr rsi, 8
cmp rax, rcx
jne 0x140010406
mov eax, dword [rsp + 0xd0]
mov r9, qword [rsp + 0xc0]
lea rcx, [rbx + 0x10]
mov dword [rsp + 0x40], eax
mov rax, qword [rbx + 0x40]
mov qword [rsp + 0x28], 0xd
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0xc8]
mov qword [rsp + 0x20], r12
mov qword [rsp + 0x30], rax
call qword [rbx + 0x48]
nop
add rsp, 0x70
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x140014054
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov qword [rsp + 0x28], rdx
mov rsi, rcx
mov ecx, 2
call qword [fcn.14005f160]
mov r8, qword [rsp + 0x28]
mov rcx, rsi
mov edx, 1
mov rbx, rax
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rcx, rbx
add rsp, 0x38
pop rbx
pop rsi
jmp fcn.14005f738

Function at 0x14001759f
Capabilities:
Hash data using murmur3

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rbp, qword [rcx + 8]
mov rsi, qword [rcx]
test rbp, rbp
je 0x1400175b7
add rbp, 8
mov rax, rsi
mov ecx, 4
mov rdi, rsi
cqo
idiv rcx
lea rcx, [0x140061180]
sub rdi, rdx
call fcn.14005fa00
xor r9d, r9d
xor r8d, r8d
mov cl, byte [rax]
cmp rdi, r9
jg 0x1400175f8
mov rax, rsi
mov r10d, 4
add rbp, r9
cqo
idiv r10
xor eax, eax
jmp 0x140017635
mov edx, dword [rbp + r9]
add r9, 4
imul edx, edx, 0xcc9e2d51
rol edx, 0xf
test cl, cl
jne 0x140017674
imul edx, edx, 0x1b873593
xor edx, r8d
rol edx, 0xd
lea edx, [rdx + rdx*4]
lea r8d, [rdx - 0x19ab949c]
jmp 0x1400175de
dec rdx
shl eax, 8
movzx r9d, byte [rbp + rdx]
or eax, r9d
test rdx, rdx
jg 0x140017626
imul eax, eax, 0xcc9e2d51
rol eax, 0xf
test cl, cl
jne 0x140017674
imul eax, eax, 0x1b873593
xor r8d, esi
xor eax, r8d
mov edx, eax
shr edx, 0x10
xor eax, edx
imul eax, eax, 0x85ebca6b
mov edx, eax
shr edx, 0xd
xor eax, edx
imul eax, eax, 0xc2b2ae35
mov ebx, eax
shr ebx, 0x10
xor ebx, eax
mov rax, rbx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret

Function at 0x1400593c0
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.14005f160
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.14005f160
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 0x140059430
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140090554]
mov rbx, rcx
test esi, esi
jle 0x140059560
mov rax, qword [0x140090558]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14005947b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140059505
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140059460
mov rcx, rbx
call fcn.140059e80
mov rdi, rax
test rax, rax
je 0x140059582
mov rax, qword [0x140090558]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140059fc0
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140090558]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140059567
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400594fe
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140059510
add dword [0x140090554], 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 [0x140090558]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400594fe
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.1400593c0
nop dword [rax]
xor esi, esi
jmp 0x140059488
mov rax, qword [0x140090558]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.1400593c0
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.1400593c0
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140059af0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x1400905c0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400905a0]
test rbx, rbx
je 0x140059b4c
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 eax, eax
jne 0x140059b43
test rsi, rsi
je 0x140059b43
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140059b28
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 0x140059e80
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140086ed0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140059ea0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140059ea8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140059ea0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x140059efd
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 0x140059ef4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140059ea0
add rax, 0x28
cmp rax, r9
jne 0x140059ee0
xor eax, eax
ret

Function at 0x140059f00
Capabilities:
Parse pe header

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

Function at 0x140059fc0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140086ed0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x140059fdf
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140059fe8
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

Function at 0x14005f9a0
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
xor r9d, r9d
xor edx, edx
xor ecx, ecx
mov dword [0x140091050], 0xffffffff
mov r8d, 0xffff
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov qword [0x140091058], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x14005f9f0
lea rdx, [0x14005f8b0]
mov ecx, eax
mov dword [0x140091048], eax
call fcn.14005fca0
test eax, eax
jne 0x14005f9f8
add rsp, 0x28
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x14005f9e7
call sub.msvcrt.dll_abort
nop
nop
Function at 0x14005fa00
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 [0x140086e50]
mov r11d, dword [rsi]
mov rbx, rcx
test r11d, r11d
jne 0x14005fa38
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x14005faa0
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 0x14005fab0
mov esi, dword [0x140091048]
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 0x14005fb20
mov rbp, qword [rsi]
cmp rbp, r12
jb 0x14005fb68
sub r12, 1
mov rax, qword [rsi + r12*8 + 8]
test rax, rax
jne 0x14005fa27
mov rcx, rbx
call fcn.14005f900
mov qword [rsi + r12*8 + 8], rax
jmp 0x14005fa27
call fcn.14005f900
mov qword [rbx + 0x10], rax
jmp 0x14005fa27
mov r10d, dword [rsi]
test r10d, r10d
je 0x14005fbca
mov r9d, dword [0x140065d60]
test r9d, r9d
je 0x14005fbf8
lock add dword [0x140091050], 1
jne 0x14005fc2c
mov r12, qword [rbx + 0x10]
test r12, r12
je 0x14005fbd7
mov eax, dword [rsi]
test eax, eax
je 0x14005fa41
lock sub dword [0x140091050], 1
js 0x14005fa41
mov rcx, qword [0x140091058]
xor r8d, r8d
mov edx, 1
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
jmp 0x14005fa41
lea rcx, [r12 + 0x21]
mov edx, 8
lea rdi, [r12 + 0x20]
call fcn.14005f718
mov rsi, rax
test rax, rax
je 0x14005fc53
mov qword [rax], rdi
mov ecx, dword [0x140091048]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x14005fa7b
call r13
jmp 0x14005fa7b
lea rdi, [rbp + rbp]
lea rax, [r12 + 0x20]
mov rcx, rsi
cmp rdi, r12
cmovb rdi, rax
lea rdx, [rdi*8 + 8]
call sub.msvcrt.dll_realloc
mov rsi, rax
test rax, rax
je 0x14005fc53
mov qword [rax], rdi
sub rdi, rbp
lea rcx, [rax + rbp*8 + 8]
xor edx, edx
lea r8, [rdi*8]
call sub.msvcrt.dll_memset
jmp 0x14005fb43
call fcn.14005f9a0
mov dword [0x140065d60], 1
mov edx, dword [rsi]
test edx, edx
jne 0x14005facc
mov r12, qword [rbx + 0x10]
test r12, r12
jne 0x14005fa41
mov rax, qword [0x140091040]
lea r12, [rax + 1]
mov qword [0x140091040], r12
mov qword [rbx + 0x10], r12
jmp 0x14005fae7
lock add dword [0x140065d64], 1
je 0x14005fbb1
mov r8d, dword [0x140065d60]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
lea rdi, [0x140065d60]
test r8d, r8d
jne 0x14005fbc0
nop dword [rax]
xor ecx, ecx
call rbp
mov ecx, dword [rdi]
test ecx, ecx
je 0x14005fc20
jmp 0x14005fbc0
mov rcx, qword [0x140091058]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x14005fada
lock sub dword [0x140091050], 1
jmp 0x14005fada
call sub.msvcrt.dll_abort
nop
nop dword [rax]
cmp qword [rcx], rdx
jae 0x14005fc70
mov qword [rcx], rdx
mov qword [rcx + 0x18], 0
cmp qword [rcx + 8], r8
jae 0x14005fc7a
mov qword [rcx + 8], r8
test r9, r9
je 0x14005fc84
cmp qword [rcx], rdx
je 0x14005fc88
ret
mov qword [rcx + 0x18], r9
ret
Function at 0x1800caf30
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x28
mov rax, qword [rsp + 0x30]
mov eax, dword [rax]
mov dword [rsp + 4], eax
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 4]
mov dword [rsp + 8], eax
mov rax, qword [rsp + 0x30]
add rax, 8
mov qword [rsp + 0x18], rax
mov dword [rsp], 0
jmp 0x1800caf79
mov eax, dword [rsp]
inc eax
mov dword [rsp], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp], eax
jge 0x1800cb01f
mov eax, dword [rsp + 4]
inc eax
movzx eax, al
mov dword [rsp + 4], eax
movsxd rax, dword [rsp + 4]
mov rcx, qword [rsp + 0x18]
mov eax, dword [rcx + rax*4]
mov dword [rsp + 0xc], eax
mov eax, dword [rsp + 0xc]
mov ecx, dword [rsp + 8]
add ecx, eax
mov eax, ecx
movzx eax, al
mov dword [rsp + 8], eax
movsxd rax, dword [rsp + 8]
mov rcx, qword [rsp + 0x18]
mov eax, dword [rcx + rax*4]
mov dword [rsp + 0x10], eax
movsxd rax, dword [rsp + 4]
mov rcx, qword [rsp + 0x18]
mov edx, dword [rsp + 0x10]
mov dword [rcx + rax*4], edx
movsxd rax, dword [rsp + 8]
mov rcx, qword [rsp + 0x18]
mov edx, dword [rsp + 0xc]
mov dword [rcx + rax*4], edx
movsxd rax, dword [rsp]
mov ecx, dword [rsp + 0x10]
mov edx, dword [rsp + 0xc]
add edx, ecx
mov ecx, edx
movzx ecx, cl
mov rdx, qword [rsp + 0x38]
movzx eax, byte [rdx + rax]
mov rdx, qword [rsp + 0x18]
xor eax, dword [rdx + rcx*4]
movsxd rcx, dword [rsp]
mov rdx, qword [rsp + 0x38]
mov byte [rdx + rcx], al
jmp 0x1800caf71
mov rax, qword [rsp + 0x30]
mov ecx, dword [rsp + 4]
mov dword [rax], ecx
mov rax, qword [rsp + 0x30]
mov ecx, dword [rsp + 8]
mov dword [rax + 4], ecx
add rsp, 0x28
ret
Function at 0x1800cb040
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov dword [rsp + 8], ecx
sub rsp, 0xa8
mov rax, qword gs:[0x60]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x50]
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x28], 0
mov eax, 8
imul rax, rax, 1
mov rcx, qword [rsp + 0x58]
mov rax, qword [rcx + rax + 8]
mov qword [rsp + 0x38], rax
jmp 0x1800cb0a1
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x38]
mov rax, qword [rcx + rax]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
cmp qword [rax + 0x30], 0
je 0x1800cb166
mov rax, qword [rsp + 0x38]
mov rax, qword [rax + 0x30]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x60]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x68]
add rax, 0x88
mov qword [rsp + 0x70], rax
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x70]
mov eax, dword [rcx + rax]
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0xc]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x48]
mov eax, dword [rax]
or eax, 0x20202020
cmp eax, 0x6c64746e
je 0x1800cb14b
jmp 0x1800cb08a
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 4]
or eax, 0x20202020
cmp eax, 0x6c642e6c
jne 0x1800cb161
jmp 0x1800cb166
jmp 0x1800cb08a
cmp qword [rsp + 0x30], 0
jne 0x1800cb175
xor eax, eax
jmp 0x1800cb250
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0x18]
mov dword [rsp + 0x44], eax
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0x1c]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0x20]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0x24]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x88], rax
mov dword [rsp + 0x20], 0
jmp 0x1800cb1e3
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x44]
cmp dword [rsp + 0x20], eax
jae 0x1800cb24e
movsxd rax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x78]
mov eax, dword [rcx + rax*4]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x80], rax
mov rcx, qword [rsp + 0x80]
call fcn.1800cb260
cmp eax, dword [rsp + 0xb0]
jne 0x1800cb24c
movsxd rax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x88]
movzx eax, word [rcx + rax*2]
mov rcx, qword [rsp + 0x90]
mov eax, dword [rcx + rax*4]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
jmp 0x1800cb250
jmp 0x1800cb1d9
xor eax, eax
add rsp, 0xa8
ret