joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100c6e10
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x78
mov eax, dword [ebp + 8]
mov edi, ecx
xorps xmm0, xmm0
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 7
movsd qword [esp + 0x32], xmm0
movsd qword [esp + 0x2c], xmm0
mov byte [esp + 0x34], 1
lea esi, [esp + 0x18]
lea ecx, [esp + 0x10]
push esi
push eax
call sym.std::sys::pal::windows::fs::File::open::h3e8e5909ba41fa7f
add esp, 8
cmp byte [esp + 0x10], 4
jne 0x100c6e74
mov esi, dword [esp + 0x14]
jmp 0x100c6e81
movzx eax, byte [esp + 0x10]
mov esi, dword [esp + 0x14]
cmp al, 4
jne 0x100c6efb
lea ebx, [esp + 0x18]
mov edx, esi
mov ecx, ebx
call sym.std::sys::pal::windows::fs::File::file_attr::h1ba73a76d0a278d7
mov eax, dword [esp + 0x18]
xor eax, 2
or eax, dword [esp + 0x1c]
jne 0x100c6ee9
cmp byte [esp + 0x20], 3
jne 0x100c6ef0
mov eax, dword [esp + 0x24]
mov dword [esp + 4], edi
mov edi, dword [eax + 4]
mov ebx, dword [eax]
mov dword [esp + 0xc], eax
mov eax, dword [edi]
test eax, eax
je 0x100c6ebf
push ebx
call eax
add esp, 4
mov eax, dword [edi + 4]
test eax, eax
je 0x100c6ed3
push dword [edi + 8]
push eax
push ebx
call sym.___rust_dealloc
add esp, 0xc
push 4
push 0xc
push dword [esp + 0x14]
call sym.___rust_dealloc
add esp, 0xc
mov edi, dword [esp + 4]
jmp 0x100c6ef0
cmp dword [esp + 0x54], 0
je 0x100c6f47
mov dword [edi], 0
jmp 0x100c6fee
cmp al, 3
jne 0x100c6f3c
mov eax, dword [esi]
mov ebx, dword [esi + 4]
mov dword [esp + 4], eax
mov eax, dword [ebx]
test eax, eax
je 0x100c6f17
push dword [esp + 4]
call eax
add esp, 4
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 4]
test eax, eax
je 0x100c6f2f
push dword [ebx + 8]
push eax
push ecx
call sym.___rust_dealloc
add esp, 0xc
push 4
push 0xc
push esi
call sym.___rust_dealloc
add esp, 0xc
mov dword [edi], 0
jmp 0x100c6ff4
mov eax, dword [esp + 0x50]
test esi, esi
mov dword [esp + 0xc], eax
je 0x100c6f79
mov dword [esp + 0x18], 0
call sub.kernel32.dll_GetCurrentProcess
push 2
push 0
push 0
push ebx
push eax
push esi
push eax
call sub.kernel32.dll_DuplicateHandle
test eax, eax
je 0x100c6fe3
mov eax, dword [esp + 0x18]
jmp 0x100c6f7b
xor eax, eax
push 0
push 0
push 0
push 2
push 0
mov dword [esp + 0x1c], eax
push eax
call sub.kernel32.dll_CreateFileMappingA
test eax, eax
je 0x100c6fd2
push dword [esp + 0xc]
push 0
push 0
push 4
push eax
mov dword [esp + 0x18], edi
mov edi, eax
call sub.kernel32.dll_MapViewOfFile
mov ebx, eax
push edi
mov edi, dword [esp + 8]
call sub.kernel32.dll_CloseHandle
test ebx, ebx
je 0x100c6fd2
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov dword [edi + 4], eax
mov dword [edi + 8], ebx
mov dword [edi + 0xc], ecx
mov dword [edi], 1
jmp 0x100c6fee
mov dword [edi], 0
push dword [esp + 8]
call sub.kernel32.dll_CloseHandle
jmp 0x100c6fee
call sub.kernel32.dll_GetLastError
mov dword [edi], 0
push esi
call sub.kernel32.dll_CloseHandle
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x100cbd30
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 8
xor eax, eax
cmp dword [ebp + 8], 0
jne 0x100cbdfa
mov esi, dword [ecx + 0x30]
test esi, esi
je 0x100cbdfa
mov eax, dword [ecx + 0x2c]
xor ebx, ebx
mov edi, esi
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], esi
nop dword [eax]
shr edi, 1
add edi, ebx
mov ecx, dword [eax + edi*8]
cmp ecx, edx
je 0x100cbd83
cmp ecx, edx
lea ecx, [edi + 1]
cmova esi, edi
cmovb ebx, ecx
mov edi, esi
sub edi, ebx
ja 0x100cbd60
test ebx, ebx
je 0x100cbdf8
dec ebx
mov edi, ebx
mov ecx, dword [ebp - 0x10]
cmp edi, ecx
jae 0x100cbe02
mov esi, dword [eax + edi*8 + 4]
cmp byte [esi], 0
je 0x100cbdad
push 8
push esi
push 0
call sym.memchr::memchr::fallback::memchr::haecdb98edbf8bf21
add esp, 0xc
test eax, eax
je 0x100cbdef
cmp edx, 9
jae 0x100cbe0e
mov eax, esi
jmp 0x100cbdfa
mov edi, dword [ebp - 0x14]
xor eax, eax
mov ecx, dword [edi + 0x10]
test ecx, ecx
je 0x100cbdfa
mov dword [ebp - 0x10], ecx
mov ecx, dword [edi + 0x18]
mov ebx, dword [edi + 0x1c]
mov esi, dword [esi + 4]
mov edx, ecx
add edx, esi
mov edx, ebx
adc edx, 0
jb 0x100cbdfa
add ecx, esi
adc ebx, 0
push 0
push dword [edi + 0x24]
push dword [edi + 0x20]
push ebx
push ecx
push dword [edi + 0x14]
push dword [ebp - 0x10]
call sym.__LT__RF__u5b_u8_u5d__u20_as_u20_object..read..read_ref..ReadRef_GT_::read_bytes_at_until::h2b77aca5b2c51fcf
add esp, 0x1c
jmp 0x100cbdfa
mov edx, 8
mov eax, esi
jmp 0x100cbdfa
xor eax, eax
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x10179af0
push ecx
push edi
call sym.core::panicking::panic_bounds_check::haf27547f44996d48
push 0x10176388
push 8
push edx
call sym.core::slice::index::slice_end_index_len_fail::hb7bcdcb5c84f7e98
nop dword [eax + eax]
Function at 0x100cbe20
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
push eax
mov esi, dword [0x1011d0e8]
mov edi, ecx
test esi, esi
je 0x100cbec2
dec esi
push esi
call sub.kernel32.dll_TlsGetValue
cmp eax, 1
ja 0x100cbeba
je 0x100cbe62
test edi, edi
je 0x100cbe66
mov ebx, dword [edi]
mov dword [edi], 0
mov eax, dword [edi + 8]
test ebx, ebx
cmove eax, ebx
cmovne ebx, dword [edi + 4]
mov dword [ebp - 0x10], eax
jmp 0x100cbe6f
xor eax, eax
jmp 0x100cbeba
mov dword [ebp - 0x10], 0
xor ebx, ebx
mov eax, dword [0x101918ac]
movzx eax, byte [eax]
push 4
push 0xc
call sym.___rust_alloc
add esp, 8
test eax, eax
je 0x100cbee2
mov ecx, dword [ebp - 0x10]
mov dword [eax], ebx
mov byte [eax + 4], cl
mov dword [eax + 8], esi
push esi
mov ebx, eax
call sub.kernel32.dll_TlsGetValue
mov edi, eax
mov dword [ebp - 0x10], ebx
push ebx
push esi
call sub.kernel32.dll_TlsSetValue
test edi, edi
je 0x100cbeb7
push 4
push 0xc
push edi
call sym.___rust_dealloc
add esp, 0xc
mov eax, dword [ebp - 0x10]
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x1011d0e8
call sym.std::sys::thread_local::key::windows::LazyKey::init::h8219056d8c3ded71
add esp, 4
mov esi, eax
push esi
call sub.kernel32.dll_TlsGetValue
cmp eax, 1
jbe 0x100cbe43
jmp 0x100cbeba
push 0xc
push 4
call sym.alloc::alloc::handle_alloc_error::h9a0385ddba01e206
nop dword [eax + eax]

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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 8
mov esi, dword [0x1011d0f8]
mov edi, ecx
test esi, esi
je 0x100cbf19
dec esi
push esi
call sub.kernel32.dll_TlsGetValue
cmp eax, 1
jbe 0x100cbf33
add eax, 4
jmp 0x100cbfa3
push 0x1011d0f8
call sym.std::sys::thread_local::key::windows::LazyKey::init::h8219056d8c3ded71
add esp, 4
mov esi, eax
push esi
call sub.kernel32.dll_TlsGetValue
cmp eax, 1
ja 0x100cbf11
je 0x100cbf4d
xor ecx, ecx
test edi, edi
je 0x100cbf51
cmp byte [edi], 0
mov byte [edi], 0
movzx eax, byte [edi + 1]
cmove eax, ecx
mov dword [ebp - 0x14], eax
jmp 0x100cbf58
xor eax, eax
jmp 0x100cbfa3
mov dword [ebp - 0x14], 0
mov eax, dword [0x101918ac]
movzx eax, byte [eax]
push 4
push 8
call sym.___rust_alloc
add esp, 8
test eax, eax
je 0x100cbfab
mov ebx, eax
mov dword [eax], esi
add eax, 4
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
mov byte [ebx + 4], al
push esi
call sub.kernel32.dll_TlsGetValue
mov edi, eax
push ebx
push esi
call sub.kernel32.dll_TlsSetValue
test edi, edi
je 0x100cbfa0
push 4
push 8
push edi
call sym.___rust_dealloc
add esp, 0xc
mov eax, dword [ebp - 0x10]
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
push 8
push 4
call sym.alloc::alloc::handle_alloc_error::h9a0385ddba01e206
nop word cs:[eax + eax]
nop
Function at 0x100cbfc0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0xc
mov esi, dword [0x1011d118]
mov edi, ecx
test esi, esi
je 0x100cc067
dec esi
push esi
call sub.kernel32.dll_TlsGetValue
cmp eax, 1
ja 0x100cc05f
je 0x100cbffc
test edi, edi
je 0x100cc000
mov ebx, dword [edi]
mov dword [edi], 0
test ebx, ebx
je 0x100cc002
mov ebx, dword [edi + 4]
jmp 0x100cc002
xor eax, eax
jmp 0x100cc05f
xor ebx, ebx
mov eax, dword [0x101918ac]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], esi
movzx eax, byte [eax]
push 4
push 8
call sym.___rust_alloc
add esp, 8
test eax, eax
je 0x100cc087
mov dword [eax], ebx
mov dword [eax + 4], esi
push esi
mov ebx, eax
call sub.kernel32.dll_TlsGetValue
mov edi, eax
mov dword [ebp - 0x10], ebx
push ebx
push esi
call sub.kernel32.dll_TlsSetValue
test edi, edi
je 0x100cc05c
mov eax, dword [edi]
test eax, eax
je 0x100cc04f
lock dec dword [eax]
jne 0x100cc04f
mov ecx, edi
call sym.alloc::sync::Arc_LT_T_C_A_GT_::drop_slow::h39c803f4a20ab912
push 4
push 8
push edi
call sym.___rust_dealloc
add esp, 0xc
mov eax, dword [ebp - 0x10]
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x1011d118
call sym.std::sys::thread_local::key::windows::LazyKey::init::h8219056d8c3ded71
add esp, 4
mov esi, eax
push esi
call sub.kernel32.dll_TlsGetValue
cmp eax, 1
jbe 0x100cbfe5
jmp 0x100cc05f
push 8
push 4
call sym.alloc::alloc::handle_alloc_error::h9a0385ddba01e206
add esp, 8
ud2

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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
push eax
mov esi, dword [0x1011d138]
mov edi, ecx
test esi, esi
je 0x100cc156
dec esi
push esi
call sub.kernel32.dll_TlsGetValue
cmp eax, 1
ja 0x100cc14e
je 0x100cc0fe
test edi, edi
je 0x100cc102
mov eax, dword [edi]
xor ecx, ecx
mov ebx, 0
mov dword [edi], 0
or eax, dword [edi + 4]
mov dword [edi + 4], 0
je 0x100cc0fa
mov ecx, dword [edi + 0xc]
mov ebx, dword [edi + 8]
mov edi, ecx
jmp 0x100cc106
xor eax, eax
jmp 0x100cc14e
xor ebx, ebx
xor edi, edi
mov eax, dword [0x101918ac]
movzx eax, byte [eax]
push 8
push 0x10
call sym.___rust_alloc
add esp, 8
test eax, eax
je 0x100cc176
mov dword [eax], ebx
mov dword [eax + 4], edi
mov dword [eax + 8], esi
push esi
mov ebx, eax
call sub.kernel32.dll_TlsGetValue
mov edi, eax
mov dword [ebp - 0x10], ebx
push ebx
push esi
call sub.kernel32.dll_TlsSetValue
test edi, edi
je 0x100cc14b
push 8
push 0x10
push edi
call sym.___rust_dealloc
add esp, 0xc
mov eax, dword [ebp - 0x10]
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x1011d138
call sym.std::sys::thread_local::key::windows::LazyKey::init::h8219056d8c3ded71
add esp, 4
mov esi, eax
push esi
call sub.kernel32.dll_TlsGetValue
cmp eax, 1
jbe 0x100cc0d3
jmp 0x100cc14e
push 0x10
push 8
call sym.alloc::alloc::handle_alloc_error::h9a0385ddba01e206
nop
Function at 0x100cc180
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0xc
mov esi, dword [0x1011d148]
mov edi, ecx
test esi, esi
je 0x100cc227
dec esi
push esi
call sub.kernel32.dll_TlsGetValue
cmp eax, 1
ja 0x100cc21f
je 0x100cc1bc
test edi, edi
je 0x100cc1c0
mov ebx, dword [edi]
mov dword [edi], 0
test ebx, ebx
je 0x100cc1c2
mov ebx, dword [edi + 4]
jmp 0x100cc1c2
xor eax, eax
jmp 0x100cc21f
xor ebx, ebx
mov eax, dword [0x101918ac]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], esi
movzx eax, byte [eax]
push 4
push 8
call sym.___rust_alloc
add esp, 8
test eax, eax
je 0x100cc247
mov dword [eax], ebx
mov dword [eax + 4], esi
push esi
mov ebx, eax
call sub.kernel32.dll_TlsGetValue
mov edi, eax
mov dword [ebp - 0x10], ebx
push ebx
push esi
call sub.kernel32.dll_TlsSetValue
test edi, edi
je 0x100cc21c
mov eax, dword [edi]
test eax, eax
je 0x100cc20f
lock dec dword [eax]
jne 0x100cc20f
mov ecx, edi
call sym.alloc::sync::Arc_LT_T_C_A_GT_::drop_slow::hc39c94033ce122a6
push 4
push 8
push edi
call sym.___rust_dealloc
add esp, 0xc
mov eax, dword [ebp - 0x10]
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x1011d148
call sym.std::sys::thread_local::key::windows::LazyKey::init::h8219056d8c3ded71
add esp, 4
mov esi, eax
push esi
call sub.kernel32.dll_TlsGetValue
cmp eax, 1
jbe 0x100cc1a5
jmp 0x100cc21f
push 8
push 4
call sym.alloc::alloc::handle_alloc_error::h9a0385ddba01e206
add esp, 8
ud2

