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

Disassembly:
push rbp
push rbx
lea rbp, [rsp]
mov qword [rbp + 0x18], rcx
mov qword [rbp + 0x20], rdx
mov rax, qword [sym.imp.sfml_graphics_2.dll_vtable_for_sf::Transformable]
lea rdx, [rax + 0x10]
mov rax, qword [rbp + 0x18]
mov qword [rax], rdx
mov rax, qword [rbp + 0x18]
mov rdx, qword [rbp + 0x20]
mov rdx, qword [rdx + 8]
mov qword [rax + 8], rdx
mov rax, qword [rbp + 0x18]
mov rdx, qword [rbp + 0x20]
mov rdx, qword [rdx + 0x10]
mov qword [rax + 0x10], rdx
mov rax, qword [rbp + 0x20]
movss xmm0, dword [rax + 0x18]
mov rax, qword [rbp + 0x18]
movss dword [rax + 0x18], xmm0
mov rax, qword [rbp + 0x18]
mov rdx, qword [rbp + 0x20]
mov rdx, qword [rdx + 0x1c]
mov qword [rax + 0x1c], rdx
mov rax, qword [rbp + 0x18]
mov rdx, qword [rbp + 0x20]
mov rcx, qword [rdx + 0x24]
mov rbx, qword [rdx + 0x2c]
mov qword [rax + 0x24], rcx
mov qword [rax + 0x2c], rbx
mov rcx, qword [rdx + 0x34]
mov rbx, qword [rdx + 0x3c]
mov qword [rax + 0x34], rcx
mov qword [rax + 0x3c], rbx
mov rcx, qword [rdx + 0x44]
mov rbx, qword [rdx + 0x4c]
mov qword [rax + 0x44], rcx
mov qword [rax + 0x4c], rbx
mov rcx, qword [rdx + 0x54]
mov rbx, qword [rdx + 0x5c]
mov qword [rax + 0x54], rcx
mov qword [rax + 0x5c], rbx
mov rax, qword [rbp + 0x20]
movzx edx, byte [rax + 0x64]
mov rax, qword [rbp + 0x18]
mov byte [rax + 0x64], dl
mov rax, qword [rbp + 0x18]
mov rdx, qword [rbp + 0x20]
mov rcx, qword [rdx + 0x68]
mov rbx, qword [rdx + 0x70]
mov qword [rax + 0x68], rcx
mov qword [rax + 0x70], rbx
mov rcx, qword [rdx + 0x78]
mov rbx, qword [rdx + 0x80]
mov qword [rax + 0x78], rcx
mov qword [rax + 0x80], rbx
mov rcx, qword [rdx + 0x88]
mov rbx, qword [rdx + 0x90]
mov qword [rax + 0x88], rcx
mov qword [rax + 0x90], rbx
mov rcx, qword [rdx + 0x98]
mov rbx, qword [rdx + 0xa0]
mov qword [rax + 0x98], rcx
mov qword [rax + 0xa0], rbx
mov rax, qword [rbp + 0x20]
movzx edx, byte [rax + 0xa8]
mov rax, qword [rbp + 0x18]
mov byte [rax + 0xa8], dl
nop
pop rbx
pop rbp
ret
Function at 0x140013c80
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push rbp
push rbx
lea rbp, [rsp]
mov qword [rbp + 0x18], rcx
mov qword [rbp + 0x20], rdx
mov rax, qword [rbp + 0x18]
mov rdx, qword [rbp + 0x20]
mov rdx, qword [rdx + 8]
mov qword [rax + 8], rdx
mov rax, qword [rbp + 0x18]
mov rdx, qword [rbp + 0x20]
mov rdx, qword [rdx + 0x10]
mov qword [rax + 0x10], rdx
mov rax, qword [rbp + 0x20]
movss xmm0, dword [rax + 0x18]
mov rax, qword [rbp + 0x18]
movss dword [rax + 0x18], xmm0
mov rax, qword [rbp + 0x18]
mov rdx, qword [rbp + 0x20]
mov rdx, qword [rdx + 0x1c]
mov qword [rax + 0x1c], rdx
mov rax, qword [rbp + 0x18]
mov rdx, qword [rbp + 0x20]
mov rcx, qword [rdx + 0x24]
mov rbx, qword [rdx + 0x2c]
mov qword [rax + 0x24], rcx
mov qword [rax + 0x2c], rbx
mov rcx, qword [rdx + 0x34]
mov rbx, qword [rdx + 0x3c]
mov qword [rax + 0x34], rcx
mov qword [rax + 0x3c], rbx
mov rcx, qword [rdx + 0x44]
mov rbx, qword [rdx + 0x4c]
mov qword [rax + 0x44], rcx
mov qword [rax + 0x4c], rbx
mov rcx, qword [rdx + 0x54]
mov rbx, qword [rdx + 0x5c]
mov qword [rax + 0x54], rcx
mov qword [rax + 0x5c], rbx
mov rax, qword [rbp + 0x20]
movzx edx, byte [rax + 0x64]
mov rax, qword [rbp + 0x18]
mov byte [rax + 0x64], dl
mov rax, qword [rbp + 0x18]
mov rdx, qword [rbp + 0x20]
mov rcx, qword [rdx + 0x68]
mov rbx, qword [rdx + 0x70]
mov qword [rax + 0x68], rcx
mov qword [rax + 0x70], rbx
mov rcx, qword [rdx + 0x78]
mov rbx, qword [rdx + 0x80]
mov qword [rax + 0x78], rcx
mov qword [rax + 0x80], rbx
mov rcx, qword [rdx + 0x88]
mov rbx, qword [rdx + 0x90]
mov qword [rax + 0x88], rcx
mov qword [rax + 0x90], rbx
mov rcx, qword [rdx + 0x98]
mov rbx, qword [rdx + 0xa0]
mov qword [rax + 0x98], rcx
mov qword [rax + 0xa0], rbx
mov rax, qword [rbp + 0x20]
movzx edx, byte [rax + 0xa8]
mov rax, qword [rbp + 0x18]
mov byte [rax + 0xa8], dl
mov rax, qword [rbp + 0x18]
pop rbx
pop rbp
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004e6af0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x004e6b00]
mov dword [rax], 1
mov rax, qword [0x004e6b10]
mov dword [rax], 1
mov rax, qword [0x004e6ae0]
mov dword [rax], 1
mov rax, qword [0x004e69b0]
cmp word [rax], 0x5a4d
jne 0x401067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x004e6ad0]
mov dword [0x0050e00c], ecx
mov eax, dword [rax]
test eax, eax
jne 0x4010b0
mov ecx, 1
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x004e6a90]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x004e5fb0]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 2
call sym.__set_app_type
jmp 0x401084
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x401108
cmp dx, 0x20b
jne 0x401067
cmp dword [rax + 0x84], 0xe
jbe 0x401067
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x401067
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401067
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x401067

