joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140004408
Capabilities:
Get common file path

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
lea rax, [rbp - 8]
mov r9, rax
mov r8d, 0
mov edx, 0
mov rax, qword [0x140110610]
mov rcx, rax
call sym.SHGetKnownFolderPath
test eax, eax
sete al
test al, al
je 0x140004456
lea rax, [rbp - 8]
mov r8d, 2
mov rdx, rax
mov rcx, qword [rbp + 0x10]
call dbg.std::filesystem::__cxx11::path::path<wchar_t*, std::filesystem::__cxx11::path>(wchar_t* const&, std::filesystem::__cxx11::path::format)
jmp 0x14000445f
mov rcx, qword [rbp + 0x10]
call dbg.std::filesystem::__cxx11::path::path()
mov rax, qword [rbp + 0x10]
add rsp, 0x30
pop rbp
ret

Function at 0x14000446a
Capabilities:
Get hostname

Disassembly:
push rbp
push rsi
push rbx
sub rsp, 0xd0
lea rbp, [rsp + 0xd0]
mov qword [rbp + 0x20], rcx
mov dword [rbp - 0x84], 0x10
lea rdx, [rbp - 0x84]
lea rax, [rbp - 0x80]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetComputerNameA]
call rax
test eax, eax
setne al
test al, al
je 0x140004518
lea rax, [rbp - 0xb0]
mov rcx, rax
call dbg.std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string()
mov dword [rbp - 4], 0
jmp 0x1400044e4
mov eax, dword [rbp - 4]
cdqe
movzx eax, byte [rbp + rax - 0x80]
cbw
movzx edx, ax
lea rax, [rbp - 0xb0]
mov rcx, rax
call dbg.std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::operator+=(wchar_t)
add dword [rbp - 4], 1
mov edx, dword [rbp - 4]
mov eax, dword [rbp - 0x84]
cmp edx, eax
jb 0x1400044c2
lea rax, [rbp - 0xb0]
mov rdx, rax
mov rcx, qword [rbp + 0x20]
call dbg.std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&&)
lea rax, [rbp - 0xb0]
mov rcx, rax
call dbg.std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string()
jmp 0x1400046af
lea rax, [rbp - 0x41]
mov rcx, rax
call fcn.1400885c0
lea rdx, [rbp - 0x41]
lea rax, [rbp - 0x70]
mov r8, rdx
lea rdx, str.Failed_to_get_computer_name
mov rcx, rax
call dbg.std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<std::allocator<char> >(char const*, std::allocator<char> const&)
lea rax, [rbp - 0x70]
mov rcx, rax
call dbg.Log::error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
lea rax, [rbp - 0x70]
mov rcx, rax
call dbg.std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()
lea rax, [rbp - 0x41]
mov rcx, rax
call sym.std::allocator_char_::allocator__
lea rax, [rbp - 0x11]
mov rcx, rax
call fcn.140088650
lea rax, [rbp - 0x11]
mov r8, rax
lea rax, [0x140109774]
mov rdx, rax
mov rcx, qword [rbp + 0x20]
call dbg.std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string<std::allocator<wchar_t> >(wchar_t const*, std::allocator<wchar_t> const&)
lea rax, [rbp - 0x11]
mov rcx, rax
call sym.std::allocator_wchar_t_::allocator__
jmp 0x1400046af
mov rax, qword [rbp + 0x20]
add rsp, 0xd0
pop rbx
pop rsi
pop rbp
ret
Function at 0x1400046be
Capabilities:
Get session user name

