joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14014fd64
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0xa8
mov rax, qword [rsp + 0xb0]
mov rcx, qword [rax + 8]
call fcn.140152360
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0xb0]
mov rcx, qword [rax + 0x28]
call fcn.14015f5c4
mov dword [rsp + 0x24], eax
mov rax, qword [rsp + 0xb0]
mov rcx, qword [rax + 8]
call fcn.14015f5c4
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x28]
cmp dword [rsp + 0x24], eax
jge 0x14014fdd2
mov eax, dword [rsp + 0x24]
mov dword [rsp + 0x38], eax
jmp 0x14014fdda
mov eax, dword [rsp + 0x28]
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x38]
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0xb8]
movsxd rcx, dword [rsp + 0x24]
imul rax, rcx
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x20], 0
movsxd rax, dword [rsp + 0x24]
mov rcx, qword [rsp + 0x50]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x30], rax
jmp 0x14014fe2b
movsxd rax, dword [rsp + 0x28]
mov rcx, qword [rsp + 0x30]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x30], rax
cmp dword [rsp + 0x20], 0
jne 0x14014ffd7
mov rax, qword [rsp + 0x50]
cmp qword [rsp + 0x30], rax
jge 0x14014ffd7
mov qword [rsp + 0x40], 0
movsxd rax, dword [rsp + 0x28]
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x30]
cqo
mov rcx, qword [rsp + 0x60]
idiv rcx
inc eax
mov dword [rsp + 0x3c], eax
mov rax, qword [rsp + 0xb0]
mov rax, qword [rax + 8]
mov rax, qword [rax + 8]
mov qword [rsp + 0x68], rax
xor edx, edx
mov eax, dword [0x1401cade0]
mov rcx, qword [rsp + 0x68]
div dword [rcx + 0x34]
inc eax
cmp dword [rsp + 0x3c], eax
jne 0x14014fea0
jmp 0x14014fe16
xor r9d, r9d
lea r8, [rsp + 0x40]
mov edx, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0x70]
call fcn.14016c148
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0
jne 0x14014ffc7
mov rcx, qword [rsp + 0x40]
call fcn.14016b730
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0
jne 0x14014ffc7
movsxd rax, dword [rsp + 0x24]
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x30]
cqo
mov rcx, qword [rsp + 0x78]
idiv rcx
mov rax, rdx
mov rcx, qword [rsp + 0xc0]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x90], rax
mov rcx, qword [rsp + 0x40]
call fcn.14016a720
mov qword [rsp + 0x88], rax
movsxd rax, dword [rsp + 0x28]
mov qword [rsp + 0x80], rax
mov rax, qword [rsp + 0x30]
cqo
mov rcx, qword [rsp + 0x80]
idiv rcx
mov rax, rdx
mov rcx, qword [rsp + 0x88]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x58], rax
movsxd rax, dword [rsp + 0x48]
mov r8, rax
mov rdx, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x58]
call fcn.14018e690
mov rcx, qword [rsp + 0x40]
call fcn.14016a708
mov ecx, 1
imul rcx, rcx, 0
mov byte [rax + rcx], 0
cmp qword [rsp + 0x30], 0
jne 0x14014ffc7
cmp dword [rsp + 0xc8], 0
jne 0x14014ffc7
mov rax, qword [rsp + 0xb0]
mov rcx, qword [rax + 0x28]
call fcn.140160854
mov ecx, 1
imul rcx, rcx, 0x1c
mov rdx, qword [rsp + 0x58]
add rdx, rcx
mov rcx, rdx
mov edx, eax
call fcn.14017dae4
nop
mov rcx, qword [rsp + 0x40]
call fcn.14016c088
nop
jmp 0x14014fe16
mov eax, dword [rsp + 0x20]
add rsp, 0xa8
ret
Function at 0x1401826b0
Capabilities:
Encrypt data using salsa20 or chacha