Function at 0x100cf8b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push esi
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x100cf8de
mov edx, dword [ebp + 8]
xor eax, eax
movzx esi, byte [edx]
shl eax, 4
inc edx
add esi, eax
mov eax, esi
shr eax, 0x18
and eax, 0xfffffff0
xor eax, esi
dec ecx
jne 0x100cf8c0
and eax, 0xfffffff
pop esi
pop ebp
ret
xor eax, eax
pop esi
pop ebp
ret

Function at 0x100cf8f0
Capabilities:
Hash data using djb2

Disassembly:
push ebp
mov ebp, esp
push esi
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x100cf923
mov edx, dword [ebp + 8]
mov eax, 0x1505
nop word cs:[eax + eax]
nop dword [eax]
mov esi, eax
shl esi, 5
add esi, eax
movzx eax, byte [edx]
inc edx
add eax, esi
dec ecx
jne 0x100cf910
pop esi
pop ebp
ret
mov eax, 0x1505
pop esi
pop ebp
ret
Function at 0x100fc5b0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, dword [ebp + 8]
test eax, eax
je 0x100fc608
lea edi, [edx + eax*2]
xor ebx, ebx
movzx esi, byte [edx + 1]
cmp byte [edx], ch
lea edx, [edx + 2]
lea eax, [ebx + esi]
jne 0x100fc600
cmp eax, ebx
jb 0x100fc676
cmp eax, dword [ebp + 0x10]
ja 0x100fc682
add ebx, dword [ebp + 0xc]
nop word cs:[eax + eax]
nop
test esi, esi
je 0x100fc602
dec esi
cmp byte [ebx], cl
lea ebx, [ebx + 1]
jne 0x100fc5f0
jmp 0x100fc65f
ja 0x100fc608
cmp edx, edi
mov ebx, eax
jne 0x100fc5c2
mov edx, dword [ebp + 0x18]
test edx, edx
je 0x100fc663
mov esi, dword [ebp + 0x14]
movzx ecx, cx
mov al, 1
add edx, esi
nop dword [eax]
movzx ebx, byte [esi]
lea edi, [esi + 1]
test bl, bl
js 0x100fc640
mov esi, edi
sub ecx, ebx
jns 0x100fc657
jmp 0x100fc665
cmp edi, edx
je 0x100fc66c
movzx edi, byte [esi + 1]
and ebx, 0x7f
add esi, 2
shl ebx, 8
or ebx, edi
sub ecx, ebx
js 0x100fc665
xor al, 1
cmp esi, edx
jne 0x100fc620
jmp 0x100fc665
xor eax, eax
jmp 0x100fc665
mov al, 1
and al, 1
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x10186524
call sym.core::option::unwrap_failed::h400a3d34e496ce4a
push 0x10186534
push eax
push ebx
call sym.core::slice::index::slice_index_order_fail::h40cd09a6386d1bdc
push 0x10186534
push dword [ebp + 0x10]
push eax
call sym.core::slice::index::slice_end_index_len_fail::hb7bcdcb5c84f7e98
Function at 0x1010fb40
Capabilities:
Allocate thread local storage