Disassembly:
push rbp
push rsi
push rbx
sub rsp, 0x1c0
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x160], rcx
mov dword [rbp + 0xcc], 0x104
lea rdx, [rbp + 0xcc]
lea rax, [rbp - 0x40]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_GetUserNameA]
call rax
test eax, eax
setne al
test al, al
je 0x140004772
lea rax, [rbp - 0x60]
mov rcx, rax
call dbg.std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string()
mov dword [rbp + 0x13c], 0
jmp 0x14000473e
mov eax, dword [rbp + 0x13c]
cdqe
movzx eax, byte [rbp + rax - 0x40]
cbw
movzx edx, ax
lea rax, [rbp - 0x60]
mov rcx, rax
call dbg.std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::operator+=(wchar_t)
add dword [rbp + 0x13c], 1
mov edx, dword [rbp + 0x13c]
mov eax, dword [rbp + 0xcc]
cmp edx, eax
jb 0x140004719
lea rax, [rbp - 0x60]
mov rdx, rax
mov rcx, qword [rbp + 0x160]
call dbg.std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&&)
lea rax, [rbp - 0x60]
mov rcx, rax
call dbg.std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string()
jmp 0x14000494e
lea rax, [rbp + 0xff]
mov rcx, rax
call fcn.1400885c0
lea rdx, [rbp + 0xff]
lea rax, [rbp + 0xd0]
mov r8, rdx
lea rdx, str.Failed_to_get_user_name
mov rcx, rax
call dbg.std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<std::allocator<char> >(char const*, std::allocator<char> const&)
lea rax, [rbp + 0xd0]
mov rcx, rax
call dbg.Log::error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
lea rax, [rbp + 0xd0]
mov rcx, rax
call dbg.std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()
lea rax, [rbp + 0xff]
mov rcx, rax
call sym.std::allocator_char_::allocator__
lea rax, [rbp + 0x12f]
mov rcx, rax
call fcn.140088650
lea rax, [rbp + 0x12f]
mov r8, rax
lea rax, [0x140109774]
mov rdx, rax
mov rcx, qword [rbp + 0x160]
call dbg.std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::basic_string<std::allocator<wchar_t> >(wchar_t const*, std::allocator<wchar_t> const&)
lea rax, [rbp + 0x12f]
mov rcx, rax
call sym.std::allocator_wchar_t_::allocator__
jmp 0x14000494e
mov rax, qword [rbp + 0x160]
add rsp, 0x1c0
pop rbx
pop rsi
pop rbp
ret
Function at 0x140005432
Capabilities:
Get memory capacity

Disassembly:
push rbp
push rbx
sub rsp, 0x98
lea rbp, [rsp + 0x90]
mov qword [rbp + 0x20], rcx
mov dword [rbp - 0x70], 0x40
lea rax, [rbp - 0x70]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
call rax
mov rax, qword [rbp - 0x68]
shr rax, 0x14
test rax, rax
js 0x140005476
pxor xmm0, xmm0
cvtsi2sd xmm0, rax
jmp 0x14000548f
mov rdx, rax
shr rdx, 1
and eax, 1
or rdx, rax
pxor xmm0, xmm0
cvtsi2sd xmm0, rdx
addsd xmm0, xmm0
movsd qword [rbp - 8], xmm0
movsd xmm0, qword [rbp - 8]
cvttsd2si edx, xmm0
lea rax, [rbp - 0x30]
mov rcx, rax
call dbg.std::__cxx11::to_wstring(int)
mov rax, qword [rbp + 0x20]
lea rdx, [rbp - 0x30]
lea r8, [0x14010987c]
mov rcx, rax
call sym.std::__cxx11::basic_string_wchar_t__std::char_traits_wchar_t___std::allocator_wchar_t____std::operator_wchar_t__std::char_traits_wchar_t___std::allocator_wchar_t____std::__cxx11::basic_string_wchar_t__std::char_traits_wchar_t___std::allocator_wchar_t_____wchar_t_const_
nop
lea rax, [rbp - 0x30]
mov rcx, rax
call dbg.std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string()
jmp 0x1400054e9
mov rax, qword [rbp + 0x20]
add rsp, 0x98
pop rbx
pop rbp
ret

Function at 0x140013600
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 r8, rbx
mov rdx, qword [rbp + 0x20]
mov rcx, rax
call sym.vfprintf
call sym.abort
nop