Disassembly:
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
sub rsp, 0x48
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x20], rax
call fcn.1400a8888
test eax, eax
je 0x1401826d5
jmp 0x140182914
mov ecx, 5
call fcn.140188870
mov qword [rsp + 0x28], rax
mov rcx, qword [rsp + 0x28]
call fcn.140188820
cmp dword [rsp + 0x50], 0
jle 0x1401826fd
cmp qword [rsp + 0x58], 0
jne 0x140182724
mov eax, 4
imul rax, rax, 0
lea rcx, [0x1401d4280]
mov dword [rcx + rax], 0
mov rcx, qword [rsp + 0x28]
call fcn.1401887c0
nop
jmp 0x140182914
mov eax, 4
imul rax, rax, 0
lea rcx, [0x1401d4280]
cmp dword [rcx + rax], 0
jne 0x140182814
xor ecx, ecx
call fcn.140188d4c
mov qword [rsp + 0x30], rax
mov eax, 4
imul rax, rax, 0
lea rcx, [0x1401d4280]
add rcx, rax
mov rax, rcx
mov r8d, 0x10
lea rdx, str.expand_32_byte_k
mov rcx, rax
call fcn.14018e690
cmp qword [rsp + 0x30], 0
jne 0x1401827a6
mov eax, 4
imul rax, rax, 4
lea rcx, [0x1401d4280]
add rcx, rax
mov rax, rcx
mov r8d, 0x2c
xor edx, edx
mov rcx, rax
call fcn.14018ee10
nop
jmp 0x1401827cf
mov eax, 4
imul rax, rax, 4
lea rcx, [0x1401d4280]
add rcx, rax
mov rax, rcx
mov r8, rax
mov edx, 0x2c
mov rcx, qword [rsp + 0x30]
call fcn.140189004
nop
mov eax, 4
imul rax, rax, 0xc
lea rcx, [0x1401d4280]
mov edx, 4
imul rdx, rdx, 0xf
lea r8, [0x1401d4280]
mov eax, dword [rcx + rax]
mov dword [r8 + rdx], eax
mov eax, 4
imul rax, rax, 0xc
lea rcx, [0x1401d4280]
mov dword [rcx + rax], 0
mov byte [0x1401d4300], 0
xor eax, eax
cmp eax, 1
je 0x140182909
movzx eax, byte [0x1401d4300]
cmp dword [rsp + 0x50], eax
jg 0x140182872
movsxd rax, dword [rsp + 0x50]
movzx ecx, byte [0x1401d4300]
sub ecx, dword [rsp + 0x50]
movsxd rcx, ecx
lea rdx, [0x1401d42c0]
add rdx, rcx
mov rcx, rdx
mov r8, rax
mov rdx, rcx
mov rcx, qword [rsp + 0x20]
call fcn.14018e690
movzx eax, byte [0x1401d4300]
sub eax, dword [rsp + 0x50]
mov byte [0x1401d4300], al
jmp 0x140182909
movzx eax, byte [0x1401d4300]
test eax, eax
jle 0x1401828c2
movzx eax, byte [0x1401d4300]
mov r8d, eax
lea rdx, [0x1401d42c0]
mov rcx, qword [rsp + 0x20]
call fcn.14018e690
movzx eax, byte [0x1401d4300]
mov ecx, dword [rsp + 0x50]
sub ecx, eax
mov eax, ecx
mov dword [rsp + 0x50], eax
movzx eax, byte [0x1401d4300]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x20], rax
mov eax, 4
imul rax, rax, 0xc
lea rcx, [0x1401d4280]
mov eax, dword [rcx + rax]
inc eax
mov ecx, 4
imul rcx, rcx, 0xc
lea rdx, [0x1401d4280]
mov dword [rdx + rcx], eax
lea rdx, [0x1401d4280]
lea rcx, [0x1401d42c0]
call fcn.140182920
mov byte [0x1401d4300], 0x40
jmp 0x140182814
mov rcx, qword [rsp + 0x28]
call fcn.1401887c0
nop
add rsp, 0x48
ret
Function at 0x14000288c
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rdi, rdx
lea r8, [rsp + 0x60]
mov ebx, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
mov r8d, ebx
mov ecx, 0x1300
neg eax
sbb r9d, r9d
and qword [rsp + 0x30], 0
and r9d, dword [rsp + 0x60]
xor edx, edx
and dword [rsp + 0x28], 0
mov dword [rsp + 0x60], r9d
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x140002910
mov r8, qword [rdi]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x140004340]
cmp byte [rcx + rax], 0
je 0x140002910
dec r8
sub rdx, 1
jne 0x1400028f6
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret

Function at 0x1400034a0
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400034ea
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400034ea
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400034ea
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400034ea
cmp dword [rcx + 0x84], 0xe
jbe 0x1400034ea
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x1400034ec
xor al, al
add rsp, 0x28
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004aeae0]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x004aeaf0]
mov dword [rax], 1
mov rax, qword [0x004aeb00]
mov dword [rax], 1
mov rax, qword [0x004aead0]
mov dword [rax], 1
mov rax, qword [0x004ae990]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x004aeac0]
mov dword [0x004d4008], edx
mov eax, dword [rax]
test eax, eax
je 0x4010a0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x004aea80]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x004ade40]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401075
movsxd rcx, dword [rax + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x401058
movzx ecx, word [rax + 0x18]
cmp cx, 0x10b
je 0x401103
cmp cx, 0x20b
jne 0x401058
cmp dword [rax + 0x84], 0xe
jbe 0x401058
mov ecx, dword [rax + 0xf8]
xor edx, edx
test ecx, ecx
setne dl
jmp 0x401058
lea rcx, [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401058
mov r8d, dword [rax + 0xe8]
xor edx, edx
test r8d, r8d
setne dl
jmp 0x401058
Function at 0x40c1d0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x004d4644]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x40c358
mov rax, qword [0x004d4648]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x40c21c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x40c2a5
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x40c200
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x40c38d
mov rax, qword [0x004d4648]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call sym._GetPEImageBase
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x004d4648]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40c370
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40c29e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x40c300
add dword [0x004d4644], 1
cmp edi, 8
jae 0x40c2d3
test dil, 4
jne 0x40c344
test edi, edi
je 0x40c2c8
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x40c35f
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x40c2c8
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x40c2ec
jmp 0x40c2c8
add rsi, qword [0x004d4648]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40c29e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x40c2c8
xor esi, esi
jmp 0x40c227
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x40c2c8
mov rax, qword [0x004d4648]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop dword [rax]

Function at 0x40cae0
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004d4920]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004d4900]
test rbx, rbx
je 0x40cb34
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x40cb2b
test rsi, rsi
je 0x40cb2b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40cb10
lea rcx, [0x004d4920]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x40cd70
Capabilities:
Parse pe header

Disassembly:
cmp word [rcx], 0x5a4d
je 0x40cd80
xor eax, eax
ret
jmp sym._ValidateImageBase.part.0

Function at 0x40cd90
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x40cdd1
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
mov r8d, dword [rax + 0xc]
cmp r8, rdx
mov rcx, r8
ja 0x40cdc8
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x40cdd3
add rax, 0x28
cmp rax, r9
jne 0x40cdb4
xor eax, eax
ret

Function at 0x40ce70
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004ae990]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x40cedd
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40cedd
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x40cedd
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x40ced4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40cedf
add rax, 0x28
cmp rax, r9
jne 0x40cec0
xor eax, eax
add rsp, 0x28
ret

Function at 0x40cfe0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004ae990]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x40d000
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40cff8
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x40d05d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x40d054
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40d064
add rax, 0x28
cmp rax, r9
jne 0x40d040
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x40d080
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x004ae990]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x40d0ee
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40d0ee
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x40d0ee
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x40d0ee
sub eax, 1
lea rax, [rax + rax*4]
lea rax, [rcx + rax*8 + 0x28]
mov r10d, dword [rcx + 0xc]
cmp rdx, r10
mov r8, r10
jb 0x40d0e5
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x40d0f5
add rcx, 0x28
cmp rcx, rax
jne 0x40d0d0
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x40d108
jmp 0x40d0ee
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x40d116
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x40d0ee
test r9d, r9d
jg 0x40d100
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x4198b0
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x004a6148], eax
je 0x4198ca
add rsp, 0x28
ret
call sym.abort
nop

