joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40ff0c
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x4211f8]
je 0x40ff27
inc edi
cmp edi, 0x17
jb 0x40ff18
cmp edi, 0x17
jae 0x4100a7
push ebp
push 3
call fcn.00416daa
cmp eax, 1
pop ecx
je 0x410073
push 3
call fcn.00416daa
test eax, eax
pop ecx
jne 0x40ff5b
cmp dword [0x42062c], 1
je 0x410073
cmp ebx, 0xfc
je 0x4100a6
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x421d48
push ebp
call fcn.0040bf5b
add esp, 0xc
test eax, eax
je 0x40ff91
push esi
push esi
push esi
push esi
push esi
call fcn.004073f7
add esp, 0x14
push 0x104
mov esi, 0x421d61
push esi
push 0
mov byte [0x421e65], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40ffd5
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.0040bf5b
add esp, 0xc
test eax, eax
je 0x40ffd5
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.004073f7
add esp, 0x14
push esi
call fcn.00409a40
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x41001a
push esi
call fcn.00409a40
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x42205c
push 0x41c59c
sub ecx, eax
push ecx
push eax
call fcn.00411f46
add esp, 0x14
test eax, eax
je 0x41001a
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.004073f7
add esp, 0x14
jmp 0x41001c
xor esi, esi
push 0x41c598
push ebx
push ebp
call fcn.00411e85
add esp, 0xc
test eax, eax
je 0x41003c
push esi
push esi
push esi
push esi
push esi
call fcn.004073f7
add esp, 0x14
push dword [edi*8 + 0x4211fc]
push ebx
push ebp
call fcn.00411e85
add esp, 0xc
test eax, eax
je 0x41005e
push esi
push esi
push esi
push esi
push esi
call fcn.004073f7
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.00416bed
add esp, 0xc
jmp 0x4100a6
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x4100a6
cmp ebp, 0xffffffff
je 0x4100a6
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x4211fc]
push dword [esi]
call fcn.00409a40
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x416bed
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.0040d6f8
xor ebx, ebx
cmp dword [0x4222ec], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x416cc3
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x416da3
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x416da3
push eax
call fcn.0040d68a
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x4222ec], eax
call esi
push eax
call fcn.0040d68a
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x4222f0], eax
call esi
push eax
call fcn.0040d68a
mov dword [0x4222f4], eax
lea eax, [ebp - 0xc]
push eax
call fcn.0040af58
test eax, eax
pop ecx
pop ecx
je 0x416c91
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.004073f7
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x416cc3
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.0040d68a
cmp eax, ebx
pop ecx
mov dword [0x4222fc], eax
je 0x416cc3
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0040d68a
pop ecx
mov dword [0x4222f8], eax
mov eax, dword [0x4222f8]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x416d48
cmp dword [0x4222fc], ecx
je 0x416d48
push eax
call fcn.0040d701
push dword [0x4222fc]
mov esi, eax
call fcn.0040d701
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x416d48
cmp edi, ebx
je 0x416d48
call esi
cmp eax, ebx
je 0x416d15
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x416d15
test byte [ebp - 0x18], 1
jne 0x416d48
lea eax, [ebp - 0x10]
push eax
call fcn.0040af8f
test eax, eax
pop ecx
je 0x416d30
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.004073f7
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x416d3f
or dword [ebp + 0x10], 0x200000
jmp 0x416d83
or dword [ebp + 0x10], 0x40000
jmp 0x416d83
mov eax, dword [0x4222f0]
cmp eax, dword [ebp - 8]
je 0x416d83
push eax
call fcn.0040d701
cmp eax, ebx
pop ecx
je 0x416d83
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x416d83
mov eax, dword [0x4222f4]
cmp eax, dword [ebp - 8]
je 0x416d83
push eax
call fcn.0040d701
cmp eax, ebx
pop ecx
je 0x416d83
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4222ec]
call fcn.0040d701
cmp eax, ebx
pop ecx
je 0x416da3
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x416da5
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x9bd080
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.009bd1d0
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, pe_nt_image_headers32
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0x9bd0a6
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x9bd092
add dl, dl
jne 0x9bd0b1
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x9bd104
xor eax, eax
add dl, dl
jne 0x9bd0be
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x9bd1a5
add dl, dl
jne 0x9bd0cd
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x9bd0d8
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x9bd0e3
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x9bd0ee
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x9bd0fa
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x9bd09d
mov eax, 1
add dl, dl
jne 0x9bd112
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x9bd11d
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x9bd109
sub eax, ebx
mov ebx, 1
jne 0x9bd150
mov ecx, 1
add dl, dl
jne 0x9bd136
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x9bd141
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x9bd12d
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x9bd09d
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x9bd167
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x9bd172
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x9bd15e
cmp eax, 0x7d00
jae 0x9bd195
cmp eax, 0x500
jb 0x9bd190
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x9bd09d
cmp eax, 0x7f
ja 0x9bd198
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x9bd09d
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x9bd1c6
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x9bd09d
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x4017b8
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
movzx edx, word [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push ebx
xor ebx, ebx
mov esi, esi
mov eax, edx
xor ecx, ecx
and eax, 1
test al, al
je 0x4017e4
nop
lea esi, [esi]
shr edx, 1
inc ecx
mov eax, edx
and eax, 1
test al, al
jne 0x4017d8
mov dword [esi + ebx*4], ecx
inc ebx
test edx, edx
je 0x40180b
mov al, dl
xor ecx, ecx
xor al, 1
and al, 1
test al, al
je 0x401805
shr edx, 1
inc ecx
mov al, dl
xor al, 1
and al, 1
test al, al
jne 0x4017f8
mov dword [esi + ebx*4], ecx
inc ebx
jmp 0x4017c8
mov edx, 0x10
sub edx, ecx
mov dword [esi + ebx*4], edx
inc ebx
mov eax, ebx
pop ebx
pop esi
pop ebp
ret

Function at 0x413710
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
lea ebx, [esp + 0x24]
mov dword [esp], str.Mingw_w64_runtime_failure:_n
add eax, 0x40
mov dword [esp + 0xc], eax
call sym._fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._vfprintf
call sym._abort
jmp dbg.mark_section_writable

Function at 0x413770
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [0x4987e0]
test esi, esi
jle 0x41385d
mov edi, dword [0x4987e4]
xor ebx, ebx
lea edx, [edi + 4]
nop
mov ecx, dword [edx]
cmp ecx, eax
ja 0x4137a4
mov edi, dword [edx + 4]
add ecx, dword [edi + 8]
cmp eax, ecx
jb 0x413856
add ebx, 1
add edx, 0xc
cmp ebx, esi
jne 0x413790
mov dword [esp], eax
mov ebx, eax
call dbg.__mingw_GetSectionForAddress
test eax, eax
mov edi, eax
je 0x41389a
lea ebx, [esi + esi*2]
mov esi, dword [0x4987e4]
shl ebx, 2
add esi, ebx
mov dword [esi + 8], eax
mov dword [esi], 0
call dbg._GetPEImageBase
add eax, dword [edi + 0xc]
mov dword [esi + 4], eax
lea eax, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], eax
mov eax, dword [0x4987e4]
mov eax, dword [eax + ebx + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x41387a
mov eax, dword [esp + 0x28]
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x41384f
sub eax, 0x40
and eax, 0xffffffbf
je 0x41384f
mov eax, dword [esp + 0x20]
add ebx, dword [0x4987e4]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0xc], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
je 0x413864
add dword [0x4987e0], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
xor esi, esi
jmp 0x4137ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call dbg.__report_error
mov eax, dword [0x4987e4]
mov eax, dword [eax + ebx + 4]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call dbg.__report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error
lea esi, [esi]
Function at 0x413d60
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x498b88
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x498b80]
sub esp, 4
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
je 0x413db5
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x413dae
test esi, esi
je 0x413dae
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x413d90
mov dword [esp], 0x498b88
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x413fd0
Capabilities:
Enumerate pe sections

