joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1424c90
Capabilities:
Terminate process

Disassembly:
cld
pop r11
jmp 0x1424c9d
inc rsi
mov byte [rdi], dl
inc rdi
mov dl, byte [rsi]
add ebx, ebx
jne 0x1424cad
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jb 0x1424c95
lea eax, [rcx + 1]
jmp 0x1424cbb
dec eax
call r11
adc eax, eax
call r11
adc eax, eax
add ebx, ebx
jne 0x1424cce
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jae 0x1424cb4
sub eax, 3
jb 0x1424cee
shl eax, 8
movzx edx, dl
or eax, edx
inc rsi
xor eax, 0xffffffff
je 0x1424d3d
sar eax, 1
movsxd rbp, eax
jb 0x1424d24
jmp 0x1424cfc
add ebx, ebx
jne 0x1424cfa
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x1424d24
inc ecx
add ebx, ebx
jne 0x1424d0a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x1424d24
call r11
adc ecx, ecx
add ebx, ebx
jne 0x1424d1d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jae 0x1424d0c
add ecx, 2
jmp 0x1424d29
call r11
adc ecx, ecx
cmp rbp, 0xfffffffffffffb00
adc ecx, 2
call fcn.01424c52
jmp 0x1424c9d
pop rsi
sub rsp, 0x28
lea rdi, [rsi + 0x1010000]
mov eax, dword [rdi]
or eax, eax
je 0x1424d99
mov ebx, dword [rdi + 4]
lea rcx, [rax + rsi + 0x1024000]
add rbx, rsi
add rdi, 8
call qword [sym.imp.KERNEL32.DLL_LoadLibraryA]
xchg rbp, rax
mov al, byte [rdi]
inc rdi
or al, al
je 0x1424d49
mov rcx, rdi
mov rdx, rdi
dec eax
repne scasb al, byte [rdi]
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
or rax, rax
je 0x1424d93
mov qword [rbx], rax
add rbx, 8
jmp 0x1424d69
jmp qword [sym.imp.KERNEL32.DLL_ExitProcess]
add rsp, 0x28
add rdi, 4
lea rbx, [rsi - 4]
xor eax, eax
mov al, byte [rdi]
inc rdi
or eax, eax
je 0x1424ddd
cmp al, 0xef
ja 0x1424dc5
add rbx, rax
mov rax, qword [rbx]
bswap rax
add rax, rsi
mov qword [rbx], rax
jmp 0x1424da5
and al, 0xf
shl eax, 0x10
mov ax, word [rdi]
add rdi, 2
or eax, eax
jne 0x1424db4
mov eax, dword [rdi]
add rdi, 4
jmp 0x1424db4
mov rbp, qword [sym.imp.KERNEL32.DLL_VirtualProtect]
lea rdi, [rsi - 0x1000]
mov ebx, 0x1000
push rax
mov r9, rsp
mov r8d, 4
mov rdx, rbx
mov rcx, rdi
sub rsp, 0x20
call rbp
lea rax, [rdi + 0x1af]
and byte [rax], 0x7f
and byte [rax + 0x28], 0x7f
lea r9, [rsp + 0x20]
mov r8, qword [r9]
mov rdx, rbx
mov rcx, rdi
call rbp
add rsp, 0x28
pop rbp
pop rdi
pop rsi
pop rbx
lea rax, [rsp - 0x80]
push 0
cmp rsp, rax
jne 0x1424e31
sub rsp, 0xffffffffffffff80
jmp 0x45bb20
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004054b0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x004054c0]
mov dword [rax], 1
mov rax, qword [0x004054d0]
mov dword [rax], 1
mov rax, qword [0x004054a0]
mov dword [rax], 1
mov rax, qword [0x00405390]
cmp word [rax], 0x5a4d
jne 0x401067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x00405490]
mov dword [0x0040800c], 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 [0x00405450]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x00405340]
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 0x402170
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 0x4021e0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x00408614]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x402388
mov rax, qword [0x00408618]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x40222c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x4022b7
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x402210
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x4023c2
mov rax, qword [0x00408618]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
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 [0x00408618]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x4023d1
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x4022b0
sub eax, 4
and eax, 0xfffffffb
jne 0x402340
add dword [0x00408614], 1
cmp ebx, 8
jae 0x4022e8
test bl, 4
jne 0x402390
test ebx, ebx
je 0x4022d9
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x4023b0
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x4022d9
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x40231a
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 rdi, qword [0x00408618]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x4022b0
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 edi, edi
jmp 0x402237
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x4022d9
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x4022d9
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
mov rax, qword [0x00408618]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call dbg.__report_error
nop
nop dword [rax]
Function at 0x402bb0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00408900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004088e0]
test rbx, rbx
je 0x402c04
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 0x402bfb
test r12, r12
je 0x402bfb
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x402be0
lea rcx, [0x00408900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x402e30
Capabilities:
Parse pe header

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

Function at 0x402e50
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 0x402e95
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp r8, rdx
ja 0x402e8c
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x402e97
add rax, 0x28
cmp rax, r9
jne 0x402e78
xor eax, eax
ret

Function at 0x402f40
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x00405390]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x402fb9
mov rcx, r10
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402fb9
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 0x402fb6
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
nop dword [rax]
mov edx, dword [r8 + 0xc]
mov rax, rdx
cmp rcx, rdx
jb 0x402fad
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x402fb9
add r8, 0x28
cmp r8, r9
jne 0x402f98
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x4030a0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x00405390]
xor eax, eax
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x40310f
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40310f
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 0x40310d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x403104
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x403118
add rax, 0x28
cmp rax, r9
jne 0x4030f0
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x403130
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x00405390]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x4031a8
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x4031a8
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x4031a8
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x4031a8
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r10, [rdx + rcx*8 + 0x28]
nop dword [rax + rax]
mov r9d, dword [rdx + 0xc]
mov rcx, r9
cmp rax, r9
jb 0x40319c
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x4031b0
add rdx, 0x28
cmp rdx, r10
jne 0x403188
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jmp 0x4031c0
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x4031ce
mov edx, dword [rax + 0xc]
test edx, edx
je 0x4031a5
test r8d, r8d
jg 0x4031b8
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret
Function at 0x402532
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
movsxd rax, dword [rcx + 0x3c]
xor r12d, r12d
lea rbx, [rsp + 0x38]
mov rsi, rcx
mov ebp, edx
mov edi, dword [rcx + rax + 0x88]
add rdi, rcx
mov eax, dword [rdi + 0x20]
mov r13d, dword [rdi + 0x24]
mov r14d, dword [rdi + 0x1c]
add rax, rcx
mov qword [rsp + 0x20], rax
lea rax, [rcx + r13]
add r14, rcx
mov qword [rsp + 0x28], rax
mov eax, dword [rdi + 0x18]
mov r15d, r12d
dec eax
cmp r12d, eax
ja 0x402679
mov rax, qword [rsp + 0x20]
test ebp, ebp
mov edx, dword [rax + r15*4]
lea r13, [rsi + rdx]
jne 0x4025c8
mov rcx, rbx
call fcn.0040195f
mov rdx, r13
mov rcx, rbx
call fcn.00427360
jmp 0x4025e0
cmp ebp, 1
jne 0x4025f5
mov rcx, rbx
call fcn.00401a6d
mov rdx, r13
mov rcx, rbx
call fcn.00427360
mov r13d, eax
mov rcx, rbx
call fcn.004507f0
test r13d, r13d
jne 0x402609
jmp 0x402679
cmp ebp, 2
je 0x402611
cmp ebp, 3
je 0x402628
cmp ebp, 4
je 0x402642
cmp ebp, 6
je 0x40265c
inc r12d
jmp 0x40257c
mov rcx, rbx
call fcn.00401662
mov rdx, r13
mov rcx, rbx
call fcn.00427360
jmp 0x4025e0
mov rcx, rbx
call fcn.0040187f
mov rdx, r13
mov rcx, rbx
call fcn.00427360
jmp 0x4025e0
mov rcx, rbx
call fcn.00401b59
mov rdx, r13
mov rcx, rbx
call fcn.00427360
jmp 0x4025e0
mov rcx, rbx
call fcn.00401c59
mov rdx, r13
mov rcx, rbx
call fcn.00427360
jmp 0x4025e0
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + r15*2]
mov eax, dword [r14 + rax*4]
add rax, rsi
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x40f160
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
movsxd rbp, dword [0x004a90b4]
mov rbx, rcx
mov rsi, rdx
mov rdi, r8
test ebp, ebp
jle 0x40f27a
mov rax, qword [0x004a90b8]
xor r9d, r9d
add rax, 8
mov r10, qword [rax]
cmp rbx, r10
jb 0x40f1ae
mov rdx, qword [rax + 8]
mov r11d, dword [rdx + 8]
add r10, r11
cmp rbx, r10
jb 0x40f260
add r9d, 1
add rax, 0x18
cmp r9d, ebp
jne 0x40f192
mov rcx, rbx
call fcn.0040ffa0
test rax, rax
mov r12, rax
je 0x40f2b2
lea rbp, [rbp + rbp*2]
shl rbp, 3
mov r13, rbp
add r13, qword [0x004a90b8]
mov qword [r13 + 0x10], rax
mov dword [r13], 0
call fcn.004100c0
mov edx, dword [r12 + 0xc]
mov r8d, 0x30
add rax, rdx
lea rdx, [rsp + 0x20]
mov qword [r13 + 8], rax
mov rax, qword [0x004a90b8]
mov rcx, qword [rax + rbp + 8]
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x40f295
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40f259
sub eax, 0x40
and eax, 0xffffffbf
je 0x40f259
mov r9, rbp
add r9, qword [0x004a90b8]
mov r8d, 0x40
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x40f281
add dword [0x004a90b4], 1
mov r8, rdi
mov rdx, rsi
mov rcx, rbx
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp sub.msvcrt.dll_memcpy
xor ebp, ebp
jmp 0x40f1bb
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.0040f0f0
mov rax, qword [0x004a90b8]
mov edx, dword [r12 + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbp + 8]
call fcn.0040f0f0
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.0040f0f0
nop
nop word cs:[rax + rax]