Function at 0x419dd0
Capabilities:
Print debug messages

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x90
test rcx, rcx
mov rbx, rcx
je 0x419df3
call sym.pthread_spin_destroy
cmp eax, 1
je 0x419dfe
mov qword [rbx], 0xffffffffffffffff
add rsp, 0x90
pop rbx
pop rsi
pop rdi
ret
lea rdi, [rsp + 0x20]
xor eax, eax
mov ecx, 0xa
lea rsi, str.Error_cleaning_up_spin_keys_for_thread
rep movsd dword [rdi], dword [rsi]
lea rdi, [rsp + 0x48]
mov ecx, 0x43
rep stosb byte [rdi], al
lea rbx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rbx + 0x27]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x419e75
mov eax, 0x28
jmp 0x419e5a
add rax, 1
cmp rax, 0x6b
je 0x419e67
cmp byte [rbx + rax], 0
mov edx, eax
jne 0x419e50
cmp eax, 0x6a
jne 0x419e7a
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sym.abort
mov edx, 0x27
movsxd rax, edx
mov byte [rsp + rax + 0x20], 0xa
lea eax, [rdx + 1]
cdqe
mov byte [rsp + rax + 0x20], 0
jmp 0x419e67

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

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
cmp dword [0x004d5400], 1
je 0x419f36
call sym._pthread_once_raw.part.5.constprop.11
mov ecx, dword [0x004a6148]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x419f60
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call sym.pop_pthread_mem
cmp qword [sym.__dyn_tls_pthread], 0
mov rsi, rax
je 0x419f4a
test rax, rax
je 0x419f4a
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor r9d, r9d
xor r8d, r8d
mov edx, 1
xor ecx, ecx
mov dword [rsi + 0x70], eax
call qword [sym.imp.KERNEL32.dll_CreateEventA]
lea rcx, [rsi + 0x68]
mov qword [rsi + 0x38], 0xffffffffffffffff
mov qword [rsi + 0x30], rax
call sym.replace_spin_keys.constprop.10
mov rbx, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsi + 0xb8], 0
mov qword [rsi + 0x28], 0
call rbx
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rdi, rax
call rbx
mov dword [rsp + 0x30], 2
mov r8, rbp
mov rdx, rdi
mov dword [rsp + 0x28], 0
lea r9, [rsi + 0x28]
mov rcx, rax
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x41a050
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov rdx, rsi
mov ecx, dword [0x004a6148]
mov dword [rsi + 0xbc], 0
mov dword [rsi + 0xc0], eax
movzx eax, byte [rsi + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [rsi + 0x40], al
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x41a050
mov rbx, rsi
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call sym.abort
nop
nop word cs:[rax + rax]
Function at 0x41a1c0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
test edx, edx
jne 0x41a1e1
test r8, r8
je 0x41a280
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
cmp edx, 1
je 0x41a2b0
cmp edx, 3
jne 0x41a1d4
mov ecx, dword [0x004a6148]
cmp ecx, 0xffffffff
je 0x41a1d4
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x41a1d4
test byte [rax + 0x40], 0x30
je 0x41a2d0
mov rcx, qword [rax + 0x1d8]
test rcx, rcx
jne 0x41a3c5
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x41a24f
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rsi
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x41a23f
call rsi
mov qword [rbx + 0x30], 0
mov qword [rbx + 0x28], 0
lea rcx, [rbx + 0x38]
call sym.pthread_mutex_destroy
lea rcx, [rbx + 0x68]
call sym.replace_spin_keys.constprop.10
cmp qword [rbx + 0x1d0], 0
jne 0x41a35c
mov rcx, rbx
call sym.push_pthread_mem.part.2
jmp 0x41a35c
mov rcx, qword [0x004d53c0]
test rcx, rcx
je 0x41a1d4
call qword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
mov qword [0x004d53c0], 0
jmp 0x41a1d4
lea rdx, [sym.SetThreadName_VEH]
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
mov qword [0x004d53c0], rax
jmp 0x41a1d4
mov rcx, qword [rax + 0x30]
mov eax, dword [rax + 0xbc]
test eax, eax
jne 0x41a370
test rcx, rcx
je 0x41a2ed
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x1d8]
mov qword [rbx + 0x30], 0
mov dword [rbx + 0xbc], 1
test rcx, rcx
jne 0x41a3a0
test byte [rbx + 0x44], 4
lea rdi, [rbx + 0x38]
lea rsi, [rbx + 0x68]
je 0x41a3b0
mov rcx, qword [rbx + 0x28]
mov dword [rbx], 0xdeadbeef
test rcx, rcx
je 0x41a336
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
mov qword [rbx + 0x28], 0
call sym.pthread_mutex_destroy
mov rcx, rsi
call sym.replace_spin_keys.constprop.10
cmp qword [rbx + 0x1d0], 0
je 0x41a26f
xor edx, edx
mov ecx, dword [0x004a6148]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x41a1d4
test rcx, rcx
je 0x41a37b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbx + 0x38]
mov qword [rbx + 0x30], 0
call sym.pthread_mutex_destroy
lea rcx, [rbx + 0x68]
call sym.replace_spin_keys.constprop.10
jmp 0x41a1d4
call sym._pthread_cleanup_dest.part.8
jmp 0x41a30f
mov rcx, rdi
call sym.pthread_mutex_destroy
mov rcx, rsi
call sym.replace_spin_keys.constprop.10
jmp 0x41a1d4
call sym._pthread_cleanup_dest.part.8
jmp 0x41a222
Function at 0x41a3d0
Capabilities:
Set thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
mov rbp, rsp
sub rsp, 0x28
mov qword [rbp + 0x28], rcx
lea rcx, [0x004a6138]
call sym.pthread_mutex_lock
mov rax, qword [rbp + 0x28]
lea rbx, [rax + 0x38]
mov rcx, rbx
call sym.pthread_mutex_lock
cmp dword [0x004d5400], 1
je 0x41a409
call sym._pthread_once_raw.part.5.constprop.11
mov rdx, qword [rbp + 0x28]
mov ecx, dword [0x004a6148]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov rsi, qword [rbp + 0x28]
mov rcx, rbx
mov dword [rsi + 0x70], eax
call sym.pthread_mutex_unlock
mov rax, qword [rbp + 0x28]
mov rdx, rbp
lea rcx, [rax + 0xd0]
call sym._setjmp
test eax, eax
je 0x41a4dd
lea rcx, [0x004a6138]
call sym.pthread_mutex_lock
mov rax, qword [rbp + 0x28]
lea rbx, [rax + 0x38]
mov rcx, rbx
call sym.pthread_mutex_lock
mov rax, qword [rbp + 0x28]
mov rcx, qword [rax + 0x30]
mov rsi, qword [rax + 8]
test rcx, rcx
je 0x41a47c
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbp + 0x28]
cmp qword [rax + 0x28], 0
mov qword [rax + 0x30], 0
je 0x41a537
mov rcx, rbx
call sym.pthread_mutex_unlock
mov rcx, rbx
call sym.pthread_mutex_destroy
mov rax, qword [rbp + 0x28]
mov qword [rax + 0x38], 0xffffffffffffffff
mov dword [rax + 0xbc], 1
mov rbx, qword [sym.imp.KERNEL32.dll_Sleep]
lea rdi, [0x004a6138]
mov rcx, rdi
call sym.pthread_mutex_unlock
test eax, eax
jne 0x41a581
xor ecx, ecx
call rbx
jmp 0x41a4c7
lea rcx, [0x004a6138]
call sym.pthread_mutex_unlock
mov rax, qword [rbp + 0x28]
mov rax, qword [rax + 0x10]
test rax, rax
je 0x41a589
mov rdi, qword [rbp + 0x28]
mov rcx, qword [rdi + 8]
call rax
mov rbx, rax
nop
nop
lea rcx, [0x004a6138]
call sym.pthread_mutex_lock
mov rax, qword [rbp + 0x28]
mov rcx, qword [rax + 0x1d8]
mov qword [rax + 8], rbx
test rcx, rcx
je 0x41a455
call sym._pthread_cleanup_dest.part.8
jmp 0x41a455
mov rax, qword [rbp + 0x28]
mov rcx, rbx
mov dword [rax], 0xdeadbeef
call sym.pthread_mutex_unlock
mov rcx, rbx
call sym.pthread_mutex_destroy
cmp qword [rbp + 0x28], 0
je 0x41a56e
mov rax, qword [rbp + 0x28]
cmp qword [rax + 0x1d0], 0
jne 0x41a56e
mov rcx, rax
call sym.push_pthread_mem.part.2
xor edx, edx
mov ecx, dword [0x004a6148]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x41a4b9
mov ecx, esi
call qword [sym.imp.msvcrt.dll__endthreadex]
mov ebx, pe_nt_image_headers64
jmp 0x41a507