Disassembly:
push esi
push ebx
mov edx, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
add edx, dword [edx + 0x3c]
movzx esi, word [edx + 6]
movzx eax, word [edx + 0x14]
test esi, esi
lea eax, [edx + eax + 0x18]
je 0x414008
xor ecx, ecx
nop
mov edx, dword [eax + 0xc]
cmp edx, ebx
ja 0x413ffe
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x41400a
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x413ff0
xor eax, eax
pop ebx
pop esi
ret
Function at 0x415440
Capabilities:
Check mutex on windows
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov ebx, dword [ebp + 8]
mov dword [esp], ebx
call sym._strlen
mov esi, eax
lea eax, [eax + 0x41]
and eax, 0xfffffff0
call fcn.004142e0
mov edx, 0x326d
sub esp, eax
lea eax, [esp + 0x1b]
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
lea edi, [esp + 0xc]
mov word [esp + 0x18], dx
mov dword [esp + 0xc], 0x2d636367
mov dword [esp], eax
mov dword [esp + 0x10], 0x656d6873
mov dword [esp + 0x14], 0x64742d6d
mov byte [esp + 0x1a], 0x2d
call sym._memcpy
lea eax, [esi + 0x10]
lea edx, [edi + eax]
mov dword [ebp - 0x20], eax
mov dword [edx], 0x61616161
mov dword [edx + 4], 0x61616161
mov dword [edx + 8], 0x61616161
mov dword [edx + 0xc], 0x61616161
mov dword [edx + 0x10], 0x61616161
mov dword [edx + 0x14], 0x61616161
mov dword [edx + 0x18], 0x61616161
mov dword [edx + 0x1c], 0x61616161
mov dword [ebp - 0x24], edx
mov byte [esp + esi + 0x3c], 0
mov byte [esp + esi + 0x1b], 0
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
sub esp, 0xc
mov byte [edi + esi + 0xf], 0x2d
mov dword [ebp - 0x1c], eax
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
test eax, eax
mov edx, dword [ebp - 0x24]
je 0x41552f
int3
mov dword [ebp - 0x24], edx
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_FindAtomA]
sub esp, 4
test ax, ax
mov edx, dword [ebp - 0x24]
jne 0x4155d3
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x24], edx
mov dword [esp], eax
call sym._malloc
mov edx, dword [ebp - 0x24]
mov ebx, eax
mov eax, 0x20
bt ebx, eax
jae 0x41556a
mov byte [edx], 0x41
add edx, 1
sub eax, 1
jne 0x415562
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_AddAtomA]
sub esp, 4
test ax, ax
je 0x4155d0
lea ecx, [esi + 0x31]
mov esi, dword [ebp - 0x20]
movzx eax, ax
mov edx, edi
mov dword [esp], esi
call dbg.get_ptr_from_atom
cmp eax, ebx
mov esi, eax
je 0x4155ea
mov dword [esp], ebx
call sym._free
mov edi, dword [ebp - 0x1c]
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
sub esp, 4
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
int3
lea ecx, [esi + 0x31]
mov esi, dword [ebp - 0x20]
movzx eax, ax
mov edx, edi
mov dword [esp], esi
call dbg.get_ptr_from_atom
mov esi, eax
jmp 0x4155a4
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], 0
mov dword [esp], ebx
mov dword [esp + 8], eax
call sym._memset
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4155a4
mov dword [esp], ebx
call dword [ebp + 0x10]
jmp 0x4155a4
Function at 0x422140
Capabilities:
Allocate thread local storage

