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

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sym.__acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sym.fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sym.__acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sym.vfprintf
call sym.abort
nop

Function at 0x140003382
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x1400091e8]
test eax, eax
je 0x14000341a
lea rax, [0x1400091c0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x1400091f0]
mov qword [rbp - 8], rax
jmp 0x1400033fe
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x1400033f2
cmp qword [rbp - 0x10], 0
je 0x1400033f2
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x1400033b8
lea rax, [0x1400091c0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x14000341b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x140003520
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x140003548
mov eax, 0
jmp 0x140003596
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x140003571
mov eax, 0
jmp 0x140003596
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x140003591
mov eax, 0
jmp 0x140003596
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x14000359c
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x14000361a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x140003611
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x140003611
mov rax, qword [rbp - 8]
jmp 0x14000362f
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x1400035e4
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x1401420d0
Capabilities:
Terminate process

Disassembly:
cld
pop r11
jmp 0x1401420dd
inc rsi
mov byte [rdi], dl
inc rdi
mov dl, byte [rsi]
add ebx, ebx
jne 0x1401420ed
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jb 0x1401420d5
lea eax, [rcx + 1]
jmp 0x1401420fb
dec eax
call r11
adc eax, eax
call r11
adc eax, eax
add ebx, ebx
jne 0x14014210e
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jae 0x1401420f4
sub eax, 3
jb 0x14014212e
shl eax, 8
movzx edx, dl
or eax, edx
inc rsi
xor eax, 0xffffffff
je 0x14014217d
sar eax, 1
movsxd rbp, eax
jb 0x140142164
jmp 0x14014213c
add ebx, ebx
jne 0x14014213a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x140142164
inc ecx
add ebx, ebx
jne 0x14014214a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x140142164
call r11
adc ecx, ecx
add ebx, ebx
jne 0x14014215d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jae 0x14014214c
add ecx, 2
jmp 0x140142169
call r11
adc ecx, ecx
cmp rbp, 0xfffffffffffffb00
adc ecx, 2
call fcn.140142092
jmp 0x1401420dd
pop rsi
pop rdi
pop rax
mov dword [rdi], eax
mov rdi, rsi
push rsi
mov rdi, rsi
mov rsi, 0xdba00
mov dl, 9
push rbx
push rdi
lea rcx, [rdi + rsi - 3]
pop rsi
push rsi
pop rbx
jmp 0x1401421cd
cmp rsi, rcx
jae 0x1401421d5
push rsi
pop rsi
lodsb al, byte [rsi]
cmp al, 0x80
jb 0x1401421b4
cmp al, 0x8f
ja 0x1401421b4
cmp byte [rsi - 2], 0xf
je 0x1401421ba
sub al, 0xe8
cmp al, 1
ja 0x14014219e
cmp rsi, rcx
jae 0x1401421d5
push rsi
lodsd eax, dword [rsi]
sub al, dl
jne 0x1401421a4
pop rdi
bswap eax
sub eax, edi
add eax, ebx
stosd dword [rdi], eax
cmp rsi, rcx
jae 0x1401421d5
lodsb al, byte [rsi]
jmp 0x1401421b4
pop rbx
pop rsi
sub rsp, 0x28
lea rdi, [rsi + 0x13e000]
mov eax, dword [rdi]
or eax, eax
je 0x140142232
mov ebx, dword [rdi + 4]
lea rcx, [rax + rsi + 0x1424ec]
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 0x1401421e2
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 0x14014222c
mov qword [rbx], rax
add rbx, 8
jmp 0x140142202
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 0x14014226c
cmp al, 0xef
ja 0x14014225e
add rbx, rax
mov rax, qword [rbx]
bswap rax
add rax, rsi
mov qword [rbx], rax
jmp 0x14014223e
and al, 0xf
shl eax, 0x10
mov ax, word [rdi]
add rdi, 2
jmp 0x14014224d
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
mov byte [fcn.1401422eb], 0xfc
lea rcx, [rsi - 0x1000]
push 1
pop rdx
xor r8, r8
push rax
call fcn.1401422eb
pop rax
pop rbp
pop rdi
pop rsi
pop rbx
lea rax, [rsp - 0x80]
push 0
cmp rsp, rax
jne 0x1401422db
sub rsp, 0xffffffffffffff80
jmp 0x1400014e0
Function at 0x7051dcb0
Capabilities:
Log keystrokes via polling

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov ecx, 1
mov rsi, qword [sym.imp.USER32.dll_GetAsyncKeyState]
xor ebx, ebx
call rsi
test ax, ax
js 0x7051dd30
mov ecx, 4
call rsi
mov edx, ebx
mov ecx, 2
or edx, 4
test ax, ax
cmovs ebx, edx
call rsi
test ax, ax
js 0x7051dd41
mov ecx, 0x10
call rsi
mov edx, ebx
mov ecx, 0x11
or edx, 0x10
test ax, ax
cmovs ebx, edx
call rsi
mov edx, ebx
mov ecx, 0x12
or edx, 0x20
test ax, ax
cmovs ebx, edx
call rsi
mov edx, ebx
or edx, 0x40
test ax, ax
cmovs ebx, edx
mov eax, ebx
add rsp, 0x28
pop rbx
pop rsi
ret
cmp byte [0x7062ad4c], 1
sbb ebx, ebx
and ebx, 0xfffffffa
add ebx, 8
jmp 0x7051dccb
cmp byte [0x7062ad4c], 1
sbb eax, eax
and eax, 6
add eax, 2
or ebx, eax
jmp 0x7051dce9
Function at 0x705202b0
Capabilities:
Check os version

Disassembly:
push rsi
push rbx
sub rsp, 0xb8
xor eax, eax
test rdx, rdx
je 0x7051e959
mov eax, dword [0x7062ad48]
mov rbx, rcx
mov rsi, qword [0x705ab600]
add eax, 1
cmp eax, 1
mov dword [0x7062ad48], eax
je 0x7051e963
mov qword [rsp + 0x58], 0
mov rax, qword [rsi]
mov r9d, 0x56000000
mov qword [rsp + 0x48], 0
cmp dword [0x7062a944], 6
lea r8, str.Window
lea rdx, [0x7062ac80]
mov qword [rsp + 0x50], rax
mov rax, qword [rbx + 0xd8]
sbb ecx, ecx
mov qword [rsp + 0x40], rax
not ecx
movsd xmm0, qword [rbx + 0x28]
and ecx, 0x2000000
subsd xmm0, qword [rbx + 0x18]
cvttsd2si eax, xmm0
mov dword [rsp + 0x38], eax
movsd xmm0, qword [rbx + 0x20]
subsd xmm0, qword [rbx + 0x10]
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
cvttsd2si eax, xmm0
mov dword [rsp + 0x30], eax
call qword [sym.imp.USER32.dll_CreateWindowExW]
mov r8, rbx
mov edx, 0xffffffeb
mov rcx, rax
mov qword [rbx + 0x100], rax
call qword [sym.imp.USER32.dll_SetWindowLongPtrW]
mov rax, qword [rbx]
mov edx, 1
mov rcx, rbx
call qword [rax + 0x328]
mov eax, 1
add rsp, 0xb8
pop rbx
pop rsi
ret
mov r8, qword [rsi]
lea rdx, str.Plugin_p
lea rcx, [0x7062ac80]
call qword [sym.imp.USER32.dll_wsprintfW]
lea rax, [0x70521c80]
mov edx, 0x7f00
xor ecx, ecx
mov dword [rsp + 0x60], 0x4008
mov dword [rsp + 0x70], 0
mov qword [rsp + 0x68], rax
mov rax, qword [rsi]
mov dword [rsp + 0x74], 0
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x78], rax
call qword [sym.imp.USER32.dll_LoadCursorW]
mov qword [rsp + 0x88], rax
lea rax, [0x7062ac80]
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x90], 0
mov qword [rsp + 0x98], 0
mov qword [rsp + 0xa0], rax
call qword [sym.imp.USER32.dll_RegisterClassW]
mov ecx, 0x17
call qword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
setg byte [0x7062ad4c]
jmp 0x7051e8a6
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, r8
mov rdi, r9
xor r8d, r8d
xor r9d, r9d
mov rbx, rcx
call fcn.7051f3f0
lea rax, fcn.70522c60
xor ecx, ecx
mov qword [rbx + 0xc8], rdi
mov qword [rbx + 0xd0], 0
mov qword [rbx + 0xd8], rsi
mov qword [rbx], rax
mov qword [rbx + 0xe0], 0
mov qword [rbx + 0xe8], 0
mov qword [rbx + 0xf0], 0
mov byte [rbx + 0xf8], 1
mov byte [rbx + 0xfa], 0
mov qword [rbx + 0x128], 0
mov qword [rbx + 0x130], 0
mov byte [rbx + 0xf9], 1
mov byte [rbx + 0x64], 1
mov qword [rbx + 0x50], rbx
mov qword [rbx + 0x100], 0
mov qword [rbx + 0x110], 0
mov qword [rbx + 0x118], 0
call qword [sym.imp.ole32.dll_OleInitialize]
mov byte [rbx + 0x120], 0
call fcn.70520250
lea r9, [0x7062a940]
xor eax, eax
mov ecx, 0x23
mov rdi, r9
rep stosq qword [rdi], rax
mov rcx, r9
mov dword [0x7062a940], 0x11c
mov dword [rdi], 0
call qword [sym.imp.KERNEL32.DLL_GetVersionExW]
mov rdx, rsi
mov rcx, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
jmp 0x7051e870
Function at 0x70530ab0
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 [0x7062adf4]
mov rbx, rcx
mov rsi, rdx
mov rdi, r8
test ebp, ebp
jle 0x70530bca
mov rax, qword [0x7062adf8]
xor r9d, r9d
add rax, 8
mov r10, qword [rax]
cmp rbx, r10
jb 0x70530afe
mov rdx, qword [rax + 8]
mov r11d, dword [rdx + 8]
add r10, r11
cmp rbx, r10
jb 0x70530bb0
add r9d, 1
add rax, 0x18
cmp r9d, ebp
jne 0x70530ae2
mov rcx, rbx
call fcn.705318d0
test rax, rax
mov r12, rax
je 0x70530c02
lea rbp, [rbp + rbp*2]
shl rbp, 3
mov r13, rbp
add r13, qword [0x7062adf8]
mov qword [r13 + 0x10], rax
mov dword [r13], 0
call fcn.705319f0
mov edx, dword [r12 + 0xc]
mov r8d, 0x30
add rax, rdx
lea rdx, [rsp + 0x20]
mov qword [r13 + 8], rax
mov rax, qword [0x7062adf8]
mov rcx, qword [rax + rbp + 8]
call qword [sym.imp.KERNEL32.DLL_VirtualQuery]
test rax, rax
je 0x70530be5
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x70530ba9
sub eax, 0x40
and eax, 0xffffffbf
je 0x70530ba9
mov r9, rbp
add r9, qword [0x7062adf8]
mov r8d, 0x40
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.DLL_VirtualProtect]
test eax, eax
je 0x70530bd1
add dword [0x7062adf4], 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 0x70530b0b
call qword [sym.imp.KERNEL32.DLL_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.70530a40
mov rax, qword [0x7062adf8]
mov edx, dword [r12 + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbp + 8]
call fcn.70530a40
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.70530a40
nop
nop word cs:[rax + rax]

Function at 0x705317e0
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 0x70531821
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 0x70531818
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x70531823
add rax, 0x28
cmp rax, r9
jne 0x70531804
xor eax, eax
repz ret

Function at 0x705318d0
Capabilities:
Enumerate pe sections

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rbx, qword [0x705ab520]
cmp word [rbx], 0x5a4d
je 0x705318f0
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
ret
mov rsi, rcx
mov rcx, rbx
call fcn.705317a0
test eax, eax
je 0x705318e4
sub rsi, rbx
mov rcx, rbx
mov rdx, rsi
add rsp, 0x28
pop rbx
pop rsi
jmp fcn.705317e0
Function at 0x70531b50
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x7062b700]
call qword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov rbx, qword [0x7062b6e0]
test rbx, rbx
je 0x70531ba4
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 0x70531b9b
test rsi, rsi
je 0x70531b9b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x70531b80
mov rax, qword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
lea rcx, [0x7062b700]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp rax