Function at 0x140014232
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x140153288]
test eax, eax
je 0x1400142ca
lea rax, [0x140153260]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x140153290]
mov qword [rbp - 8], rax
jmp 0x1400142ae
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 0x1400142a2
cmp qword [rbp - 0x10], 0
je 0x1400142a2
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 0x140014268
lea rax, [0x140153260]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x1400142cb
nop
add rsp, 0x30
pop rbp
ret
Function at 0x1400143d0
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 0x1400143f8
mov eax, 0
jmp 0x140014446
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 0x140014421
mov eax, 0
jmp 0x140014446
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 0x140014441
mov eax, 0
jmp 0x140014446
mov eax, 1
add rsp, 0x20
pop rbp
ret

Function at 0x14001444c
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 0x1400144ca
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x1400144c1
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 0x1400144c1
mov rax, qword [rbp - 8]
jmp 0x1400144df
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 0x140014494
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140015bd0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbp
push rbx
sub rsp, 0x248
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x1e0], rcx
call sym._errno
mov dword [rax], 0
cmp qword [rbp + 0x1e0], 0
jne 0x140015c12
call sym._errno
mov dword [rax], 0xe
mov eax, 0
jmp 0x140015e57
mov rax, qword [rbp + 0x1e0]
movzx eax, word [rax]
test ax, ax
jne 0x140015c36
call sym._errno
mov dword [rax], 0x14
mov eax, 0
jmp 0x140015e57
mov rcx, qword [rbp + 0x1e0]
mov rax, qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
call rax
mov dword [rbp + 0x1bc], eax
cmp dword [rbp + 0x1bc], 0xffffffff
jne 0x140015c6a
call sym._errno
mov dword [rax], 2
mov eax, 0
jmp 0x140015e57
mov eax, dword [rbp + 0x1bc]
and eax, 0x10
test eax, eax
jne 0x140015c8c
call sym._errno
mov dword [rax], 0x14
mov eax, 0
jmp 0x140015e57
lea rax, [rbp - 0x60]
mov r8d, 0x104
mov rdx, qword [rbp + 0x1e0]
mov rcx, rax
call sym._wfullpath
lea rax, [rbp - 0x60]
mov rcx, rax
call sym.wcslen
mov rbx, rax
lea rax, [0x14010fd20]
mov rcx, rax
call sym.wcslen
add rbx, rax
lea rax, [0x14010fd24]
mov rcx, rax
call sym.wcslen
add rax, rbx
add rax, 0x229
add rax, rax
mov rcx, rax
call sym.malloc
mov qword [rbp + 0x1b0], rax
cmp qword [rbp + 0x1b0], 0
jne 0x140015d0f
call sym._errno
mov dword [rax], 0xc
mov eax, 0
jmp 0x140015e57
mov rax, qword [rbp + 0x1b0]
lea rcx, [rax + 0x44c]
lea rax, [rbp - 0x60]
mov rdx, rax
call sym.wcscpy
mov rax, qword [rbp + 0x1b0]
movzx eax, word [rax + 0x44c]
test ax, ax
je 0x140015dc0
mov rax, qword [rbp + 0x1b0]
add rax, 0x44c
mov rcx, rax
call sym.wcslen
lea rdx, [rax - 1]
mov rax, qword [rbp + 0x1b0]
add rdx, 0x220
movzx eax, word [rax + rdx*2 + 0xc]
cmp ax, 0x2f
je 0x140015dc0
mov rax, qword [rbp + 0x1b0]
add rax, 0x44c
mov rcx, rax
call sym.wcslen
lea rdx, [rax - 1]
mov rax, qword [rbp + 0x1b0]
add rdx, 0x220
movzx eax, word [rax + rdx*2 + 0xc]
cmp ax, 0x5c
je 0x140015dc0
mov rax, qword [rbp + 0x1b0]
add rax, 0x44c
lea rdx, [0x14010fd20]
mov rcx, rax
call sym.wcscat
mov rax, qword [rbp + 0x1b0]
add rax, 0x44c
lea rdx, [0x14010fd24]
mov rcx, rax
call sym.wcscat
mov rax, qword [rbp + 0x1b0]
mov qword [rax + 0x440], 0xffffffffffffffff
mov rax, qword [rbp + 0x1b0]
mov dword [rax + 0x448], 0
mov rax, qword [rbp + 0x1b0]
mov dword [rax + 0x230], 0
mov rax, qword [rbp + 0x1b0]
mov word [rax + 0x234], 0
mov rax, qword [rbp + 0x1b0]
mov word [rax + 0x236], 0
mov rax, qword [rbp + 0x1b0]
add rax, 0x238
mov r8d, 0x208
mov edx, 0
mov rcx, rax
call sym.memset
mov rax, qword [rbp + 0x1b0]
add rsp, 0x248
pop rbx
pop rbp
ret
Function at 0x1400161d0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbp
mov rbp, rsp
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
cmp qword [rbp + 0x20], 0
je 0x1400161f1
mov rax, qword [rbp + 0x10]
cmp rax, qword [rbp + 0x18]
jne 0x1400161f8
mov eax, 0
jmp 0x140016272
cmp qword [rbp + 0x10], 0
setne dl
cmp qword [rbp + 0x18], 0
setne al
xor eax, edx
test al, al
je 0x140016266
cmp qword [rbp + 0x18], 0
jne 0x14001621c
mov eax, 1
jmp 0x140016272
mov eax, 0xffffffff
jmp 0x140016272
mov rax, qword [rbp + 0x10]
movzx edx, word [rax]
mov rax, qword [rbp + 0x18]
movzx eax, word [rax]
cmp dx, ax
je 0x140016257
mov rax, qword [rbp + 0x10]
movzx edx, word [rax]
mov rax, qword [rbp + 0x18]
movzx eax, word [rax]
cmp dx, ax
jae 0x140016250
mov eax, 0xffffffff
jmp 0x140016272
mov eax, 1
jmp 0x140016272
add qword [rbp + 0x10], 2
add qword [rbp + 0x18], 2
sub qword [rbp + 0x20], 1
cmp qword [rbp + 0x20], 0
jne 0x140016223
mov eax, 0
pop rbp
ret
Function at 0x140016630
Capabilities:
Enumerate disk volumes
Get disk information
Get disk size
Get file size

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0xb0
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
lea rax, [rbp - 0x38]
mov rdx, rax
mov rcx, qword [rbp + 0x10]
mov rax, qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
call rax
mov dword [rbp - 0xc], eax
cmp dword [rbp - 0xc], 0
jne 0x140016674
mov ecx, 9
call sym._set_errno
mov eax, 0xffffffff
jmp 0x14001683b
mov rax, qword [rbp - 0x38]
cmp qword [rbp + 0x18], rax
ja 0x140016688
mov eax, 0
jmp 0x14001683b
lea rax, [rbp - 0x70]
mov rdx, rax
mov rcx, qword [rbp + 0x10]
mov rax, qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
call rax
test eax, eax
jne 0x1400166b4
mov ecx, 0x16
call sym._set_errno
mov eax, 0xffffffff
jmp 0x14001683b
mov edx, 2
mov ecx, 0x33
call sym.calloc
mov qword [rbp - 0x18], rax
mov edx, 2
mov ecx, 0x106
call sym.calloc
mov qword [rbp - 0x20], rax
cmp qword [rbp - 0x18], 0
je 0x1400166e8
cmp qword [rbp - 0x20], 0
jne 0x1400166fc
mov ecx, 9
call sym._set_errno
mov eax, 0xffffffff
jmp 0x14001683b
mov qword [rbp - 8], 0
mov rax, qword [rbp - 0x18]
mov edx, 0x32
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_FindFirstVolumeW]
call rax
mov qword [rbp - 0x28], rax
lea rcx, [rbp - 0x3c]
mov rdx, qword [rbp - 0x20]
mov rax, qword [rbp - 0x18]
mov dword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9, rcx
mov r8d, 0x105
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
call rax
mov dword [rbp - 0xc], eax
mov edx, dword [rbp - 0x54]
mov eax, dword [rbp - 0x3c]
cmp edx, eax
jne 0x140016778
mov rax, qword [rbp - 0x18]
mov qword [rbp - 8], rax
jmp 0x140016796
mov rdx, qword [rbp - 0x18]
mov rax, qword [rbp - 0x28]
mov r8d, 0x32
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_FindNextVolumeW]
call rax
test eax, eax
jne 0x14001671d
mov rax, qword [rbp - 0x28]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_FindVolumeClose]
call rax
cmp qword [rbp - 8], 0
jne 0x1400167b9
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x20]
mov rcx, rax
call sym.free
lea rdx, [rbp - 0x30]
mov rax, qword [rbp - 8]
mov r9d, 0
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
call rax
mov dword [rbp - 0xc], eax
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.free
cmp dword [rbp - 0xc], 0
jne 0x14001680b
mov ecx, 0x1b
call sym._set_errno
mov eax, 0xffffffff
jmp 0x14001683b
mov rax, qword [rbp - 0x38]
mov rcx, rax
mov rax, qword [rbp + 0x18]
sub rax, rcx
mov rdx, rax
mov rax, qword [rbp - 0x30]
cmp rdx, rax
jbe 0x140016836
mov ecx, 0x1b
call sym._set_errno
mov eax, 0xffffffff
jmp 0x14001683b
mov eax, 0
add rsp, 0xb0
pop rbp
ret
Function at 0x1400249d8
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
call sym.__mingw_get_msvcrt_handle
mov rcx, rax
lea rax, str.rand_s
mov rdx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x140024a45
lea rax, [sym.mingw_rand_s]
mov qword [rbp - 8], rax
lea rax, str.advapi32.dll
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LoadLibraryW]
call rax
mov rcx, rax
lea rax, str.SystemFunction036
mov rdx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [0x140153de0], rax
mov rax, qword [rbp - 8]
mov qword [sym.init_rand_s], rax
mov rax, qword [sym.init_rand_s]
mov rcx, qword [rbp + 0x10]
call rax
add rsp, 0x30
pop rbp
ret

