joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14028ff90
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov ebx, ecx
call fcn.14027c9fc
mov ecx, ebx
lea r8, [rsp + 0x30]
and ecx, 0x3ff
mov r9d, 2
bts ecx, 0xa
mov edx, 0x20000001
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
xor edx, edx
test eax, eax
je 0x140290031
cmp ebx, dword [rsp + 0x30]
je 0x14029002a
test esi, esi
je 0x14029002a
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x140290005
sub r8w, 0x61
cmp r8w, 0x19
ja 0x140290012
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x14028ffef
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x140290016
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x140290033
mov eax, 1
jmp 0x140290033
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140291310
Capabilities:
Clear file content

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.14026b7c0
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14026b7c0
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140291460
cmp rax, 0xffffffffffffffff
je 0x140291460
xor edi, edi
test rbp, rbp
jle 0x14029140b
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14027d4e4
mov rbx, rax
test rax, rax
jne 0x140291398
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140291401
mov edx, 0x8000
mov ecx, r14d
call fcn.140276960
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.14027a5f8
cmp eax, 0xffffffff
je 0x1402913e1
cdqe
sub rbp, rax
test rbp, rbp
jg 0x1402913a8
mov edx, r15d
mov ecx, r14d
call fcn.140276960
jmp 0x140291401
cmp byte [rsi + 0x38], dil
je 0x1402913f8
cmp dword [rsi + 0x34], 5
jne 0x1402913f8
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], reloc.WS2_32.dll_listen
cmp byte [rsi + 0x30], dil
je 0x140291401
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14027d564
jmp 0x140291474
jns 0x140291474
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14026b7c0
cmp rax, 0xffffffffffffffff
jne 0x14029142c
cmp byte [rsi + 0x30], dil
je 0x140291474
mov edi, dword [rsi + 0x2c]
jmp 0x140291474
mov ecx, r14d
call fcn.1402856c4
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140291474
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, reloc.WS2_32.dll_listen
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], reloc.WS2_32.dll_listen
jmp 0x140291474
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x14029146d
mov eax, dword [rsi + 0x2c]
jmp 0x140291472
mov eax, reloc.WLDAP32.dll_Ordinal_22
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14026b7c0
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret

Function at 0x140295738
Capabilities:
Get disk information

Disassembly:
push rbx
sub rsp, 0x30
mov rax, qword [0x140320740]
xor rax, rsp
mov qword [rsp + 0x28], rax
cmp ecx, 0x1a
jbe 0x140295782
call fcn.14026826c
mov dword [rax], reloc.WS2_32.dll_ntohs
call fcn.14026828c
mov dword [rax], reloc.WS2_32.dll_listen
call fcn.140261eb4
xor eax, eax
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.1402164b0
add rsp, 0x30
pop rbx
ret
xor ebx, ebx
test ecx, ecx
jne 0x14029578d
lea eax, [rbx + 1]
jmp 0x14029576f
add cx, 0x40
mov dword [rsp + 0x22], 0x5c003a
mov word [rsp + 0x20], cx
lea rcx, [rsp + 0x20]
mov word [rsp + 0x26], bx
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
test eax, eax
je 0x14029576d
cmp eax, 1
setne bl
mov eax, ebx
jmp 0x14029576f
Function at 0x14029637c
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.1402285d0
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x140296406
cmp byte [rbp - 0x21], r15b
je 0x140296401
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x14029643c
call fcn.14027e298
test eax, eax
jne 0x140296428
cmp byte [rbp - 0x21], r15b
je 0x140296420
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x14029643c
cmp byte [rbp - 0x21], r15b
je 0x140296439
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.140265430
test eax, eax
jne 0x1402964dc
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.1402285d0
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x14029647b
cmp byte [rbp - 0x21], r15b
je 0x1402964b0
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x1402964b0
call fcn.14027e298
test eax, eax
jne 0x14029649c
cmp byte [rbp - 0x21], r15b
je 0x140296495
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x1402964b0
cmp byte [rbp - 0x21], r15b
je 0x1402964ad
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.140265430
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x1402964dc
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x1402964df
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x1402964ed
mov rcx, rdi
call fcn.14027d564
cmp byte [rbp + 0x3f], r15b
je 0x1402964fc
mov rcx, qword [rbp + 0x27]
call fcn.14027d564
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret

Function at 0x140298750
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140298778
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140298778
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x141175058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.1411751df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x141175089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14117506f
add dl, dl
jne 0x141175096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1411750f6
xor eax, eax
add dl, dl
jne 0x1411750a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1411751ad
add dl, dl
jne 0x1411750b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1411750c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1411750d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1411750dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1411750ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x14117507e
mov eax, 1
add dl, dl
jne 0x141175106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x141175113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1411750fb
sub eax, ebx
mov ebx, 1
jne 0x14117514c
mov ecx, 1
add dl, dl
jne 0x14117512e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14117513b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x141175123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14117507e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x141175168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x141175175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14117515d
cmp eax, 0x7d00
jae 0x14117519b
cmp eax, 0x500
jb 0x141175196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14117507e
cmp eax, 0x7f
ja 0x14117519e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14117507e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1411751d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x14117507e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x18001298c
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x1800129bc
xor eax, eax
jmp 0x180012a7f
mov rbp, rbx
cmp word [rax], si
je 0x1800129e1
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x1800129c8
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x1800129c4
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.180011284
movsxd r14, eax
test eax, eax
jne 0x180012a1f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x1800129b5
mov rcx, r14
call fcn.18000f5f0
mov rdi, rax
test rax, rax
jne 0x180012a38
xor ecx, ecx
call fcn.18000f5b4
jmp 0x180012a14
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.180011284
test eax, eax
jne 0x180012a69
mov rcx, rdi
call fcn.18000f5b4
jmp 0x180012a73
xor ecx, ecx
call fcn.18000f5b4
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
Function at 0x140002e90
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 fcn.14000da30
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call fcn.14000da30
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]

Function at 0x140002f00
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x1400d2654]
mov r12, rcx
test ebx, ebx
jle 0x140003030
mov rax, qword [0x1400d2658]
xor ecx, ecx
add rax, 0x18
nop word [rax + rax]
mov rdx, qword [rax]
cmp rdx, r12
ja 0x140002f4c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x140002fd3
add ecx, 1
add rax, 0x28
cmp ecx, ebx
jne 0x140002f30
mov rcx, r12
call fcn.1400038a0
mov rsi, rax
test rax, rax
je 0x140003052
mov rax, qword [0x1400d2658]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call fcn.1400039d0
mov ecx, dword [rsi + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x1400d2658]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140003037
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140002fcc
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140002fe0
add dword [0x1400d2654], 1
add rsp, 0x50
pop rbx
pop rsi
pop r12
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 4
mov eax, 0x40
cmovne r8d, eax
add rbx, qword [0x1400d2658]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140002fcc
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140002e90
nop dword [rax]
xor ebx, ebx
jmp 0x140002f57
mov rax, qword [0x1400d2658]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140002e90
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.140002e90
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140003510
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x1400d26c0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400d26a0]
test rbx, rbx
je 0x140003564
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 0x14000355b
test r12, r12
je 0x14000355b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140003540
lea rcx, [0x1400d26c0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x1400038a0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1400cd200]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400038c0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400038c8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400038c0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
movzx edx, word [r8 + 6]
lea rax, [r8 + rax + 0x18]
test edx, edx
je 0x140003915
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x14000390c
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400038c0
add rax, 0x28
cmp rax, r9
jne 0x1400038f8
xor eax, eax
ret

Function at 0x140003920
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400cd200]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x140003940
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140003948
mov eax, r8d
ret
cmp word [rax + 0x18], 0x20b
jne 0x140003940
movzx r8d, word [rax + 6]
mov eax, r8d
ret

Function at 0x1400039d0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400cd200]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x1400039f0
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x1400039f8
mov rax, r8
ret
cmp word [rdx + 0x18], 0x20b
cmove r8, rax
mov rax, r8
ret