Function at 0x70532340
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.70531d80
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 0x70532429
int3
mov rcx, r15
call qword [sym.imp.KERNEL32.DLL_FindAtomA]
test ax, ax
jne 0x705324c8
mov rcx, r12
call sub.msvcrt.dll_malloc
lea r9d, [rsi + 0x10]
mov rbx, rax
mov r10d, 0x40
bt rbx, r10
jae 0x70532464
mov r11d, r14d
sub r11d, r10d
movsxd r11, r11d
mov byte [r15 + r11], 0x41
sub r10d, 1
jne 0x70532450
mov dword [rbp - 0x54], r9d
mov rcx, r15
call qword [sym.imp.KERNEL32.DLL_AddAtomA]
test ax, ax
mov r9d, dword [rbp - 0x54]
je 0x705324c5
lea r8d, [rsi + 0x51]
movzx ecx, ax
mov rdx, r15
call fcn.705322c0
cmp rax, rbx
mov rsi, rax
je 0x705324e0
mov rcx, rbx
call fcn.7053e1c0
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.705322c0
mov rsi, rax
jmp 0x7053249f
xor edx, edx
mov r8, r12
mov rcx, rbx
call sub.msvcrt.dll_memset
test r13, r13
je 0x7053249f
mov rcx, rbx
call r13
jmp 0x7053249f
Function at 0x70532860
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x130
mov rbx, rcx
call sub.msvcrt.dll__errno
test rbx, rbx
mov dword [rax], 0
je 0x70532a2e
cmp byte [rbx], 0
je 0x705329f0
mov rcx, rbx
call qword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x70532a10
test al, 0x10
je 0x705329f0
lea rdi, [rsp + 0x20]
mov rdx, rbx
mov r8d, 0x104
mov rcx, rdi
mov rbx, rdi
call sub.msvcrt.dll__fullpath
mov r8d, dword [rbx]
add rbx, 4
lea eax, [r8 - 0x1010101]
not r8d
and eax, r8d
and eax, 0x80808080
je 0x705328bd
mov edx, eax
shr edx, 0x10
test eax, 0x8080
cmove eax, edx
lea rdx, [rbx + 2]
cmove rbx, rdx
add al, al
sbb rbx, 3
sub rbx, rdi
lea rcx, [rbx + 0x24b]
call sub.msvcrt.dll_malloc
test rax, rax
mov rsi, rax
je 0x70532a1f
lea r9, [rax + 0x244]
lea r8, [rbx + 1]
mov rdx, rdi
mov rcx, r9
call sub.msvcrt.dll_memcpy
cmp byte [rsi + 0x244], 0
mov r9, rax
je 0x70532950
movzx eax, byte [rsi + rbx + 0x243]
cmp al, 0x2f
je 0x70532950
cmp al, 0x5c
je 0x70532950
mov r8d, 0x5c
mov word [r9 + rbx], r8w
nop dword [rax + rax]
mov rcx, r9
mov eax, dword [rcx]
add rcx, 4
lea edx, [rax - 0x1010101]
not eax
and edx, eax
and edx, 0x80808080
je 0x70532953
mov eax, edx
shr eax, 0x10
test edx, 0x8080
cmove edx, eax
lea rax, [rcx + 2]
cmove rcx, rax
add dl, dl
mov eax, 0x2a
sbb rcx, 3
xor edx, edx
mov word [rcx], ax
mov word [rsi + 0x12c], dx
lea rdx, [rsi + 0x130]
xor ecx, ecx
xor eax, eax
mov qword [rsi + 0x238], 0xffffffffffffffff
mov word [rsi + 0x12e], cx
mov rdi, rdx
mov ecx, 0x20
mov dword [rsi + 0x240], 0
mov dword [rsi + 0x128], 0
rep stosq qword [rdi], rax
mov rax, rsi
mov dword [rdi], 0
add rsp, 0x130
pop rbx
pop rsi
pop rdi
ret
call sub.msvcrt.dll__errno
mov dword [rax], 0x14
xor eax, eax
add rsp, 0x130
pop rbx
pop rsi
pop rdi
ret
call sub.msvcrt.dll__errno
mov dword [rax], 2
xor eax, eax
jmp 0x705329dd
call sub.msvcrt.dll__errno
mov dword [rax], 0xc
xor eax, eax
jmp 0x705329dd
call sub.msvcrt.dll__errno
mov dword [rax], 0xe
xor eax, eax
jmp 0x705329dd
Function at 0x7053e7c0
Capabilities:
Check mutex on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
mov rcx, qword [0x7062c1e8]
mov esi, edx
test rcx, rcx
je 0x7053e760
call fcn.70544370
cmp dword [rbx], 0xbab1f00d
jne 0x7053e787
mov eax, dword [rbx + 4]
test eax, eax
jle 0x7053e787
mov eax, dword [rbx + 4]
test eax, eax
jle 0x7053e713
mov eax, dword [rbx + 4]
sub eax, 1
mov dword [rbx + 4], eax
mov rcx, qword [0x7062c1e8]
test rcx, rcx
je 0x7053e730
call fcn.70544420
mov eax, esi
add rsp, 0x38
pop rbx
pop rsi
ret
lea r8, [0x7053e4a0]
lea rcx, str.mutex_global_shmem
mov edx, 8
call fcn.70544500
mov rcx, rax
mov qword [0x7062c1e8], rax
call fcn.70544420
mov eax, esi
add rsp, 0x38
pop rbx
pop rsi
ret
lea rcx, str.mutex_global_shmem
lea r8, [0x7053e4a0]
mov edx, 8
call fcn.70544500
mov rcx, rax
mov qword [0x7062c1e8], rax
jmp 0x7053e6e7
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, [0x705aa8a0]
mov dword [rsp + 0x20], 0x39
call sub.msvcrt.dll_fprintf
mov ecx, 1
call sub.msvcrt.dll_exit
nop
nop
lea r8, [0x7053e4a0]
lea rcx, str.mutex_global_shmem
mov edx, 8
jmp fcn.70544500

