joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180042ad0
Capabilities:
Resume thread

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
push r14
push r15
sub rsp, 0x30
xor r15d, r15d
mov edi, 1
mov r14d, r15d
mov ebx, r15d
xor eax, eax
lock cmpxchg dword [0x1800a5b70], edi
je 0x180042b19
cmp rbx, 0x20
jae 0x180042b02
xor ecx, ecx
jmp 0x180042b04
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_Sleep]
inc rbx
xor eax, eax
lock cmpxchg dword [0x1800a5b70], edi
jne 0x180042af8
cmp qword [0x1800a5b78], r14
mov qword [rsp + 0x60], r13
je 0x180042cbb
mov ecx, dword [0x1800a60dc]
mov ebx, r15d
test ecx, ecx
je 0x180042b51
mov rdx, qword [0x1800a60d0]
mov rax, rdx
cmp qword [rax], r14
je 0x180042b5c
inc ebx
add rax, 0x38
cmp ebx, ecx
jb 0x180042b42
mov r14d, 4
jmp 0x180042cc1
cmp ebx, 0xffffffff
je 0x180042b51
mov eax, ebx
imul r13, rax, 0x38
test byte [rdx + r13 + 0x20], 2
je 0x180042c20
xor r8d, r8d
lea rcx, [rsp + 0x20]
mov edx, ebx
call fcn.180042480
mov r14d, eax
test eax, eax
jne 0x180042cc1
xor edx, edx
mov ecx, ebx
call fcn.180042560
mov r14d, eax
cmp qword [rsp + 0x20], r15
je 0x180042c10
mov eax, dword [rsp + 0x2c]
test eax, eax
je 0x180042bfc
mov rdi, qword [rsp + 0x20]
mov qword [rsp + 0x50], rbp
mov ebp, eax
mov qword [rsp + 0x58], rsi
nop dword [rax]
mov r8d, dword [rdi]
xor edx, edx
lea ecx, [rdx + 0x5a]
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rsi, rax
test rax, rax
je 0x180042be8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rdi, 4
sub rbp, 1
jne 0x180042bc0
mov rsi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x50]
mov r8, qword [rsp + 0x20]
xor edx, edx
mov rcx, qword [0x1800a5b78]
call qword [sym.imp.KERNEL32.dll_HeapFree]
test r14d, r14d
jne 0x180042cc1
mov rdx, qword [0x1800a60d0]
mov rcx, qword [rdx + r13 + 0x10]
call fcn.180041920
mov edx, dword [0x1800a60dc]
dec edx
cmp ebx, edx
jae 0x180042c6f
mov eax, edx
imul rcx, rax, 0x38
mov rax, qword [0x1800a60d0]
movups xmm0, xmmword [rcx + rax]
movups xmmword [rax + r13], xmm0
movups xmm1, xmmword [rcx + rax + 0x10]
movups xmmword [rax + r13 + 0x10], xmm1
movups xmm0, xmmword [rcx + rax + 0x20]
movups xmmword [rax + r13 + 0x20], xmm0
movsd xmm1, qword [rcx + rax + 0x30]
movsd qword [rax + r13 + 0x30], xmm1
mov ecx, dword [0x1800a60d8]
mov eax, ecx
mov dword [0x1800a60dc], edx
shr eax, 1
cmp eax, 0x20
jb 0x180042cc1
cmp eax, edx
jb 0x180042cc1
mov r8, qword [0x1800a60d0]
mov eax, ecx
mov rcx, qword [0x1800a5b78]
xor edx, edx
shr rax, 1
imul r9, rax, 0x38
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
test rax, rax
je 0x180042cc1
shr dword [0x1800a60d8], 1
mov qword [0x1800a60d0], rax
jmp 0x180042cc1
mov r14d, 2
xchg dword [0x1800a5b70], r15d
mov r13, qword [rsp + 0x60]
mov eax, r14d
mov rbx, qword [rsp + 0x68]
add rsp, 0x30
pop r15
pop r14
pop rdi
ret
Function at 0x180043720
Capabilities:
Create thread

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x1800a5040]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov ebx, edx
call qword [sym.imp.KERNEL32.dll_DisableThreadLibraryCalls]
cmp ebx, 1
jne 0x1800437aa
lea ecx, [rbx + 7]
call fcn.180058548
lea rcx, [0x180043280]
mov qword [rax], rcx
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0x38]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], 0
mov r9, rax
lea r8, [0x180043810]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov qword [rsp + 0x30], rax
test rax, rax
je 0x1800437ce
cmp dword [rsp + 0x38], 0
je 0x1800437c2
movaps xmm0, xmmword [rsp + 0x30]
movdqa xmmword [rsp + 0x40], xmm0
lea rcx, [rsp + 0x40]
call qword [sym.imp.MSVCP140.dll__Thrd_detach]
test eax, eax
jne 0x1800437c2
mov eax, 1
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.180058090
add rsp, 0x60
pop rbx
ret
mov ecx, 1
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
nop
mov dword [rsp + 0x38], 0
mov ecx, 6
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
int3
Function at 0x180047340
Capabilities:
Hash data using fnv