Function at 0x1400051c0
Capabilities:
Allocate thread local storage

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rsi, qword [0x1400cd280]
mov rax, qword [rsi]
test rax, rax
je 0x140005250
cmp qword [rax + 0x30], 0
jne 0x140005270
lea rbx, [0x14002e7c8]
mov qword [rax + 0x30], rbx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [rbx], eax
mov rax, qword [rsi]
test rax, rax
je 0x140005220
cmp qword [rax + 0x30], 0
jne 0x140005240
lea rdx, [0x14002e7c8]
mov qword [rax + 0x30], rdx
mov rax, rdx
cmp dword [rax], 0xffffffff
je 0x14000dab0
add rsp, 0x28
pop rbx
pop rsi
ret
call fcn.14000a0c0
mov r8, rax
mov rax, qword [rsi]
cmp qword [r8 + 0x30], 0
je 0x140005202
test rax, rax
jne 0x140005240
call fcn.14000a0c0
nop dword [rax]
mov rax, qword [rax + 0x30]
jmp 0x140005210
call fcn.14000a0c0
cmp qword [rax + 0x30], 0
mov rax, qword [rsi]
je 0x1400051e0
test rax, rax
jne 0x140005270
call fcn.14000a0c0
nop dword [rax]
mov rbx, qword [rax + 0x30]
jmp 0x1400051eb
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
mov rax, qword [pe_dos_header]
ud2
Function at 0x140005da0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
mov rsi, qword [0x1400cd280]
mov rax, qword [rsi]
test rax, rax
je 0x140005f90
cmp qword [rax + 0x28], 0
jne 0x140005f78
lea rcx, [0x1400d2778]
cmp dword [rcx], 1
mov qword [rax + 0x28], rcx
je 0x140005f85
call fcn.1400053b0
mov rax, qword [rsi]
test rax, rax
je 0x140005e20
cmp qword [rax + 0x30], 0
jne 0x140005e40
lea rdx, [0x14002e7c8]
mov qword [rax + 0x30], rdx
mov rax, rdx
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
je 0x140005e54
mov rax, r12
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call fcn.14000a0c0
cmp qword [rax + 0x30], 0
mov rax, qword [rsi]
je 0x140005df0
test rax, rax
jne 0x140005e40
call fcn.14000a0c0
nop dword [rax]
mov rax, qword [rax + 0x30]
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
jne 0x140005e0e
call fcn.140004ef0
cmp qword [0x1400d4050], 0
mov rbx, rax
je 0x140005e0e
test rax, rax
je 0x140005e0e
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 fcn.14000bf60
cmp eax, 1
je 0x140005ffd
mov rbp, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rbx + 0x68], 0xffffffffffffffff
mov dword [rbx + 0xb8], 0
mov qword [rbx + 0x28], 0
call rbp
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov r12, rax
call rbp
mov dword [rsp + 0x30], 2
mov r8, rdi
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 0x14000dab6
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
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
mov rax, qword [rsi]
test rax, rax
je 0x140005fd8
cmp qword [rax + 0x30], 0
je 0x140005fc0
mov rax, qword [rax + 0x30]
mov ecx, dword [rax]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x14000dab6
mov r12, rbx
mov rax, r12
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rax + 0x28]
cmp dword [rcx], 1
jne 0x140005ddc
mov rax, qword [rsi]
jmp 0x140005de9
call fcn.14000a0c0
cmp qword [rax + 0x28], 0
mov rax, qword [rsi]
je 0x140005dc8
test rax, rax
jne 0x140005f78
call fcn.14000a0c0
mov rcx, qword [rax + 0x28]
cmp dword [rcx], 1
jne 0x140005ddc
jmp 0x140005de1
lea rdx, [0x14002e7c8]
mov qword [rax + 0x30], rdx
mov rax, rdx
jmp 0x140005f4e
call fcn.14000a0c0
mov r8, rax
mov rax, qword [rsi]
cmp qword [r8 + 0x30], 0
je 0x140005fc0
test rax, rax
jne 0x140005f4a
call fcn.14000a0c0
jmp 0x140005f4a
call fcn.140005280
nop word cs:[rax + rax]
nop dword [rax]
mov rax, qword [0x1400cd280]
mov rdx, qword [rax]
lea rax, [0x1400d2788]
mov qword [rdx + 0x10], rax
ret
Function at 0x14000a0c0
Capabilities:
Check mutex on windows

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x30
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea rdx, [0x1400d2860]
mov dword [rsp + 0x2c], eax
lea rcx, [rsp + 0x2c]
lea r9, [rsp + 0x30]
movzx eax, byte [rcx]
add rcx, 1
add rdx, 2
mov r8d, eax
and eax, 0xf
shr r8b, 4
add eax, 0x61
add r8d, 0x41
mov byte [rdx - 1], al
mov byte [rdx - 2], r8b
cmp rcx, r9
jne 0x14000a0e3
lea rax, [0x1400d2868]
mov ecx, 0x5f
lea rdx, str.__shmem3_winpthreads_tdm_
lea r8, [rax + 0x1a]
jmp 0x14000a12b
movzx ecx, byte [rdx]
add rax, 1
add rdx, 1
mov byte [rax - 1], cl
cmp rax, r8
jne 0x14000a128
lea rax, [0x1400d28a0]
mov ecx, 0x5f
lea rdx, str.__shmem3_winpthreads_tdm_
lea r8, [rax + 0x19]
jmp 0x14000a15b
movzx ecx, byte [rdx]
add rax, 1
add rdx, 1
mov byte [rax - 1], cl
cmp rax, r8
jne 0x14000a158
xor ecx, ecx
mov byte [0x1400d28b9], 0x2d
movabs rax, 0x6161616161616161
movabs rdx, 0x6161616161616161
mov qword [0x1400d28c2], rdx
lea r8, [0x1400d2860]
lea rbx, [0x1400d28ba]
mov qword [0x1400d28d2], rdx
mov qword [0x1400d28e2], rdx
mov qword [0x1400d28f2], rdx
xor edx, edx
mov qword [0x1400d28ba], rax
mov qword [0x1400d28ca], rax
mov qword [0x1400d28da], rax
mov qword [0x1400d28ea], rax
mov byte [0x1400d28fa], 0
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edx, 0xffffffff
mov r12, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x14000a336
lea rcx, [0x1400d28a0]
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
jne 0x14000a281
lea rsi, [0x1400d27a0]
lea r8, [0x1400d28fa]
mov rax, rbx
lea ecx, [rbx + 0x40]
nop dword [rax]
mov edx, ecx
sub edx, eax
bt rsi, rdx
jae 0x14000a22d
mov byte [rax], 0x41
add rax, 1
cmp r8, rax
jne 0x14000a220
lea rcx, [0x1400d28a0]
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
je 0x14000a323
lea rcx, [0x140009fd0]
mov qword [0x1400d27a0], rsi
call sub.msvcrt.dll__onexit
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [0x1400d27a0]
add rsp, 0x30
pop rbx
pop rsi
pop r12
ret
mov r8d, 0x5b
lea rdx, [0x1400d28a0]
movzx ecx, ax
call qword [sym.imp.KERNEL32.dll_GetAtomNameA]
lea r8, [0x1400d28fa]
xor edx, edx
lea r10d, [rbx + 0x40]
mov r11d, eax
mov r9d, 1
mov rax, rbx
test r11d, r11d
je 0x14000a356
nop dword [rax]
cmp byte [rax], 0x41
jne 0x14000a2d3
mov ecx, r10d
mov rbx, r9
sub ecx, eax
shl rbx, cl
or rdx, rbx
add rax, 1
cmp r8, rax
jne 0x14000a2c0
mov rax, rdx
mov qword [0x1400d27a0], rax
lea rsi, [0x1400d27a0]
jmp 0x14000a2f9
cmp rdx, rsi
je 0x14000a25f
mov rdx, rax
mov rax, qword [rax + 8]
test rax, rax
jne 0x14000a2f0
cmp rdx, rsi
je 0x14000a25f
mov qword [rdx + 8], rsi
lea rcx, [0x140009fd0]
call sub.msvcrt.dll__onexit
jmp 0x14000a25f
lea rcx, str.failed_to_add_string_to_atom_table_n
call fcn.140009f40
xor eax, eax
jmp 0x14000a278
lea rcx, str.failed_to_to_lock_creation_mutex_n
call fcn.140009f40
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
add rsp, 0x30
pop rbx
pop rsi
pop r12
ret
lea rcx, str.failed_to_get_string_from_atom_n
call fcn.140009f40
xor eax, eax
jmp 0x14000a2df