Function at 0x40feb0
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 0x40fef1
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 0x40fee8
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x40fef3
add rax, 0x28
cmp rax, r9
jne 0x40fed4
xor eax, eax
repz ret

Function at 0x40ffa0
Capabilities:
Enumerate pe sections

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rbx, qword [0x0048daa0]
cmp word [rbx], 0x5a4d
je 0x40ffc0
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
ret
mov rsi, rcx
mov rcx, rbx
call fcn.0040fe70
test eax, eax
je 0x40ffb4
sub rsi, rbx
mov rcx, rbx
mov rdx, rsi
add rsp, 0x28
pop rbx
pop rsi
jmp fcn.0040feb0
Function at 0x410210
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004a9a00]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004a99e0]
test rbx, rbx
je 0x410264
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 0x41025b
test rsi, rsi
je 0x41025b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x410240
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea rcx, [0x004a9a00]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp rax

Function at 0x4109c0
Capabilities:
Check mutex on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x80]
mov rdi, rcx
movsxd r12, edx
mov r13, r8
call sub.msvcrt.dll_strlen
mov rsi, rax
lea ebx, [rax + 0xf]
lea eax, [rax + 0x52]
cdqe
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.00410b80
sub rsp, rax
movsxd r14, esi
movabs rax, 0x656d68732d636367
lea r15, [rsp + 0x20]
lea rcx, [rsp + 0x2f]
mov r8, r14
mov rdx, rdi
mov qword [rsp + 0x20], rax
mov eax, 0x326d
mov dword [rsp + 0x28], 0x64742d6d
mov word [rsp + 0x2c], ax
movsxd rbx, ebx
mov byte [rsp + 0x2e], 0x2d
call sub.msvcrt.dll_memcpy
lea rax, [r15 + r14 + 0x10]
lea r14d, [rsi + 0x50]
movabs rdx, 0x6161616161616161
xor ecx, ecx
mov r8, r15
mov qword [rax], rdx
mov qword [rax + 8], rdx
mov qword [rax + 0x10], rdx
mov qword [rax + 0x18], rdx
mov qword [rax + 0x20], rdx
mov qword [rax + 0x28], rdx
mov qword [rax + 0x30], rdx
mov qword [rax + 0x38], rdx
movsxd rax, r14d
xor edx, edx
mov byte [rsp + rax + 0x20], 0
mov byte [rsp + rbx + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov byte [rsp + rbx + 0x20], 0x2d
mov rdi, rax
mov edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x410aa9
int3
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
jne 0x410b48
mov rcx, r12
call sub.msvcrt.dll_malloc
lea r9d, [rsi + 0x10]
mov rbx, rax
mov r10d, 0x40
bt rbx, r10
jae 0x410ae4
mov r11d, r14d
sub r11d, r10d
movsxd r11, r11d
mov byte [r15 + r11], 0x41
sub r10d, 1
jne 0x410ad0
mov dword [rbp - 0x54], r9d
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
mov r9d, dword [rbp - 0x54]
je 0x410b45
lea r8d, [rsi + 0x51]
movzx ecx, ax
mov rdx, r15
call fcn.00410940
cmp rax, rbx
mov rsi, rax
je 0x410b60
mov rcx, rbx
call fcn.0041af68
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, rsi
lea rsp, [rbp - 0x48]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
int3
lea r9d, [rsi + 0x10]
lea r8d, [rsi + 0x51]
movzx ecx, ax
mov rdx, r15
call fcn.00410940
mov rsi, rax
jmp 0x410b1f
xor edx, edx
mov r8, r12
mov rcx, rbx
call sub.msvcrt.dll_memset
test r13, r13
je 0x410b1f
mov rcx, rbx
call r13
jmp 0x410b1f
Function at 0x41bd80
Capabilities:
Allocate thread local storage

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, qword [0x004aa548]
test rbx, rbx
je 0x41bdb0
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [rbx], eax
mov rax, qword [0x004aa548]
test rax, rax
je 0x41bdd4
cmp dword [rax], 0xffffffff
je 0x41bdf5
add rsp, 0x20
pop rbx
ret
lea r8, [0x0041b210]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call fcn.00420f60
mov rbx, rax
mov qword [0x004aa548], rax
jmp 0x41bd91
lea r8, [0x0041b210]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call fcn.00420f60
mov qword [0x004aa548], rax
jmp 0x41bda5
call sub.msvcrt.dll_abort
nop
nop dword [rax + rax]

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

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rcx, qword [0x004aa550]
test rcx, rcx
je 0x41c3d0
call fcn.0041c200
mov rax, qword [0x004aa548]
test rax, rax
je 0x41c3f3
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x41c2d3
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call fcn.0041bbd0
test rax, rax
mov rbx, rax
je 0x41c43b
cmp qword [0x004ad050], 0
je 0x41c43b
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov edx, 1
mov dword [rbx + 0x68], eax
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rsi, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rbx + 0x30], rax
mov qword [rbx + 0x38], 0xffffffffffffffff
mov qword [rbx + 0x60], 0xffffffffffffffff
mov dword [rbx + 0xb0], 0
mov qword [rbx + 0x28], 0
call rsi
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rdi, rax
call rsi
mov dword [rsp + 0x30], 2
mov rcx, rax
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
lea r9, [rbx + 0x28]
mov r8, rbp
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x41c442
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [rbx + 0xb8], eax
movzx eax, byte [rbx + 0x40]
mov dword [rbx + 0xb4], 0
and eax, 0xffffffcf
or eax, 0x10
mov byte [rbx + 0x40], al
mov rax, qword [0x004aa548]
test rax, rax
je 0x41c417
mov rdx, rbx
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x41c442
mov rax, rbx
jmp 0x41c2ca
lea rcx, str._pthread_tls_once_shmem
xor r8d, r8d
mov edx, 4
call fcn.00420f60
mov rcx, rax
mov qword [0x004aa550], rax
jmp 0x41c2a8
lea r8, [0x0041b210]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call fcn.00420f60
mov qword [0x004aa548], rax
jmp 0x41c2bd
lea r8, [0x0041b210]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call fcn.00420f60
mov qword [0x004aa548], rax
jmp 0x41c3b8
xor eax, eax
jmp 0x41c2ca
call sub.msvcrt.dll_abort
nop
nop dword [rax + rax]
lea rcx, str._pthread_key_dest_shmem
xor r8d, r8d
mov edx, 8
jmp fcn.00420f60
Function at 0x41c450
Capabilities:
Check mutex on windows

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rcx, qword [0x004aa550]
test rcx, rcx
je 0x41c3d0
call fcn.0041c200
mov rax, qword [0x004aa548]
test rax, rax
je 0x41c3f3
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x41c2d3
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call fcn.0041bbd0
test rax, rax
mov rbx, rax
je 0x41c43b
cmp qword [0x004ad050], 0
je 0x41c43b
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov edx, 1
mov dword [rbx + 0x68], eax
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rsi, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rbx + 0x30], rax
mov qword [rbx + 0x38], 0xffffffffffffffff
mov qword [rbx + 0x60], 0xffffffffffffffff
mov dword [rbx + 0xb0], 0
mov qword [rbx + 0x28], 0
call rsi
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rdi, rax
call rsi
mov dword [rsp + 0x30], 2
mov rcx, rax
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
lea r9, [rbx + 0x28]
mov r8, rbp
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x41c442
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [rbx + 0xb8], eax
movzx eax, byte [rbx + 0x40]
mov dword [rbx + 0xb4], 0
and eax, 0xffffffcf
or eax, 0x10
mov byte [rbx + 0x40], al
mov rax, qword [0x004aa548]
test rax, rax
je 0x41c417
mov rdx, rbx
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x41c442
mov rax, rbx
jmp 0x41c2ca
lea rcx, str._pthread_tls_once_shmem
xor r8d, r8d
mov edx, 4
call fcn.00420f60
mov rcx, rax
mov qword [0x004aa550], rax
jmp 0x41c2a8
lea r8, [0x0041b210]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call fcn.00420f60
mov qword [0x004aa548], rax
jmp 0x41c2bd
lea r8, [0x0041b210]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call fcn.00420f60
mov qword [0x004aa548], rax
jmp 0x41c3b8
xor eax, eax
jmp 0x41c2ca
call sub.msvcrt.dll_abort
nop
nop dword [rax + rax]
lea rcx, str._pthread_key_dest_shmem
xor r8d, r8d
mov edx, 8
jmp fcn.00420f60
Function at 0x41f200
Capabilities:
Check mutex on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
mov rcx, qword [0x004aa598]
mov esi, edx
test rcx, rcx
je 0x41f1a0
call fcn.00421320
cmp dword [rbx], 0xbab1f00d
jne 0x41f1c7
mov eax, dword [rbx + 4]
test eax, eax
jle 0x41f1c7
mov eax, dword [rbx + 4]
test eax, eax
jle 0x41f153
mov eax, dword [rbx + 4]
sub eax, 1
mov dword [rbx + 4], eax
mov rcx, qword [0x004aa598]
test rcx, rcx
je 0x41f170
call fcn.004213d0
mov eax, esi
add rsp, 0x38
pop rbx
pop rsi
ret
lea r8, [0x0041eee0]
lea rcx, str.mutex_global_shmem
mov edx, 8
call fcn.00420f60
mov rcx, rax
mov qword [0x004aa598], rax
call fcn.004213d0
mov eax, esi
add rsp, 0x38
pop rbx
pop rsi
ret
lea rcx, str.mutex_global_shmem
lea r8, [0x0041eee0]
mov edx, 8
call fcn.00420f60
mov rcx, rax
mov qword [0x004aa598], rax
jmp 0x41f127
call qword [sym.imp.msvcrt.dll___iob_func]
lea r9, str.C:_crossdev_src_winpthreads_git20141130_src_mutex.c
lea rcx, [rax + 0x60]
lea r8, str._m___valid__LIFE_MUTEX____m___busy___0_
lea rdx, [0x0048cf60]
mov dword [rsp + 0x20], 0x39
call sub.msvcrt.dll_fprintf
mov ecx, 1
call sub.msvcrt.dll_exit
nop
nop
lea r8, [0x0041eee0]
lea rcx, str.mutex_global_shmem
mov edx, 8
jmp fcn.00420f60