Disassembly:
push rdi
sub rsp, 0x20
movabs rax, 0xfffffffffffffff
mov edi, 1
bsr rcx, rax
mov eax, edi
shl rax, cl
cmp rdx, rax
jbe 0x180047371
lea rcx, str.invalid_hash_bucket_count
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const____ptr64_]
int3
lea rax, [rdx - 1]
mov qword [rsp + 0x30], rbx
mov rbx, qword [0x1800a5be8]
or rax, rdi
bsr rcx, rax
mov r8, rbx
inc ecx
shl rdi, cl
lea rcx, [0x1800a5bf8]
lea rdx, [rdi + rdi]
call fcn.180045900
mov rax, qword [0x1800a5be8]
lea r9, [rdi - 1]
mov qword [0x1800a5c10], r9
mov qword [0x1800a5c18], rdi
mov rax, qword [rax]
mov rcx, rax
cmp rax, rbx
je 0x1800474e4
mov qword [rsp + 0x40], rsi
movabs rdi, 0x100000001b3
movabs rsi, 0xcbf29ce484222325
movzx edx, byte [rax + 0x11]
movzx r11d, byte [rax + 0x10]
mov rcx, qword [rcx]
xor r11, rsi
imul r11, rdi
xor r11, rdx
movzx edx, byte [rax + 0x12]
imul r11, rdi
xor r11, rdx
movzx edx, byte [rax + 0x13]
imul r11, rdi
xor r11, rdx
imul r11, rdi
and r11, r9
shl r11, 4
add r11, qword [0x1800a5bf8]
mov r9, qword [r11]
cmp r9, rbx
jne 0x180047430
mov qword [r11], rax
mov qword [r11 + 8], rax
jmp 0x1800474a5
mov rdx, qword [r11 + 8]
mov r8d, dword [rax + 0x10]
cmp r8d, dword [rdx + 0x10]
jne 0x18004746d
mov r10, qword [rdx]
cmp r10, rax
je 0x180047467
mov r9, qword [rax + 8]
mov qword [r9], rcx
mov r8, qword [rcx + 8]
mov qword [r8], r10
mov rdx, qword [r10 + 8]
mov qword [rdx], rax
mov qword [r10 + 8], r8
mov qword [rcx + 8], r9
mov qword [rax + 8], rdx
mov qword [r11 + 8], rax
jmp 0x1800474a5
cmp r9, rdx
je 0x180047481
mov rdx, qword [rdx + 8]
cmp r8d, dword [rdx + 0x10]
je 0x1800474b9
cmp r9, rdx
jne 0x180047472
mov r10, qword [rax + 8]
mov qword [r10], rcx
mov r9, qword [rcx + 8]
mov qword [r9], rdx
mov r8, qword [rdx + 8]
mov qword [r8], rax
mov qword [rdx + 8], r9
mov qword [rcx + 8], r10
mov qword [rax + 8], r8
mov qword [r11], rax
mov rax, rcx
cmp rcx, rbx
je 0x1800474df
mov r9, qword [0x1800a5c10]
jmp 0x1800473e1
mov r10, qword [rdx]
mov r9, qword [rax + 8]
mov qword [r9], rcx
mov r8, qword [rcx + 8]
mov qword [r8], r10
mov rdx, qword [r10 + 8]
mov qword [rdx], rax
mov qword [r10 + 8], r8
mov qword [rcx + 8], r9
mov qword [rax + 8], rdx
jmp 0x1800474a5
mov rsi, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x14003f200]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x14003f210]
mov dword [rax], 1
mov rax, qword [0x14003f220]
mov dword [rax], 1
mov rax, qword [0x14003f1b0]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x14003f1f0]
mov dword [0x14004500c], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x14003f2c0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x14003f2a0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x14003f160]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a