Function at 0x7053ff00
Capabilities:
Allocate thread local storage

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, qword [0x7062c258]
test rbx, rbx
je 0x7053ff30
call qword [sym.imp.KERNEL32.DLL_TlsAlloc]
mov dword [rbx], eax
mov rax, qword [0x7062c258]
test rax, rax
je 0x7053ff54
cmp dword [rax], 0xffffffff
je 0x7053ff75
add rsp, 0x20
pop rbx
ret
lea r8, [0x7053f390]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call fcn.70544500
mov rbx, rax
mov qword [0x7062c258], rax
jmp 0x7053ff11
lea r8, [0x7053f390]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call fcn.70544500
mov qword [0x7062c258], rax
jmp 0x7053ff25
call sub.msvcrt.dll_abort
nop
nop dword [rax + rax]
Function at 0x70540410
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 [0x7062c260]
test rcx, rcx
je 0x70540550
call fcn.70540380
mov rax, qword [0x7062c258]
test rax, rax
je 0x70540573
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.DLL_TlsGetValue]
test rax, rax
je 0x70540453
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call fcn.7053fd50
test rax, rax
mov rbx, rax
je 0x705405bb
cmp qword [0x70631040], 0
je 0x705405bb
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 0x705405c2
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 [0x7062c258]
test rax, rax
je 0x70540597
mov rdx, rbx
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
je 0x705405c2
mov rax, rbx
jmp 0x7054044a
lea rcx, str._pthread_tls_once_shmem
xor r8d, r8d
mov edx, 4
call fcn.70544500
mov rcx, rax
mov qword [0x7062c260], rax
jmp 0x70540428
lea r8, [0x7053f390]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call fcn.70544500
mov qword [0x7062c258], rax
jmp 0x7054043d
lea r8, [0x7053f390]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call fcn.70544500
mov qword [0x7062c258], rax
jmp 0x70540538
xor eax, eax
jmp 0x7054044a
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.70544500
Function at 0x705405d0
Capabilities:
Check mutex on windows

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rcx, qword [0x7062c260]
test rcx, rcx
je 0x70540550
call fcn.70540380
mov rax, qword [0x7062c258]
test rax, rax
je 0x70540573
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.DLL_TlsGetValue]
test rax, rax
je 0x70540453
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
call fcn.7053fd50
test rax, rax
mov rbx, rax
je 0x705405bb
cmp qword [0x70631040], 0
je 0x705405bb
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 0x705405c2
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 [0x7062c258]
test rax, rax
je 0x70540597
mov rdx, rbx
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
je 0x705405c2
mov rax, rbx
jmp 0x7054044a
lea rcx, str._pthread_tls_once_shmem
xor r8d, r8d
mov edx, 4
call fcn.70544500
mov rcx, rax
mov qword [0x7062c260], rax
jmp 0x70540428
lea r8, [0x7053f390]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call fcn.70544500
mov qword [0x7062c258], rax
jmp 0x7054043d
lea r8, [0x7053f390]
lea rcx, str._pthread_tls_shmem
mov edx, 4
call fcn.70544500
mov qword [0x7062c258], rax
jmp 0x70540538
xor eax, eax
jmp 0x7054044a
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.70544500