joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1405f8007
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 8], rbx
mov r11b, Ordinal_60
shl r11b, 0x9b
mov qword [rsp + 0x10], rdi
rcr r9b, 0xbf
sbb r10w, 0x923
test ch, 0xa6
sub edi, edi
movsx r10, si
movzx ebx, r8b
mov r8b, r11b
movsx r10d, bx
movsx r8, bp
mov r11, rcx
mov r8, rdi
dec r10b
movsx r10w, dl
nop
setns r10b
not r10b
movsx r10w, r12b
movzx r9d, byte [r11]
seto r10b
movzx r10d, byte [rdx]
jmp 0x1405f8066
inc r11
inc rdx
cmc
test ax, r9w
cmp r11b, sil
test bl, bl
jmp 0x1405f807b
je 0x1405f80b6
mov ecx, r8d
mov rax, 0x3e287308
movzx rax, si
mov eax, 0x8707b79c
rol eax, cl
cmp r8b, dl
cmp r10w, 0x573d
add al, r8b
cmp r13b, 0x22
xor r9b, al
jmp 0x1405f80ae
inc r8
test r12b, 0x15
stc
test r9b, r9b
jmp 0x1405f80be
je 0x1405f80cd
cmp r9b, r10b
je 0x1405f8055
cmp r9b, r10b
jmp 0x1405f80d5
jae 0x1405f80f3
or eax, 0xffffffff
movsx ebx, bx
mov rbx, rbx
mov rbx, qword [rsp + 8]
movsx rdi, bx
mov rdi, qword [rsp + 0x10]
ret
mov rbx, qword [rsp + 8]
seta dil
mov eax, edi
mov rdi, qword [rsp + 0x10]
ret
Function at 0x140001160
Capabilities:
Terminate process

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x28
mov rax, qword gs:[0x30]
mov rdi, qword [rax + 8]
mov rsi, qword [0x140003040]
xor eax, eax
lock cmpxchg qword [rsi], rdi
sete bl
je 0x1400011b9
cmp rdi, rax
je 0x1400011b9
mov r14, qword [sym.imp.KERNEL32.dll_Sleep]
nop dword [rax]
mov ecx, 0x3e8
call r14
xor eax, eax
lock cmpxchg qword [rsi], rdi
sete bl
je 0x1400011b9
cmp rdi, rax
jne 0x1400011a0
mov rdi, qword [0x140003048]
mov eax, dword [rdi]
cmp eax, 1
jne 0x1400011d3
mov ecx, 0x1f
call fcn.140001e40
jmp 0x1400011fa
cmp dword [rdi], 0
je 0x1400011e1
mov byte [0x1400060f0], 1
jmp 0x1400011fa
mov dword [rdi], 1
mov rcx, qword [0x140003060]
mov rdx, qword [0x140003068]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
mov eax, dword [rdi]
cmp eax, 1
jne 0x14000121a
mov rcx, qword [0x140003050]
mov rdx, qword [0x140003058]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
mov dword [rdi], 2
test bl, bl
je 0x140001223
xor eax, eax
xchg qword [rsi], rax
mov rax, qword [0x140003010]
mov rax, qword [rax]
test rax, rax
je 0x140001242
xor ecx, ecx
mov edx, 2
xor r8d, r8d
call qword [0x1400035d0]
call fcn.140001620
lea rcx, [0x140001ba0]
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [0x140003038]
mov qword [rcx], rax
lea rcx, [0x140001390]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__set_invalid_parameter_handler
call fcn.140001610
movsxd rdi, dword [0x1400060dc]
lea rcx, [rdi*8 + 8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov rsi, rax
test rdi, rdi
jle 0x1400012d8
mov r14d, edi
mov r15, qword [0x1400060e0]
xor r12d, r12d
nop dword [rax + rax]
mov rdi, qword [r15 + r12*8]
mov rcx, rdi
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
lea rbx, [rax*2 + 2]
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov qword [rsi + r12*8], rax
mov rcx, rax
mov rdx, rdi
mov r8, rbx
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
inc r12
cmp r14, r12
jne 0x1400012a0
jmp 0x1400012db
xor r14d, r14d
mov qword [rsi + r14*8], 0
mov qword [0x1400060e0], rsi
call fcn.140001460
mov rsi, qword [0x1400060e8]
call fcn.140001f40
mov qword [rax], rsi
mov ecx, dword [0x1400060dc]
mov rdx, qword [0x1400060e0]
mov r8, qword [0x1400060e8]
call fcn.140002680
mov dword [0x1400060f4], eax
cmp dword [0x1400060d4], 0
je 0x140001348
cmp byte [0x1400060f0], 0
jne 0x14000133a
call sub.api_ms_win_crt_runtime_l1_1_0.dll__cexit
mov eax, dword [0x1400060f4]
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
mov ecx, eax
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
int3
Function at 0x140001ad0
Capabilities:
Write file on windows

Disassembly:
push rsi
sub rsp, 0x30
mov rsi, rcx
mov qword [rsp + 0x48], rdx
mov qword [rsp + 0x50], r8
mov qword [rsp + 0x58], r9
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
lea rcx, str.Mingw_w64_runtime_failure:_n
mov edx, 0x1b
mov r8d, 1
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r8, qword [rsp + 0x28]
mov rcx, rax
mov rdx, rsi
call fcn.140002650
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
int3

Function at 0x140002370
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rax, qword [0x140003008]
movzx edx, word [rax]
cmp edx, 0x5a4d
jne 0x1400023db
movsxd rdx, dword [rax + 0x3c]
cmp dword [rax + rdx], 0x4550
jne 0x1400023db
add rax, rdx
movzx edx, word [rax + 0x18]
cmp edx, 0x20b
jne 0x1400023db
movzx edx, word [rax + 6]
test edx, edx
je 0x1400023db
sub rcx, qword [0x140003008]
movzx r8d, word [rax + 0x14]
add rax, r8
add rax, 0x18
jmp 0x1400023c8
add rax, 0x28
dec edx
je 0x1400023db
mov r8d, dword [rax + 0xc]
cmp rcx, r8
jb 0x1400023c0
add r8d, dword [rax + 8]
cmp rcx, r8
jae 0x1400023c0
ret
xor eax, eax
ret

Function at 0x1400023e0
Capabilities:
Parse pe header

Disassembly:
mov rcx, qword [0x140003008]
movzx edx, word [rcx]
xor eax, eax
cmp edx, 0x5a4d
jne 0x140002415
movsxd rdx, dword [rcx + 0x3c]
cmp dword [rcx + rdx], 0x4550
jne 0x140002415
movzx r8d, word [rcx + rdx + 0x18]
cmp r8d, 0x20b
jne 0x140002415
movzx eax, word [rcx + rdx + 6]
ret

Function at 0x140002490
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140003008]
movzx ecx, word [rax]
cmp ecx, 0x5a4d
jne 0x1400024bc
movsxd rcx, dword [rax + 0x3c]
cmp dword [rax + rcx], 0x4550
jne 0x1400024bc
movzx ecx, word [rax + rcx + 0x18]
cmp ecx, 0x20b
je 0x1400024be
xor eax, eax
ret
Function at 0x140001290
Capabilities:
Enumerate process modules

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x490
mov rax, qword [0x14000c040]
xor rax, rsp
mov qword [rsp + 0x480], rax
mov r14, rdx
mov edx, ecx
mov ecx, 8
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400012d7
xor al, al
jmp 0x140001455
mov dword [rsp + 0x40], 0x438
xor edx, edx
mov r8d, 0x434
lea rcx, [rsp + 0x44]
call sub.VCRUNTIME140.dll_memset
mov bpl, 1
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_Module32FirstW]
test eax, eax
je 0x140001448
nop word [rax + rax]
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x20]
call fcn.140002b90
nop
mov rax, qword [r14 + 8]
mov r9, qword [r14]
mov rbx, qword [rsp + 0x38]
mov r11, qword [rsp + 0x20]
cmp r9, rax
je 0x140001394
mov rdi, qword [rsp + 0x30]
nop dword [rax + rax]
lea rcx, [rsp + 0x20]
cmp rbx, 7
cmova rcx, r11
mov r10, r9
cmp qword [r9 + 0x18], 7
jbe 0x14000135a
mov r10, qword [r9]
mov r8, qword [r9 + 0x10]
cmp r8, rdi
jne 0x140001386
test r8, r8
je 0x14000138f
sub r10, rcx
nop dword [rax + rax]
movzx edx, word [rcx]
cmp word [r10 + rcx], dx
jne 0x140001386
add rcx, 2
sub r8, 1
jne 0x140001370
jmp 0x14000138f
add r9, 0x20
cmp r9, rax
jne 0x140001340
cmp r9, rax
jne 0x1400013fb
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edx, 7
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea rdx, str.Suspicious_module_found:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140002d40
lea rdx, [rsp + 0x20]
cmp qword [rsp + 0x38], 7
cmova rdx, qword [rsp + 0x20]
mov r8, qword [rsp + 0x30]
mov rcx, rax
call fcn.1400039c0
lea rdx, [0x140002f20]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
xor bpl, bpl
mov rbx, qword [rsp + 0x38]
mov r11, qword [rsp + 0x20]
cmp rbx, 7
jbe 0x140001432
lea rdx, [rbx*2 + 2]
mov rax, r11
cmp rdx, 0x1000
jb 0x14000142a
add rdx, 0x27
mov r11, qword [r11 - 8]
sub rax, r11
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000147d
mov rcx, r11
call fcn.14000415c
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_Module32NextW]
test eax, eax
jne 0x140001310
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, bpl
mov rcx, qword [rsp + 0x480]
xor rcx, rsp
call fcn.140004030
lea r11, [rsp + 0x490]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004ab870]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x004ab880]
mov dword [rax], 1
mov rax, qword [0x004ab890]
mov dword [rax], 1
mov rax, qword [0x004ab860]
mov dword [rax], 1
mov rax, qword [0x004ab720]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x004ab850]
mov dword [0x004cf008], 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 [0x004ab810]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x004aabc0]
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 0x4015a0
Capabilities:
Create process on windows