Function at 0x1400068e0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x28
mov rax, rdx
mov rsi, qword [rsp + 0x90]
mov rdi, qword [rsp + 0x88]
mov rdx, qword [rsp + 0x80]
mov ebx, ecx
shr ebx, 8
lea r8, [rax + r8*2]
xor r11d, r11d
mov r15, rax
movzx r14d, byte [rax + 1]
add rax, 2
lea r10, [r11 + r14]
cmp byte [r15], bl
jne 0x140006970
cmp r11, r10
ja 0x1400069e6
cmp r10, rdx
ja 0x1400069fa
add r11, r9
xor r15d, r15d
nop word cs:[rax + rax]
cmp r14, r15
je 0x140006972
lea r12, [r15 + 1]
cmp byte [r11 + r15], cl
mov r15, r12
jne 0x140006950
jmp 0x1400069d4
ja 0x14000697a
mov r11, r10
cmp rax, r8
jne 0x140006914
add rsi, rdi
movzx ecx, cx
mov al, 1
nop word cs:[rax + rax]
lea r8, [rdi + 1]
movzx edx, byte [rdi]
test dl, dl
js 0x1400069b0
mov rdi, r8
sub ecx, edx
jns 0x1400069cb
jmp 0x1400069d6
cmp r8, rsi
je 0x140006a0b
movzx r8d, byte [rdi + 1]
add rdi, 2
and edx, 0x7f
shl edx, 8
or edx, r8d
sub ecx, edx
js 0x1400069d6
xor al, 1
cmp rdi, rsi
jne 0x140006990
jmp 0x1400069d6
xor eax, eax
and al, 1
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
lea r8, str.librarycore_srcunicodeprintable.rs
mov rcx, r11
mov rdx, r10
call dbg.slice_index_order_fail
ud2
lea r8, str.librarycore_srcunicodeprintable.rs
mov rcx, r10
call dbg.slice_end_index_len_fail
ud2
lea rcx, str.called__Option::unwrap____on_a__None__value_rustc_a28077b28a02b92985b3a3faecf92813155f1ea1library_alloc_srccollections_btree_navigate.rsIndex_out_of_bounds
lea r8, str.librarycore_srcunicodeprintable.rs
mov edx, 0x2b
call dbg.panic
ud2
Function at 0x14000d140
Capabilities:
Encode data using xor