Function at 0x401ad0
Capabilities:
Write file on windows

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call dbg.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sym.vfprintf
call sym.abort
nop
nop word [rax + rax]
Function at 0x401b40
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x0050e7f4]
mov r12, rcx
mov rdi, rdx
mov rbx, r8
test esi, esi
jle 0x401cc0
mov rax, qword [0x0050e7f8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x401b8c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x401c11
inc ecx
add rax, 0x28
cmp ecx, esi
jne 0x401b70
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x401d02
mov rax, qword [0x0050e7f8]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call dbg._GetPEImageBase
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x0050e7f8]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x401d11
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x401c0b
sub eax, 4
and eax, 0xfffffffb
jne 0x401c78
inc dword [0x0050e7f4]
cmp ebx, 8
jae 0x401c40
test bl, 4
jne 0x401cd0
test ebx, ebx
je 0x401c33
movzx eax, byte [rdi]
mov byte [r12], al
test bl, 2
jne 0x401cf0
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, ebx
dec ebx
mov rdx, qword [rdi + rax - 8]
mov qword [r12 + rax - 8], rdx
cmp ebx, 8
jb 0x401c33
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rdi + rdx]
mov qword [r12 + rdx], rcx
cmp eax, ebx
jb 0x401c58
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
add rsi, qword [0x0050e7f8]
mov qword [rsi + 8], rcx
mov r9, rsi
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401c0b
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor esi, esi
jmp 0x401b96
mov eax, dword [rdi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rdi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x401c33
mov ebx, ebx
movzx eax, word [rdi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x401c33
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
mov rax, qword [0x0050e7f8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rsi + 0x18]
call dbg.__report_error
nop
nop dword [rax]

Function at 0x4024f0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x0050eae0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x0050eac0]
test rbx, rbx
je 0x402544
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x40253b
test r12, r12
je 0x40253b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x402520
lea rcx, [0x0050eae0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x402770
Capabilities:
Parse pe header

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

Function at 0x402790
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 0x4027d5
dec ecx
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp r8, rdx
ja 0x4027cc
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x4027d7
add rax, 0x28
cmp rax, r9
jne 0x4027b8
xor eax, eax
ret

Function at 0x402880
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x004e69b0]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x4028f1
mov rcx, r10
call sym._ValidateImageBase.part.0
test eax, eax
je 0x4028f1
movsxd rax, dword [r10 + 0x3c]
mov rcx, r9
sub rcx, r10
add r10, rax
movzx eax, word [r10 + 0x14]
lea r8, [r10 + rax + 0x18]
movzx eax, word [r10 + 6]
test eax, eax
je 0x4028ee
dec eax
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
mov edx, dword [r8 + 0xc]
mov rax, rdx
cmp rcx, rdx
jb 0x4028e5
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x4028f1
add r8, 0x28
cmp r8, r9
jne 0x4028d0
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x4029d0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x004e69b0]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x402a3f
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402a3f
movsxd rax, dword [r9 + 0x3c]
mov rcx, r8
sub rcx, r9
add r9, rax
movzx eax, word [r9 + 0x14]
movzx edx, word [r9 + 6]
lea rax, [r9 + rax + 0x18]
test edx, edx
je 0x402a3d
dec edx
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x402a34
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x402a48
add rax, 0x28
cmp rax, r9
jne 0x402a20
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x402a60
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x004e69b0]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x402ad8
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402ad8
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x402ad8
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x402ad8
dec ecx
lea rcx, [rcx + rcx*4]
lea r10, [rdx + rcx*8 + 0x28]
nop word [rax + rax]
mov r9d, dword [rdx + 0xc]
mov rcx, r9
cmp rax, r9
jb 0x402acc
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x402ae0
add rdx, 0x28
cmp rdx, r10
jne 0x402ab8
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x402aef
dec r8d
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x402afd
mov edx, dword [rax + 0xc]
test edx, edx
je 0x402ad5
test r8d, r8d
jg 0x402ae8
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret
Function at 0x40f390
Capabilities:
Check for time delay via gettickcount
Check for time delay via queryperformancecounter

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
lea eax, [rdx - 1]
mov r13, rcx
mov r12d, edx
cmp eax, 0xfffffffd
ja 0x40f4c0
mov rax, qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
lea r15, [rsp + 0x30]
mov rcx, r15
mov qword [rsp + 0x28], rax
call rax
test eax, eax
je 0x40f500
mov rbx, qword [rsp + 0x30]
test rbx, rbx
jle 0x40f3ed
lea rcx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
jne 0x40f4d0
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov eax, eax
mov esi, r12d
mov rdi, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rbp, qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r14, qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
add rsi, rax
jmp 0x40f438
test rbx, rbx
jle 0x40f429
lea rcx, [rsp + 0x38]
call r14
test eax, eax
jne 0x40f468
call rbp
mov eax, eax
cmp rsi, rax
jbe 0x40f495
mov r12d, esi
sub r12d, eax
mov edx, r12d
mov rcx, r13
call rdi
mov r12d, eax
cmp eax, 0x102
jne 0x40f495
test rbx, rbx
jne 0x40f418
mov rax, qword [rsp + 0x28]
mov rcx, r15
call rax
test eax, eax
je 0x40f4b0
mov rbx, qword [rsp + 0x30]
jmp 0x40f418
movabs rax, 0x20c49ba5e353f7cf
imul rbx
mov rax, rbx
sar rax, 0x3f
sar rdx, 7
sub rdx, rax
mov rax, qword [rsp + 0x38]
mov rcx, rdx
cqo
idiv rcx
cmp rsi, rax
ja 0x40f432
mov eax, r12d
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rbx, 0xffffffffffffffff
jmp 0x40f429
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov r12d, eax
jmp 0x40f495
movabs rdx, 0x20c49ba5e353f7cf
mov rax, rbx
imul rdx
mov rax, rbx
sar rax, 0x3f
sar rdx, 7
sub rdx, rax
mov rax, qword [rsp + 0x38]
mov rcx, rdx
cqo
idiv rcx
jmp 0x40f3f5
mov rbx, 0xffffffffffffffff
jmp 0x40f3ed
Function at 0x40f510
Capabilities:
Check for time delay via gettickcount
Check for time delay via queryperformancecounter

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
lea eax, [r9 - 1]
mov r13d, ecx
mov r14, rdx
mov edi, r8d
cmp eax, 0xfffffffd
ja 0x40f670
lea rax, [rsp + 0x30]
mov dword [rsp + 0xa8], r9d
mov qword [rsp + 0x28], rax
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov qword [rsp + 0x20], rax
call rax
mov r9d, dword [rsp + 0xa8]
test eax, eax
je 0x40f6b0
mov rbx, qword [rsp + 0x30]
test rbx, rbx
jle 0x40f58e
lea rcx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov r9d, dword [rsp + 0xa8]
test eax, eax
jne 0x40f680
mov dword [rsp + 0xa8], r9d
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r9d, dword [rsp + 0xa8]
mov eax, eax
mov esi, r9d
mov rbp, qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov r15, qword [sym.imp.KERNEL32.dll_GetTickCount]
add rsi, rax
jmp 0x40f5e4
test rbx, rbx
jle 0x40f5d4
lea rcx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
jne 0x40f618
call r15
mov eax, eax
cmp rsi, rax
jbe 0x40f645
mov r9d, esi
sub r9d, eax
mov r8d, edi
mov rdx, r14
mov ecx, r13d
call rbp
mov r12d, eax
cmp eax, 0x102
jne 0x40f645
test rbx, rbx
jne 0x40f5c0
mov rcx, qword [rsp + 0x28]
mov rax, qword [rsp + 0x20]
call rax
test eax, eax
je 0x40f660
mov rbx, qword [rsp + 0x30]
jmp 0x40f5c0
movabs rax, 0x20c49ba5e353f7cf
imul rbx
mov rax, rbx
sar rax, 0x3f
sar rdx, 7
sub rdx, rax
mov rax, qword [rsp + 0x38]
mov rcx, rdx
cqo
idiv rcx
cmp rsi, rax
ja 0x40f5de
mov eax, r12d
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rbx, 0xffffffffffffffff
jmp 0x40f5d4
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov r12d, eax
jmp 0x40f645
movabs rdx, 0x20c49ba5e353f7cf
mov rax, rbx
imul rdx
mov rax, rbx
sar rax, 0x3f
sar rdx, 7
sub rdx, rax
mov rax, qword [rsp + 0x38]
mov rcx, rdx
cqo
idiv rcx
jmp 0x40f5a6
mov rbx, 0xffffffffffffffff
jmp 0x40f58e
Function at 0x40ffa0
Capabilities:
Print debug messages