Function at 0x140026b00
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1401061c8], eax
cmp eax, 0xffffffff
je sym.pthread_tls_init.cold
add rsp, 0x28
ret

Function at 0x140026b20
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 0x140026c32
mov eax, 0x28
lea rcx, [rsp + 0x20]
jmp 0x140026c0a
add rax, 1
cmp rax, 0x6b
je 0x140026c27
cmp byte [rcx + rax], 0
movsxd rdx, eax
jne 0x140026c00
cmp edx, 0x6a
je 0x140026c27
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 0x140026c1b
Function at 0x140026fd0
Capabilities:
Allocate thread local storage

Disassembly:
push r13
push r12
push rsi
push rbx
sub rsp, 0x28
lea rsi, [0x140153e60]
mov rcx, rsi
call sym.enterOnceObject
lea r13, [rax + 8]
mov r12, rax
mov rcx, r13
call sym.pthread_mutex_lock
mov ebx, dword [0x140153e60]
test ebx, ebx
jne 0x140027040
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1401061c8], eax
cmp eax, 0xffffffff
je sym._pthread_once_raw.part.0.constprop.0.isra.0.cold
mov dword [0x140153e60], 1
mov rcx, r13
call sym.pthread_mutex_unlock
test r12, r12
je 0x140027072
mov rcx, r12
add rsp, 0x28
pop rbx
pop rsi
pop r12
pop r13
jmp sym.leaveOnceObject.part.0
cmp ebx, 1
je 0x140027021
mov ecx, 2
call qword [sym.__acrt_iob_func]
mov r9d, ebx
mov r8, rsi
lea rdx, str._once__p_is__d_n
mov rcx, rax
call sym.fprintf_1
mov rcx, r13
call sym.pthread_mutex_unlock
test r12, r12
jne 0x14002702e
add rsp, 0x28
pop rbx
pop rsi
pop r12
pop r13
ret
Function at 0x1400271c0
Capabilities:
Set thread local storage value