Disassembly:
mov rax, rdx
sub rdx, rcx
cmp rdx, 0x20
jae dbg.do_count_chars
cmp rax, rcx
je 0x14000d165
cmp rdx, 4
jae 0x14000d168
xor eax, eax
xor r8d, r8d
jmp 0x14000d200
xor eax, eax
ret
mov r8, rdx
and r8, 0xfffffffffffffffc
pxor xmm0, xmm0
xor eax, eax
movdqa xmm2, xmmword [0x140039760]
movdqa xmm3, xmmword [0x140039770]
pxor xmm1, xmm1
nop dword [rax]
movzx r9d, word [rcx + rax]
movd xmm4, r9d
movzx r9d, word [rcx + rax + 2]
movd xmm5, r9d
pcmpgtb xmm4, xmm2
punpcklbw xmm4, xmm4
pshuflw xmm4, xmm4, 0xd4
pshufd xmm4, xmm4, 0xd4
pand xmm4, xmm3
paddq xmm0, xmm4
pcmpgtb xmm5, xmm2
punpcklbw xmm5, xmm5
pshuflw xmm4, xmm5, 0xd4
pshufd xmm4, xmm4, 0xd4
pand xmm4, xmm3
paddq xmm1, xmm4
add rax, 4
cmp r8, rax
jne 0x14000d190
paddq xmm1, xmm0
pshufd xmm0, xmm1, 0xee
paddq xmm0, xmm1
movq rax, xmm0
cmp r8, rdx
je 0x14000d217
nop dword [rax]
xor r9d, r9d
cmp byte [rcx + r8], 0xc0
setge r9b
add rax, r9
inc r8
cmp rdx, r8
jne 0x14000d200
ret
Function at 0x14000e510
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x48
mov rsi, rcx
mov r9, qword [rcx]
test r9, r9
je 0x14000e56b
mov r10, qword [rsi + 8]
mov rcx, qword [rsi + 0x10]
cmp rcx, r10
jae 0x14000e56b
movzx eax, byte [r9 + rcx]
cmp eax, 0x49
je 0x14000e586
cmp eax, 0x42
jne 0x14000e56b
lea r11, [rcx + 1]
mov qword [rsi + 0x10], r11
cmp r11, r10
jae 0x14000e636
cmp byte [r9 + r11], 0x5f
jne 0x14000e636
lea rax, [rcx + 2]
mov qword [rsi + 0x10], rax
xor eax, eax
jmp 0x14000e69e
mov rcx, rsi
xor edx, edx
call dbg.print_path
mov edi, eax
add dil, dil
mov eax, edi
add rsp, 0x48
pop rbx
pop rdi
pop rsi
pop r14
ret
inc rcx
mov qword [rsi + 0x10], rcx
mov rcx, rsi
xor edx, edx
call dbg.print_path
test al, al
jne 0x14000e731
mov rcx, qword [rsi + 0x20]
test rcx, rcx
je 0x14000e5c2
lea rdx, [0x14003c33c]
mov r8d, 1
call dbg.pad
test al, al
jne 0x14000e731
mov rax, qword [rsi]
mov dil, 1
test rax, rax
je 0x14000e57a
xor r14d, r14d
lea rbx, [0x14003c6f0]
nop word [rax + rax]
mov rcx, qword [rsi + 0x10]
cmp rcx, qword [rsi + 8]
jae 0x14000e5f4
cmp byte [rax + rcx], 0x45
je 0x14000e75a
sub r14, 1
jb 0x14000e619
mov rcx, qword [rsi + 0x20]
test rcx, rcx
je 0x14000e619
mov r8d, 2
mov rdx, rbx
call dbg.pad
test al, al
jne 0x14000e731
mov rcx, rsi
call dbg.print_generic_arg
test al, al
jne 0x14000e731
mov rax, qword [rsi]
test rax, rax
jne 0x14000e5e0
jmp 0x14000e57a
xor eax, eax
mov edi, 0x3e
nop dword [rax]
mov r8b, 1
cmp r11, r10
jae 0x14000e6f8
movzx edx, byte [r9 + r11]
cmp dl, 0x5f
je 0x14000e692
lea ebx, [rdx - 0x30]
cmp bl, 0xa
jb 0x14000e67c
lea ebx, [rdx - 0x61]
cmp bl, 0x1a
jae 0x14000e66b
add dl, 0xa9
jmp 0x14000e67a
lea ebx, [rdx - 0x41]
cmp bl, 0x1a
jae 0x14000e6f8
add dl, 0xe3
mov ebx, edx
inc r11
mov qword [rsi + 0x10], r11
mul rdi
jo 0x14000e6f8
movzx edx, bl
add rax, rdx
jae 0x14000e640
jmp 0x14000e6f8
inc r11
mov qword [rsi + 0x10], r11
inc rax
je 0x14000e6f8
cmp rax, rcx
jae 0x14000e6f5
mov ecx, dword [rsi + 0x18]
inc ecx
cmp ecx, 0x1f4
ja 0x14000e739
cmp qword [rsi + 0x20], 0
je 0x14000e753
movups xmm0, xmmword [rsi]
movups xmm1, xmmword [rsi + 0x10]
movaps xmmword [rsp + 0x30], xmm1
movaps xmmword [rsp + 0x20], xmm0
mov qword [rsi + 0x10], rax
mov dword [rsi + 0x18], ecx
mov rcx, rsi
call dbg.print_path_maybe_open_generics
movaps xmm0, xmmword [rsp + 0x20]
movaps xmm1, xmmword [rsp + 0x30]
movups xmmword [rsi], xmm0
movups xmmword [rsi + 0x10], xmm1
jmp 0x14000e57c
mov r8b, 1
xor edi, edi
mov rcx, qword [rsi + 0x20]
test rcx, rcx
je 0x14000e748
lea rax, str.invalid_syntaxrecursion_limit_reached
lea rdx, [0x14003c6b0]
test r8b, r8b
cmovne rdx, rax
xor r8b, 1
movzx eax, r8b
lea r8, [rax + rax*8]
add r8, 0x10
call dbg.pad
test al, al
je 0x14000e748
mov dil, 2
jmp 0x14000e57a
mov dil, 1
xor r8d, r8d
mov rcx, qword [rsi + 0x20]
test rcx, rcx
jne 0x14000e703
mov qword [rsi], 0
mov byte [rsi + 8], dil
xor edi, edi
jmp 0x14000e57a
inc rcx
mov qword [rsi + 0x10], rcx
jmp 0x14000e57a
Function at 0x140010dd0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x20
movzx eax, byte [0x1400450e8]
test al, al
je 0x140010f6f
test edx, edx
je 0x140010df7
cmp edx, 3
jne 0x140010f6f
mov rbx, qword [0x1400450f0]
test rbx, rbx
je 0x140010f6f
xor r14d, r14d
jmp 0x140010e19
mov rbx, qword [rbx + 8]
test rbx, rbx
je 0x140010e4d
mov esi, dword [rbx + 0x18]
mov r15, qword [rbx]
test r15, r15
je 0x140010fba
dec esi
mov ecx, esi
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
je 0x140010e10
mov rdi, rax
mov ecx, esi
xor edx, edx
call fcn.1400362ec
mov rcx, rdi
call r15
mov r14b, 1
jmp 0x140010e10
test r14b, 1
je 0x140010f6f
mov rbx, qword [0x1400450f0]
test rbx, rbx
je 0x140010f6f
xor r14d, r14d
jmp 0x140010e79
mov rbx, qword [rbx + 8]
test rbx, rbx
je 0x140010ead
mov esi, dword [rbx + 0x18]
mov r15, qword [rbx]
test r15, r15
je 0x140010fba
dec esi
mov ecx, esi
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
je 0x140010e70
mov rdi, rax
mov ecx, esi
xor edx, edx
call fcn.1400362ec
mov rcx, rdi
call r15
mov r14b, 1
jmp 0x140010e70
test r14b, 1
je 0x140010f6f
mov rbx, qword [0x1400450f0]
test rbx, rbx
je 0x140010f6f
xor r14d, r14d
jmp 0x140010ed9
mov rbx, qword [rbx + 8]
test rbx, rbx
je 0x140010f0d
mov esi, dword [rbx + 0x18]
mov r15, qword [rbx]
test r15, r15
je 0x140010fba
dec esi
mov ecx, esi
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
je 0x140010ed0
mov rdi, rax
mov ecx, esi
xor edx, edx
call fcn.1400362ec
mov rcx, rdi
call r15
mov r14b, 1
jmp 0x140010ed0
test r14b, 1
je 0x140010f6f
mov rbx, qword [0x1400450f0]
test rbx, rbx
je 0x140010f6f
xor r14d, r14d
jmp 0x140010f39
mov rbx, qword [rbx + 8]
test rbx, rbx
je 0x140010f69
mov esi, dword [rbx + 0x18]
mov r15, qword [rbx]
test r15, r15
je 0x140010fba
dec esi
mov ecx, esi
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
je 0x140010f30
mov rdi, rax
mov ecx, esi
xor edx, edx
call fcn.1400362ec
mov rcx, rdi
call r15
mov r14b, 1
jmp 0x140010f30
test r14b, 1
jne 0x140010f7b
add rsp, 0x20
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
mov rbx, qword [0x1400450f0]
jmp 0x140010f88
mov rbx, qword [rbx + 8]
test rbx, rbx
je 0x140010f6f
mov esi, dword [rbx + 0x18]
mov r14, qword [rbx]
test r14, r14
je 0x140010fba
dec esi
mov ecx, esi
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
je 0x140010f84
mov rdi, rax
mov ecx, esi
xor edx, edx
call fcn.1400362ec
mov rcx, rdi
call r14
jmp 0x140010f84
lea rcx, str.called__Option::unwrap____on_a__None__value_rustc_a28077b28a02b92985b3a3faecf92813155f1ea1library_alloc_srccollections_btree_navigate.rsIndex_out_of_bounds
lea r8, str.library_std_src_syswindows_thread_local_key.rs
mov edx, 0x2b
call dbg.panic
ud2
Function at 0x140011d90
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x38
mov ecx, dword [0x140038068]
test ecx, ecx
je 0x140011dc0
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x140011dd9
mov rdi, rax
cmp qword [rax + 8], 0
je 0x140011dd9
add rdi, 0x10
jmp 0x140011ece
lea rcx, dbg.destroy_value_std::sys_common::thread_info::ThreadInfo_
call dbg.init
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jae 0x140011dad
mov ecx, dword [0x140038068]
test ecx, ecx
je 0x140011eaf
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
je 0x140011ecc
mov rsi, rax
test rax, rax
jne 0x140011e7e
mov qword [rsp + 0x28], 0
lea rax, dbg.destroy_value_std::sys_common::thread_info::ThreadInfo_
mov qword [rsp + 0x20], rax
movzx eax, byte [0x140045030]
mov rcx, qword [0x1400450e0]
test rcx, rcx
jne 0x140011e40
call sub.KERNEL32.dll_GetProcessHeap
test rax, rax
je 0x140011ee8
mov rcx, rax
mov qword [0x1400450e0], rax
mov r8d, 0x18
xor edx, edx
call fcn.14003638c
test rax, rax
je 0x140011ee8
mov rsi, rax
mov rax, qword [rsp + 0x30]
mov qword [rsi + 0x10], rax
movups xmm0, xmmword [rsp + 0x20]
movups xmmword [rsi], xmm0
mov ecx, dword [0x140038068]
test ecx, ecx
je 0x140011ed8
dec ecx
mov rdx, rsi
call fcn.1400362ec
lea rdi, [rsi + 0x10]
mov rcx, qword [rsi + 0x10]
cmp qword [rsi + 8], 0
mov qword [rsi + 8], 1
mov qword [rsi + 0x10], 0
je 0x140011ece
test rcx, rcx
je 0x140011ece
lock dec qword [rcx]
jne 0x140011ece
call dbg.drop_slow<std::thread::Inner, alloc::alloc::Global>
jmp 0x140011ece
lea rcx, dbg.destroy_value_std::sys_common::thread_info::ThreadInfo_
call dbg.init
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
jne 0x140011df8
xor edi, edi
mov rax, rdi
add rsp, 0x38
pop rdi
pop rsi
ret
lea rcx, dbg.destroy_value_std::sys_common::thread_info::ThreadInfo_
call dbg.init
mov ecx, eax
jmp 0x140011e76
mov ecx, 8
mov edx, 0x18
call dbg.handle_alloc_error
ud2
Function at 0x140012170
Capabilities:
Allocate thread local storage

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x60
mov rsi, rcx
cmp qword [rcx], 0
je 0x1400121f5
mov dword [rsp + 0x2c], 0
lea rbx, [rsi + 0x10]
lea r8, [rsp + 0x2c]
mov rcx, rbx
xor edx, edx
xor r9d, r9d
call sub.KERNEL32.dll_InitOnceBeginInitialize
mov dword [rsp + 0x28], eax
cmp eax, 1
jne 0x140012236
cmp dword [rsp + 0x2c], 0
je 0x14001221a
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x140012250
mov edi, eax
inc eax
mov dword [rsi + 0x18], eax
mov rax, qword [0x1400450f0]
nop
mov qword [rsi + 8], rax
lock cmpxchg qword [0x1400450f0], rsi
jne 0x1400121d0
mov byte [0x1400450e8], 1
mov rcx, rbx
xor edx, edx
xor r8d, r8d
call sub.KERNEL32.dll_InitOnceComplete
jmp 0x14001222c
call sub.KERNEL32.dll_TlsAlloc
mov dword [rsp + 0x28], eax
cmp eax, 0xffffffff
je 0x14001229c
mov ecx, eax
inc ecx
xor eax, eax
lock cmpxchg dword [rsi + 0x18], ecx
jne 0x14001221f
mov edi, dword [rsp + 0x28]
jmp 0x14001222c
mov edi, dword [rsi + 0x18]
jmp 0x14001222a
mov edi, eax
mov ecx, dword [rsp + 0x28]
call sub.KERNEL32.dll_TlsFree
dec edi
mov eax, edi
add rsp, 0x60
pop rbx
pop rdi
pop rsi
ret
mov qword [rsp + 0x30], 0
lea rcx, [rsp + 0x28]
lea rdx, [rsp + 0x30]
call dbg.assert_failed<i32, i32>
ud2
mov rcx, rbx
mov edx, 4
xor r8d, r8d
call sub.KERNEL32.dll_InitOnceComplete
lea rax, str.out_of_TLS_indexes
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 1
lea rax, str.called__Option::unwrap____on_a__None__value_rustc_a28077b28a02b92985b3a3faecf92813155f1ea1library_alloc_srccollections_btree_navigate.rsIndex_out_of_bounds
mov qword [rsp + 0x40], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
lea rdx, str.library_std_src_syswindows_thread_local_key.rs
lea rcx, [rsp + 0x30]
call dbg.panic_fmt
ud2
lea rax, str.out_of_TLS_indexes
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 1
lea rax, str.called__Option::unwrap____on_a__None__value_rustc_a28077b28a02b92985b3a3faecf92813155f1ea1library_alloc_srccollections_btree_navigate.rsIndex_out_of_bounds
mov qword [rsp + 0x40], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
lea rcx, [rsp + 0x28]
lea rdx, [rsp + 0x30]
call dbg.assert_failed<u32, u32>
ud2