Disassembly:
push ebx
sub esp, 0x18
mov ebx, dword [0x4995d0]
test ebx, ebx
je 0x422170
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [ebx], eax
mov eax, dword [0x4995d0]
test eax, eax
je 0x422195
cmp dword [eax], 0xffffffff
je 0x4221b8
add esp, 0x18
pop ebx
ret
mov dword [esp + 8], sym.___shmem_winpthreads_init__pthread_tls_shmem
mov dword [esp + 4], 4
mov dword [esp], str._pthread_tls_shmem
call sym.___shmem_winpthreads_grab
mov ebx, eax
mov dword [0x4995d0], eax
jmp 0x42214e
mov dword [esp + 8], sym.___shmem_winpthreads_init__pthread_tls_shmem
mov dword [esp + 4], 4
mov dword [esp], str._pthread_tls_shmem
call sym.___shmem_winpthreads_grab
mov dword [0x4995d0], eax
jmp 0x42215f
call sym._abort
lea esi, [esi]
Function at 0x422650
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov eax, dword [0x4995d4]
test eax, eax
je 0x4227a4
call sym.__pthread_once_raw.constprop.5
mov eax, dword [0x4995d0]
test eax, eax
je 0x4227d0
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x422690
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
call sym._pop_pthread_mem
test eax, eax
mov ebx, eax
je 0x42281c
mov eax, dword [entry3]
test eax, eax
je 0x42281c
mov dword [ebx + 0x24], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebx + 0x38], 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 esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
sub esp, 0x10
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], 0xffffffff
mov dword [ebx + 0x34], 0xffffffff
mov dword [ebx + 0x60], 0
mov dword [ebx + 0x14], 0
call esi
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov edi, eax
call esi
mov edx, eax
lea eax, [ebx + 0x14]
mov dword [esp + 0x18], 2
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebp
mov dword [esp + 4], edi
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
sub esp, 0x1c
test eax, eax
je 0x422823
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [ebx + 0x68], eax
movzx eax, byte [ebx + 0x20]
sub esp, 4
mov dword [ebx + 0x64], 0
and eax, 0xffffffcf
or eax, 0x10
mov byte [ebx + 0x20], al
mov eax, dword [0x4995d0]
test eax, eax
je 0x4227f6
mov dword [esp + 4], ebx
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
je 0x422823
mov eax, ebx
jmp 0x422688
mov dword [esp + 8], 0
mov dword [esp + 4], 4
mov dword [esp], str._pthread_tls_once_shmem
call sym.___shmem_winpthreads_grab
mov dword [0x4995d4], eax
jmp 0x422664
mov dword [esp + 8], sym.___shmem_winpthreads_init__pthread_tls_shmem
mov dword [esp + 4], 4
mov dword [esp], str._pthread_tls_shmem
call sym.___shmem_winpthreads_grab
mov dword [0x4995d0], eax
jmp 0x422676
mov dword [esp + 8], sym.___shmem_winpthreads_init__pthread_tls_shmem
mov dword [esp + 4], 4
mov dword [esp], str._pthread_tls_shmem
call sym.___shmem_winpthreads_grab
mov dword [0x4995d0], eax
jmp 0x422783
xor eax, eax
jmp 0x422688
call sym._abort
nop
lea esi, [esi]
Function at 0x422d90
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
cmp dword [esp + 0x24], 3
je 0x422db0
add esp, 0x14
mov eax, 1
pop ebx
pop esi
ret 0xc
mov eax, dword [0x4995d0]
test eax, eax
je 0x422f20
mov eax, dword [eax]
cmp eax, 0xffffffff
je 0x422d9c
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
mov ebx, eax
je 0x422d9c
test byte [eax + 0x20], 0x30
je 0x422e70
mov eax, dword [eax + 0xb0]
test eax, eax
jne 0x422f10
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x422e20
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 0x422e12
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
mov edx, dword [ebx + 0xac]
mov dword [ebx + 0x34], 0xffffffff
test edx, edx
je 0x422f76
mov eax, dword [0x4995d0]
test eax, eax
je 0x422f50
mov dword [esp + 4], 0
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
mov eax, 1
add esp, 0x14
pop ebx
pop esi
ret 0xc
mov eax, dword [eax + 0x64]
test eax, eax
mov eax, dword [ebx + 0x18]
jne 0x422ed0
test eax, eax
je 0x422e8a
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov eax, dword [ebx + 0xb0]
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x64], 1
test eax, eax
jne 0x422f00
test byte [ebx + 0x24], 4
je 0x422ee7
mov eax, dword [ebx + 0x14]
mov dword [ebx], 0xdeadbeef
test eax, eax
je 0x422e19
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x422e19
test eax, eax
je 0x422ee0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov dword [ebx + 0x18], 0
lea eax, [ebx + 0x1c]
mov dword [esp], eax
call sym._pthread_mutex_destroy
mov dword [ebx + 0x34], 0xffffffff
jmp 0x422d9c
call sym.__pthread_cleanup_dest.part.3
jmp 0x422ea2
call sym.__pthread_cleanup_dest.part.3
jmp 0x422dee
mov dword [esp + 8], sym.___shmem_winpthreads_init__pthread_tls_shmem
mov dword [esp + 4], 4
mov dword [esp], str._pthread_tls_shmem
call sym.___shmem_winpthreads_grab
mov dword [0x4995d0], eax
jmp 0x422dbd
mov dword [esp + 8], sym.___shmem_winpthreads_init__pthread_tls_shmem
mov dword [esp + 4], 4
mov dword [esp], str._pthread_tls_shmem
call sym.___shmem_winpthreads_grab
mov dword [0x4995d0], eax
jmp 0x422e4d
mov eax, ebx
call sym._push_pthread_mem.part.0
jmp 0x422e40
Function at 0x424110
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov esi, dword [esp + 0x20]
call sym.___pthread_self_lite
mov ebx, eax
mov dword [eax + 4], esi
mov eax, dword [eax + 0xb0]
test eax, eax
jne 0x42418b
test byte [ebx + 0x20], 0x30
je 0x424192
mov eax, dword [0x4995d0]
test eax, eax
je 0x42421b
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
mov ebx, eax
je 0x424182
cmp dword [eax + 0x14], 0
je 0x4241a5
mov esi, dword [eax + 4]
mov dword [eax + 0x64], 1
mov eax, dword [eax + 0x18]
test eax, eax
je 0x424175
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
test byte [ebx + 0x24], 4
mov dword [ebx + 0x18], 0
jne 0x4241ef
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__endthreadex]
call sym.__pthread_cleanup_dest.part.3
jmp 0x42412d
add ebx, 0x6c
mov dword [esp + 4], 1
mov dword [esp], ebx
call sym._longjmp
mov dword [eax], 0xdeadbeef
mov eax, dword [eax + 0x18]
test eax, eax
je 0x4241bc
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
cmp dword [ebx + 0xac], 0
mov dword [ebx + 0x18], 0
mov esi, dword [ebx + 4]
je 0x424212
mov eax, dword [0x4995d0]
test eax, eax
je 0x424241
mov dword [esp + 4], 0
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push edx
push edx
jmp 0x424182
mov eax, dword [ebx + 0x14]
mov dword [ebx], 0xdeadbeef
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
cmp dword [ebx + 0xac], 0
mov dword [ebx + 0x14], 0
jne 0x4241cf
mov eax, ebx
call sym._push_pthread_mem.part.0
jmp 0x4241cf
mov dword [esp + 8], sym.___shmem_winpthreads_init__pthread_tls_shmem
mov dword [esp + 4], 4
mov dword [esp], str._pthread_tls_shmem
call sym.___shmem_winpthreads_grab
mov dword [0x4995d0], eax
jmp 0x424140
mov dword [esp + 8], sym.___shmem_winpthreads_init__pthread_tls_shmem
mov dword [esp + 4], 4
mov dword [esp], str._pthread_tls_shmem
call sym.___shmem_winpthreads_grab
mov dword [0x4995d0], eax
jmp 0x4241d8