Disassembly:
push rbp
push rdi
sub rsp, 0xe8
lea rbp, [rsp + 0x80]
lea rdx, [rbp - 0x10]
mov eax, 0
mov ecx, 0xd
mov rdi, rdx
rep stosq qword [rdi], rax
mov dword [rbp - 0x10], 0x68
lea rax, [rbp - 0x30]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x10]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov edx, 0
lea rcx, str.C:WindowsSystem32_notepad.exe
mov rax, qword [sym.imp.KERNEL32.dll_CreateProcessA]
call rax
test eax, eax
sete al
test al, al
je 0x401653
lea rdx, str.Erro_ao_abrir_o_Bloco_de_Notas
mov rcx, qword [0x004ab150]
call method.std::basic_ostream_char__std::char_traits_char____std::operator____std.char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rdx, qword [method.std::basic_ostream_char__std::char_traits_char____std::endl_char__std.char_traits_char____std::basic_ostream_char__std::char_traits_char____]
mov rcx, rax
call method.std::ostream.operator___std::ostream____std::ostream__
mov eax, 0
jmp 0x401666
mov rax, qword [rbp - 0x28]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, dword [rbp - 0x20]
add rsp, 0xe8
pop rdi
pop rbp
ret
Function at 0x40ba00
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x004cf644]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x40bb88
mov rax, qword [0x004cf648]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x40ba4c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x40bad5
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x40ba30
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x40bbbd
mov rax, qword [0x004cf648]
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 [0x004cf648]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40bba0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40bace
sub eax, 0x40
and eax, 0xffffffbf
jne 0x40bb30
add dword [0x004cf644], 1
cmp edi, 8
jae 0x40bb03
test dil, 4
jne 0x40bb74
test edi, edi
je 0x40baf8
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x40bb8f
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 0x40baf8
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 0x40bb1c
jmp 0x40baf8
add rsi, qword [0x004cf648]
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 0x40bace
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 0x40baf8
xor esi, esi
jmp 0x40ba57
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x40baf8
mov rax, qword [0x004cf648]
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 0x40c310
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004cf920]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004cf900]
test rbx, rbx
je 0x40c364
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 0x40c35b
test rsi, rsi
je 0x40c35b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40c340
lea rcx, [0x004cf920]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x40c5a0
Capabilities:
Parse pe header

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