Disassembly:
sub esp, 0xc
call dword [sym.imp.kernel32.dll_TlsAlloc]
mov dword [0x1011d190], eax
cmp eax, 0xffffffff
je sym._pthread_tls_init.cold.12
add esp, 0xc
ret

Function at 0x10110050
Capabilities:
Print debug messages

Disassembly:
test eax, eax
je 0x10110080
push edi
push esi
push ebx
mov ebx, eax
add esp, 0xffffff80
mov dword [esp], eax
call sym._pthread_spin_destroy
cmp eax, 1
je 0x10110081
mov dword [ebx], 0xffffffff
sub esp, 0xffffff80
pop ebx
pop esi
pop edi
ret
ret
lea ebx, [esp + 0x15]
xor eax, eax
mov esi, str.Error_cleaning_up_spin_keys_for_thread
mov ecx, 0xa
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
lea edi, [esp + 0x3d]
mov ecx, 0x43
rep stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea edx, [esp + 0x3c]
mov dword [esp + 8], 0xa
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__ultoa]
cmp byte [esp + 0x3c], 0
mov eax, 0x27
jne 0x101100d5
jmp 0x101100e3
cmp eax, 0x6a
je 0x101100ed
add eax, 1
cmp byte [ebx + eax], 0
jne 0x101100d0
cmp eax, 0x6a
je 0x101100ed
mov byte [esp + eax + 0x15], 0xa
mov byte [esp + eax + 0x16], 0
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push eax
call sym._abort
lea esi, [esi]
Function at 0x10110190
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
cmp dword [0x101c21f0], 1
je 0x101101a5
call sym.__pthread_once_raw.part.5.constprop.11
mov eax, dword [0x1011d190]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
sub esp, 4
mov esi, eax
test eax, eax
je 0x101101d0
add esp, 0x2c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
call sym._pop_pthread_mem
mov ebx, eax
mov eax, dword [entry4]
test eax, eax
je 0x101101bc
test ebx, ebx
je 0x101101bc
mov dword [ebx + 0x24], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebx + 0x3c], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateEventA]
mov dword [ebx + 0x1c], 0xffffffff
mov dword [ebx + 0x18], eax
sub esp, 0x10
lea eax, [ebx + 0x38]
call sym._replace_spin_keys.constprop.10
mov esi, dword [sym.imp.kernel32.dll_GetCurrentProcess]
mov dword [ebx + 0x64], 0
mov dword [ebx + 0x14], 0
call esi
mov ebp, eax
call dword [sym.imp.kernel32.dll_GetCurrentThread]
mov edi, eax
call esi
lea edx, [ebx + 0x14]
mov dword [esp + 8], ebp
mov dword [esp + 0x18], 2
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_DuplicateHandle]
sub esp, 0x1c
test eax, eax
je sym.___pthread_self_lite.cold.13
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [ebx + 0x68], 0
mov dword [ebx + 0x6c], eax
movzx eax, byte [ebx + 0x20]
sub esp, 4
and eax, 0xffffffcf
or eax, 0x10
mov byte [ebx + 0x20], al
mov eax, dword [0x1011d190]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
sub esp, 8
test eax, eax
je sym.___pthread_self_lite.cold.13
add esp, 0x2c
mov esi, ebx
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x10110410
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push esi
push ebx
sub esp, 0x10
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x10110440
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x101104f0
add esp, 0x10
mov eax, 1
pop ebx
pop esi
pop edi
ret 0xc
cmp eax, 1
je 0x10110520
cmp eax, 3
jne 0x1011042a
mov eax, dword [0x1011d190]
cmp eax, 0xffffffff
je 0x1011042a
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
test eax, eax
je 0x1011042a
test byte [eax + 0x20], 0x30
je 0x10110550
mov eax, dword [eax + 0xb4]
test eax, eax
je 0x10110483
call sym.__pthread_cleanup_dest.part.8
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x101104b5
mov dword [esp], eax
mov esi, dword [sym.imp.kernel32.dll_CloseHandle]
call esi
mov eax, dword [ebx + 0x18]
sub esp, 4
test eax, eax
je 0x101104a7
mov dword [esp], eax
call esi
sub esp, 4
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x14], 0
lea eax, [ebx + 0x1c]
mov dword [esp], eax
call sym._pthread_mutex_destroy
lea eax, [ebx + 0x38]
call sym._replace_spin_keys.constprop.10
mov eax, ebx
call sym._push_pthread_mem
mov eax, dword [0x1011d190]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
sub esp, 8
jmp 0x1011042a
mov eax, dword [0x101c21cc]
test eax, eax
je 0x1011042a
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
mov dword [0x101c21cc], 0
sub esp, 4
jmp 0x1011042a
mov dword [esp + 4], sym._SetThreadName_VEH_4
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_AddVectoredExceptionHandler]
sub esp, 8
mov dword [0x101c21cc], eax
mov eax, 1
add esp, 0x10
pop ebx
pop esi
pop edi
ret 0xc
mov edx, dword [ebx + 0x68]
mov eax, dword [eax + 0x18]
test edx, edx
jne 0x101105c2
test eax, eax
je 0x1011056a
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov eax, dword [ebx + 0xb4]
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x68], 1
test eax, eax
je 0x10110587
call sym.__pthread_cleanup_dest.part.8
lea edi, [ebx + 0x1c]
lea esi, [ebx + 0x38]
test byte [ebx + 0x24], 4
je 0x101105f1
mov eax, dword [ebx + 0x14]
mov dword [ebx], 0xdeadbeef
test eax, eax
je 0x101105ac
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov dword [ebx + 0x14], 0
mov dword [esp], edi
call sym._pthread_mutex_destroy
mov eax, esi
jmp 0x101104c3
test eax, eax
je 0x101105d2
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
lea eax, [ebx + 0x1c]
mov dword [ebx + 0x18], 0
mov dword [esp], eax
call sym._pthread_mutex_destroy
lea eax, [ebx + 0x38]
call sym._replace_spin_keys.constprop.10
jmp 0x1011042a
mov dword [esp], edi
call sym._pthread_mutex_destroy
mov eax, esi
call sym._replace_spin_keys.constprop.10
jmp 0x1011042a
Function at 0x1011061a
Capabilities:
Set thread local storage value

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x28
mov eax, dword [ecx]
mov esi, eax
mov dword [ebp - 0x1c], eax
call sym.__fpreset
mov dword [esp], 0x1011d188
lea ebx, [esi + 0x1c]
call sym._pthread_mutex_lock
mov dword [esp], ebx
call sym._pthread_mutex_lock
cmp dword [0x101c21f0], 1
je 0x10110655
call sym.__pthread_once_raw.part.5.constprop.11
mov esi, dword [ebp - 0x1c]
mov eax, dword [0x1011d190]
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
push edi
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi + 0x3c], eax
mov dword [esp], ebx
call sym._pthread_mutex_unlock
lea eax, [esi + 0x70]
mov dword [esp + 4], 0
mov dword [esp], eax
call sym.__setjmp3
test eax, eax
je 0x10110723
mov dword [esp], 0x1011d188
call sym._pthread_mutex_lock
mov esi, dword [ebp - 0x1c]
lea ebx, [esi + 0x1c]
mov dword [esp], ebx
call sym._pthread_mutex_lock
mov eax, esi
mov esi, dword [esi + 4]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x101106c8
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
push ecx
mov eax, dword [ebp - 0x1c]
cmp dword [eax + 0x14], 0
mov dword [eax + 0x18], 0
je 0x1011076d
mov dword [esp], ebx
call sym._pthread_mutex_unlock
mov dword [esp], ebx
call sym._pthread_mutex_destroy
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x1c], 0xffffffff
mov dword [eax + 0x68], 1
mov ebx, dword [sym.imp.kernel32.dll_Sleep]
mov dword [esp], 0x1011d188
call sym._pthread_mutex_unlock
test eax, eax
jne 0x101107b1
mov dword [esp], 0
call ebx
push eax
jmp 0x10110703
mov dword [esp], 0x1011d188
call sym._pthread_mutex_unlock
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 8]
test eax, eax
je 0x101107aa
mov edx, dword [edx + 4]
mov dword [esp], edx
call eax
mov ebx, eax
mov dword [esp], 0x1011d188
call sym._pthread_mutex_lock
mov eax, dword [ebp - 0x1c]
mov dword [eax + 4], ebx
mov eax, dword [eax + 0xb4]
test eax, eax
je 0x101106a4
call sym.__pthread_cleanup_dest.part.8
jmp 0x101106a4
mov edi, dword [ebp - 0x1c]
mov dword [edi], 0xdeadbeef
mov dword [esp], ebx
call sym._pthread_mutex_unlock
mov dword [esp], ebx
call sym._pthread_mutex_destroy
mov eax, edi
call sym._push_pthread_mem
mov eax, dword [0x1011d190]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
push edx
push edx
jmp 0x101106fd
mov ebx, pe_nt_image_headers32
jmp 0x10110743
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__endthreadex]
lea esi, [esi]