Disassembly:
sub rsp, 0x98
movabs rax, 0x6c6320726f727245
movabs rdx, 0x7520676e696e6165
mov qword [rsp + 0x20], rax
movabs rax, 0x6b5f6e6970732070
mov qword [rsp + 0x28], rdx
movabs rdx, 0x20726f6620737965
mov qword [rsp + 0x30], rax
movabs rax, 0x20646165726874
mov qword [rsp + 0x38], rdx
xor edx, edx
mov qword [rsp + 0x40], rax
xor eax, eax
mov qword [rsp + 0x48], rdx
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x80], 0
mov word [rsp + 0x88], ax
mov byte [rsp + 0x8a], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsp + 0x47]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x4100b1
mov eax, 0x28
lea rcx, [rsp + 0x20]
jmp 0x410089
inc rax
cmp rax, 0x6b
je 0x4100a6
cmp byte [rcx + rax], 0
movsxd rdx, eax
jne 0x410080
cmp edx, 0x6a
je 0x4100a6
lea eax, [rdx + 1]
cdqe
mov byte [rsp + rdx + 0x20], 0xa
mov byte [rsp + rax + 0x20], 0
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sym.abort
mov eax, 0x28
mov edx, 0x27
lea rcx, [rsp + 0x20]
jmp 0x41009a
Function at 0x4104b0
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
push r13
push r12
push rsi
push rbx
sub rsp, 0x48
cmp dword [0x0050f5d0], 1
je 0x41055e
lea rcx, [0x004e1130]
lea rbx, [0x0050f5d0]
call sym.pthread_spin_lock
mov r12, qword [0x0050f580]
test r12, r12
jne 0x410501
jmp 0x4106f8
mov rax, qword [r12 + 0x18]
test rax, rax
je 0x4106c0
mov r12, rax
cmp qword [r12], rbx
jne 0x4104f0
inc dword [r12 + 0x10]
lea r13, [r12 + 8]
lea rcx, [0x004e1130]
call sym.pthread_spin_unlock
mov rcx, r13
call sym.pthread_mutex_lock
mov ebx, dword [0x0050f5d0]
test ebx, ebx
jne 0x410580
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x004e1148], eax
cmp eax, 0xffffffff
je sym.__pthread_self_lite.cold
mov dword [0x0050f5d0], 1
mov rcx, r13
call sym.pthread_mutex_unlock
mov rcx, r12
call sym.leaveOnceObject.part.0
mov ecx, dword [0x004e1148]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
je 0x4105b0
mov rax, r12
add rsp, 0x48
pop rbx
pop rsi
pop r12
pop r13
ret
cmp ebx, 1
je 0x41054e
mov ecx, 2
call qword [dbg.__acrt_iob_func]
mov r9d, ebx
lea r8, [0x0050f5d0]
lea rdx, str._once__p_is__d_n
mov rcx, rax
call sym.fprintf
jmp 0x41054e
call sym.pop_pthread_mem
cmp qword [sym.__dyn_tls_pthread], 0
mov rbx, rax
je 0x410572
test rax, rax
je 0x410572
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor ecx, ecx
xor r9d, r9d
xor r8d, r8d
mov dword [rbx + 0x70], eax
mov edx, 1
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x38], 0xffffffffffffffff
lea rcx, [rbx + 0x68]
mov qword [rbx + 0x30], rax
call sym.pthread_spin_destroy
cmp eax, 1
je 0x41071d
mov rsi, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rbx + 0x68], 0xffffffffffffffff
mov dword [rbx + 0xb8], 0
mov qword [rbx + 0x28], 0
call rsi
mov r13, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov r12, rax
call rsi
mov dword [rsp + 0x30], 2
mov r8, r13
mov rdx, r12
mov dword [rsp + 0x28], 0
mov rcx, rax
lea r9, [rbx + 0x28]
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je sym.__pthread_self_lite.cold
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov ecx, dword [0x004e1148]
mov rdx, rbx
mov dword [rbx + 0xbc], 0
mov dword [rbx + 0xc0], eax
movzx eax, byte [rbx + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [rbx + 0x40], al
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je sym.__pthread_self_lite.cold
mov r12, rbx
mov rax, r12
add rsp, 0x48
pop rbx
pop rsi
pop r12
pop r13
ret
mov edx, 0x20
mov ecx, 1
call sym.calloc
mov qword [rax], rbx
mov dword [rax + 0x10], 1
mov qword [r12 + 0x18], rax
mov r12, rax
lea r13, [r12 + 8]
xor edx, edx
mov rcx, r13
call sym.pthread_mutex_init
jmp 0x410511
mov edx, 0x20
mov ecx, 1
call sym.calloc
mov qword [rax], rbx
mov r12, rax
mov dword [rax + 0x10], 1
mov qword [0x0050f580], rax
jmp 0x4106e1
call sym.replace_spin_keys.part.0
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x410bb0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r14
push r13
push r12
sub rsp, 0x20
test edx, edx
jne 0x410be0
test r8, r8
je 0x410c90
mov eax, 1
add rsp, 0x20
pop r12
pop r13
pop r14
ret
cmp edx, 1
je 0x410cc0
cmp edx, 3
jne 0x410bc7
mov ecx, dword [0x004e1148]
cmp ecx, 0xffffffff
je 0x410bc7
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
je 0x410bc7
test byte [rax + 0x40], 0x30
je 0x410cf0
mov rcx, qword [rax + 0x1d8]
test rcx, rcx
je 0x410c22
call sym._pthread_cleanup_dest.part.0
mov rcx, qword [r12 + 0x28]
test rcx, rcx
je 0x410c4d
mov r13, qword [sym.imp.KERNEL32.dll_CloseHandle]
call r13
mov rcx, qword [r12 + 0x30]
test rcx, rcx
je 0x410c43
call r13
pxor xmm0, xmm0
movups xmmword [r12 + 0x28], xmm0
lea rcx, [r12 + 0x38]
call sym.pthread_mutex_destroy
lea rcx, [r12 + 0x68]
call sym.pthread_spin_destroy
cmp eax, 1
je 0x410d84
mov qword [r12 + 0x68], 0xffffffffffffffff
mov rcx, r12
call sym.push_pthread_mem
mov ecx, dword [0x004e1148]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x410bc7
mov rcx, qword [0x0050f590]
test rcx, rcx
je 0x410bc7
call qword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
mov qword [0x0050f590], 0
jmp 0x410bc7
lea rdx, [sym.SetThreadName_VEH]
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
mov qword [0x0050f590], rax
mov eax, 1
add rsp, 0x20
pop r12
pop r13
pop r14
ret
mov rcx, qword [rax + 0x30]
mov eax, dword [rax + 0xbc]
test eax, eax
jne 0x410d90
test rcx, rcx
je 0x410d0d
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [r12 + 0x1d8]
mov qword [r12 + 0x30], 0
mov dword [r12 + 0xbc], 1
test rcx, rcx
je 0x410d34
call sym._pthread_cleanup_dest.part.0
lea r13, [r12 + 0x38]
lea r14, [r12 + 0x68]
test byte [r12 + 0x44], 4
je 0x410dd0
mov rcx, qword [r12 + 0x28]
mov dword [r12], 0xdeadbeef
test rcx, rcx
je 0x410d62
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [r12 + 0x28], 0
mov rcx, r13
call sym.pthread_mutex_destroy
mov rcx, r14
call sym.pthread_spin_destroy
cmp eax, 1
jne 0x410c6a
call sym.replace_spin_keys.part.0
nop dword [rax]
test rcx, rcx
je 0x410d9b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [r12 + 0x30], 0
lea rcx, [r12 + 0x38]
call sym.pthread_mutex_destroy
lea rcx, [r12 + 0x68]
call sym.pthread_spin_destroy
cmp eax, 1
je 0x410d84
mov qword [r12 + 0x68], 0xffffffffffffffff
jmp 0x410bc7
mov rcx, r13
call sym.pthread_mutex_destroy
mov rcx, r14
call sym.pthread_spin_destroy
cmp eax, 1
jne 0x410dbd
jmp 0x410d84

Function at 0x411870
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x004e1148], eax
cmp eax, 0xffffffff
je sym.pthread_tls_init.cold
add rsp, 0x28
ret
Function at 0x412100
Capabilities:
Hijack thread execution
Resume thread
Suspend thread