Function at 0x40c5c0
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 0x40c601
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 0x40c5f8
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x40c603
add rax, 0x28
cmp rax, r9
jne 0x40c5e4
xor eax, eax
ret

Function at 0x40c6a0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004ab720]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x40c70d
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40c70d
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 0x40c70d
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 0x40c704
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40c70f
add rax, 0x28
cmp rax, r9
jne 0x40c6f0
xor eax, eax
add rsp, 0x28
ret

Function at 0x40c810
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004ab720]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x40c830
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40c828
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 0x40c88d
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 0x40c884
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40c894
add rax, 0x28
cmp rax, r9
jne 0x40c870
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x40c8b0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x004ab720]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x40c91e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40c91e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x40c91e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x40c91e
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 0x40c915
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x40c925
add rcx, 0x28
cmp rcx, rax
jne 0x40c900
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x40c938
jmp 0x40c91e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x40c946
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x40c91e
test r9d, r9d
jg 0x40c930
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x419010
Capabilities:
Allocate thread local storage

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

Function at 0x419530
Capabilities:
Print debug messages

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x90
test rcx, rcx
mov rbx, rcx
je 0x419553
call sym.pthread_spin_destroy
cmp eax, 1
je 0x41955e
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 0x4195d5
mov eax, 0x28
jmp 0x4195ba
add rax, 1
cmp rax, 0x6b
je 0x4195c7
cmp byte [rbx + rax], 0
mov edx, eax
jne 0x4195b0
cmp eax, 0x6a
jne 0x4195da
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 0x4195c7