Disassembly:
push rbp
mov rbp, rsp
push r12
push rsi
push rbx
sub rsp, 0x28
mov qword [rbp + 0x10], rcx
call sym._fpreset
lea rcx, [0x1401061b8]
call sym.pthread_mutex_lock
mov rax, qword [rbp + 0x10]
lea r12, [rax + 0x38]
mov rcx, r12
call sym.pthread_mutex_lock
cmp dword [0x140153e60], 1
je 0x1400271ff
call sym._pthread_once_raw.part.0.constprop.0.isra.0
mov rdx, qword [rbp + 0x10]
mov ecx, dword [0x1401061c8]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov rbx, qword [rbp + 0x10]
mov rcx, r12
mov dword [rbx + 0x70], eax
call sym.pthread_mutex_unlock
mov rax, qword [rbp + 0x10]
mov rdx, rbp
lea rcx, [rax + 0xd0]
call sym._setjmp
test eax, eax
je 0x1400272d0
lea rcx, [0x1401061b8]
call sym.pthread_mutex_lock
mov rax, qword [rbp + 0x10]
lea r12, [rax + 0x38]
mov rcx, r12
call sym.pthread_mutex_lock
mov rax, qword [rbp + 0x10]
mov rcx, qword [rax + 0x30]
mov rbx, qword [rax + 8]
test rcx, rcx
je 0x140027272
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbp + 0x10]
cmp qword [rax + 0x28], 0
mov qword [rax + 0x30], 0
je 0x14002732e
mov rcx, r12
call sym.pthread_mutex_unlock
mov rcx, r12
call sym.pthread_mutex_destroy
mov rax, qword [rbp + 0x10]
mov qword [rax + 0x38], 0xffffffffffffffff
mov dword [rax + 0xbc], 1
mov r12, qword [sym.imp.KERNEL32.dll_Sleep]
lea rsi, [0x1401061b8]
mov rcx, rsi
call sym.pthread_mutex_unlock
test eax, eax
jne 0x140027326
xor ecx, ecx
call r12
jmp 0x1400272bd
lea rcx, [0x1401061b8]
call sym.pthread_mutex_unlock
mov rax, qword [rbp + 0x10]
mov rax, qword [rax + 0x10]
test rax, rax
je 0x140027364
mov rsi, qword [rbp + 0x10]
mov rcx, qword [rsi + 8]
call rax
mov r12, rax
nop
nop
lea rcx, [0x1401061b8]
call sym.pthread_mutex_lock
mov rax, qword [rbp + 0x10]
mov rcx, qword [rax + 0x1d8]
mov qword [rax + 8], r12
test rcx, rcx
je 0x14002724b
call sym._pthread_cleanup_dest.part.0
jmp 0x14002724b
mov ecx, ebx
call qword [sym.imp.msvcrt.dll__endthreadex]
mov rax, qword [rbp + 0x10]
mov rcx, r12
mov dword [rax], 0xdeadbeef
call sym.pthread_mutex_unlock
mov rcx, r12
call sym.pthread_mutex_destroy
mov rcx, qword [rbp + 0x10]
call sym.push_pthread_mem
mov ecx, dword [0x1401061c8]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x1400272af
mov r12d, pe_nt_image_headers64
jmp 0x1400272f6
Function at 0x140027370
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x48
cmp dword [0x140153e60], 1
je 0x140027387
call sym._pthread_once_raw.part.0.constprop.0.isra.0
mov ecx, dword [0x1401061c8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
je 0x1400273b0
mov rax, r12
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop r12
ret
call sym.pop_pthread_mem
cmp qword [sym.__dyn_tls_pthread], 0
mov rbx, rax
je 0x14002739b
test rax, rax
je 0x14002739b
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 0x1400274ba
mov rdi, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rbx + 0x68], 0xffffffffffffffff
mov dword [rbx + 0xb8], 0
mov qword [rbx + 0x28], 0
call rdi
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov r12, rax
call rdi
mov dword [rsp + 0x30], 2
mov r8, rsi
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 [0x1401061c8]
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 rdi
pop r12
ret
call sym.replace_spin_keys.part.0
nop