Function at 0x140012820
Capabilities:
Set thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x68
mov qword [rsp + 0x30], rcx
mov rsi, qword [rcx]
mov ecx, dword [rsi + 0x18]
test ecx, ecx
je 0x140012839
dec ecx
jmp 0x140012843
mov rcx, rsi
call dbg.init
mov ecx, eax
mov edx, 1
call fcn.1400362ec
mov rdi, qword [rsp + 0x30]
cmp qword [rdi + 8], 0
je 0x140012871
mov rax, qword [rdi + 0x10]
test rax, rax
je 0x140012871
lock dec qword [rax]
jne 0x140012871
mov rcx, qword [rdi + 0x10]
call dbg.drop_slow<std::thread::Inner, alloc::alloc::Global>
mov rcx, qword [0x1400450e0]
xor edx, edx
mov r8, rdi
call fcn.140036384
mov ecx, dword [rsi + 0x18]
test ecx, ecx
je 0x14001288d
dec ecx
jmp 0x140012897
mov rcx, rsi
call dbg.init
mov ecx, eax
xor edx, edx
add rsp, 0x68
pop rdi
pop rsi
jmp fcn.1400362ec
Function at 0x140013aa0
Capabilities:
Set thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x68
mov rdi, rcx
mov rsi, qword [rcx]
mov ecx, dword [rsi + 0x18]
test ecx, ecx
je 0x140013ab7
dec ecx
jmp 0x140013ac1
mov rcx, rsi
call dbg.init
mov ecx, eax
mov edx, 1
call fcn.1400362ec
mov rcx, qword [0x1400450e0]
xor edx, edx
mov r8, rdi
call fcn.140036384
mov ecx, dword [rsi + 0x18]
test ecx, ecx
je 0x140013ae7
dec ecx
jmp 0x140013af1
mov rcx, rsi
call dbg.init
mov ecx, eax
xor edx, edx
add rsp, 0x68
pop rdi
pop rsi
jmp fcn.1400362ec

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