Function at 0x419680
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 [0x004d0400], 1
je 0x419696
call sym._pthread_once_raw.part.5.constprop.11
mov ecx, dword [0x004a2358]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x4196c0
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 0x4196aa
test rax, rax
je 0x4196aa
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 0x4197b0
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov rdx, rsi
mov ecx, dword [0x004a2358]
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 0x4197b0
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 0x419920
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 0x419941
test r8, r8
je 0x4199e0
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
cmp edx, 1
je 0x419a10
cmp edx, 3
jne 0x419934
mov ecx, dword [0x004a2358]
cmp ecx, 0xffffffff
je 0x419934
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
mov rbx, rax
je 0x419934
test byte [rax + 0x40], 0x30
je 0x419a30
mov rcx, qword [rax + 0x1d8]
test rcx, rcx
jne 0x419b25
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x4199af
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rsi
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x41999f
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 0x419abc
mov rcx, rbx
call sym.push_pthread_mem.part.2
jmp 0x419abc
mov rcx, qword [0x004d03c0]
test rcx, rcx
je 0x419934
call qword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
mov qword [0x004d03c0], 0
jmp 0x419934
lea rdx, [sym.SetThreadName_VEH]
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
mov qword [0x004d03c0], rax
jmp 0x419934
mov rcx, qword [rax + 0x30]
mov eax, dword [rax + 0xbc]
test eax, eax
jne 0x419ad0
test rcx, rcx
je 0x419a4d
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 0x419b00
test byte [rbx + 0x44], 4
lea rdi, [rbx + 0x38]
lea rsi, [rbx + 0x68]
je 0x419b10
mov rcx, qword [rbx + 0x28]
mov dword [rbx], 0xdeadbeef
test rcx, rcx
je 0x419a96
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 0x4199cf
xor edx, edx
mov ecx, dword [0x004a2358]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x419934
test rcx, rcx
je 0x419adb
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 0x419934
call sym._pthread_cleanup_dest.part.8
jmp 0x419a6f
mov rcx, rdi
call sym.pthread_mutex_destroy
mov rcx, rsi
call sym.replace_spin_keys.constprop.10
jmp 0x419934
call sym._pthread_cleanup_dest.part.8
jmp 0x419982