Disassembly:
push r12
push rbx
sub rsp, 0x28
mov r12, rcx
lea rcx, [0x004e1138]
mov ebx, edx
call sym.pthread_mutex_lock
mov rax, qword [0x0050f5a8]
test rax, rax
je 0x412170
mov r9, qword [0x0050f5b0]
lea r8, [rax - 1]
xor edx, edx
cmp rax, 1
jne 0x41214e
jmp 0x4121f0
cmp rax, rdx
je 0x412170
lea r8, [rax - 1]
cmp r8, rdx
jb 0x412170
lea rax, [rdx + r8]
shr rax, 1
mov rcx, rax
shl rcx, 4
add rcx, r9
cmp r12, qword [rcx + 8]
je 0x412190
jb 0x412140
lea rdx, [rax + 1]
cmp r8, rdx
jae 0x41214e
lea rcx, [0x004e1138]
call sym.pthread_mutex_unlock
mov eax, 3
add rsp, 0x28
pop rbx
pop r12
ret
mov rax, qword [rcx]
test rax, rax
je 0x412170
cmp qword [rax + 0x1d8], r12
jne 0x412170
test byte [rax + 0x40], 0xc
jne 0x412170
mov edx, dword [rax + 0xbc]
test edx, edx
jne 0x412170
mov rax, qword [rax + 0x28]
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x412170
lea rcx, [0x004e1138]
call sym.pthread_mutex_unlock
test ebx, ebx
je 0x4121e8
sub ebx, 2
cmp ebx, 0x15
ja 0x412200
mov rcx, r12
add rsp, 0x28
pop rbx
pop r12
jmp sym.pthread_cancel
xor eax, eax
jmp 0x412181
cmp r12, qword [r9 + 8]
jne 0x412170
mov rax, qword [r9]
jmp 0x412193
mov eax, 0x16
jmp 0x412181