Disassembly:
push rsi
sub rsp, 0x20
mov ecx, dword [0x140038048]
test ecx, ecx
je 0x140013d0d
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x140013d26
cmp qword [rax + 8], 0
je 0x140013d26
add rax, 0x10
add rsp, 0x20
pop rsi
ret
lea rcx, dbg.destroy_value_u8_
call dbg.init
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jae 0x140013cfc
mov ecx, dword [0x140038048]
test ecx, ecx
je 0x140013dd1
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
je 0x140013dee
mov rsi, rax
test rax, rax
jne 0x140013db3
movzx eax, byte [0x140045030]
mov rcx, qword [0x1400450e0]
test rcx, rcx
jne 0x140013d78
call sub.KERNEL32.dll_GetProcessHeap
test rax, rax
je 0x140013e06
mov rcx, rax
mov qword [0x1400450e0], rax
mov r8d, 0x20
xor edx, edx
call fcn.14003638c
test rax, rax
je 0x140013e06
mov rsi, rax
lea rax, dbg.destroy_value_u8_
mov qword [rsi], rax
mov qword [rsi + 8], 0
mov ecx, dword [0x140038048]
test ecx, ecx
je 0x140013df6
dec ecx
mov rdx, rsi
call fcn.1400362ec
mov qword [rsi + 8], 1
lea rax, [rsi + 0x10]
mov qword [rsi + 0x10], 0
mov byte [rsi + 0x18], 0
add rsp, 0x20
pop rsi
ret
lea rcx, dbg.destroy_value_u8_
call dbg.init
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
jne 0x140013d45
xor eax, eax
add rsp, 0x20
pop rsi
ret
lea rcx, dbg.destroy_value_u8_
call dbg.init
mov ecx, eax
jmp 0x140013dab
mov ecx, 8
mov edx, 0x20
call dbg.handle_alloc_error
ud2

Function at 0x1400166e0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x20
mov rax, rdx
movzx r9d, byte [rdx + 0x38]
movzx r8d, byte [rdx + 0x3a]
xor edx, edx
cmp r9b, 1
ja 0x14001674b
movzx r10d, byte [rax + 0x10]
movzx r11d, r10b
test r8b, r8b
jne 0x1400168a8
cmp r10b, 5
jb 0x1400168a8
mov r10, qword [rax]
mov rdx, qword [rax + 8]
xor esi, esi
test r9b, r9b
jne 0x14001673b
cmp r11b, 6
je 0x14001673b
mov esi, 2
cmp rdx, 2
jb 0x140016952
cmp rsi, rdx
jne 0x140016868
xor edx, edx
jmp 0x1400168a8
xor r10d, r10d
add rdx, r10
lea rdi, [r10 + rsi]
inc rdi
cmp rdi, rdx
sete dl
movzx r10d, byte [r10 + rsi]
lea r8, [0x14003d8c0]
mov ecx, 2
call dbg.slice_start_index_len_fail
ud2