joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14004b100
Capabilities:
Create thread

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x38
mov rax, r8
mov r8, rdx
mov rdi, rcx
mov rsi, qword [rsp + 0x90]
mov edx, dword [rsp + 0x80]
mov rbx, qword [rsp + 0x88]
mov qword [rsi], 0
mov rcx, qword [rcx]
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], edx
mov qword [rsp + 0x20], r9
xor r14d, r14d
xor edx, edx
mov r9, rax
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
test rax, rax
je 0x14004b198
mov rbx, rax
mov rdi, qword [rdi]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r14d
mov dword [rsp + 0x30], 3
mov rcx, rax
mov rdx, rbx
mov r8, rdi
mov r9, rsi
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
xor ecx, ecx
test eax, eax
sete cl
lea eax, [rcx + rcx*4]
add rsp, 0x38
pop rbx
pop rdi
pop rsi
pop r14
ret
add rsp, 0x38
pop rbx
pop rdi
pop rsi
pop r14
jmp qword [sym.imp.KERNEL32.dll_GetLastError]

Function at 0x140050c60
Capabilities:
Terminate process

Disassembly:
push rsi
sub rsp, 0x20
mov rsi, rcx
call fcn.140008ce0
test al, al
je 0x140050c82
mov rcx, qword [rsi]
xor edx, edx
add rsp, 0x20
pop rsi
jmp qword [sym.imp.KERNEL32.dll_TerminateProcess]
nop
add rsp, 0x20
pop rsi
ret

Function at 0x1400522c0
Capabilities:
Get system information on windows

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x58
mov rsi, rcx
mov rax, qword [0x140062018]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov eax, dword [0x140062d64]
mov ecx, dword [0x1400624b0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140052364
mov rbx, qword [rsi + 0x10]
test rbx, rbx
je 0x140052340
mov rdi, qword [rsi + 8]
shl rbx, 4
add rbx, rdi
mov r15d, dword [0x140062d60]
lea r14, [rsp + 0x20]
mov r12, qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r8d, dword [rdi]
mov rcx, qword [rdi + 8]
mov rdx, r15
mov r9, r14
call r12
add rdi, 0x10
cmp rdi, rbx
jne 0x140052327
mov qword [rsi + 0x10], 0
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.14002fae0
nop
add rsp, 0x58
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
lea rcx, [0x140062d64]
call fcn.14002e8cc
cmp dword [0x140062d64], 0xffffffff
jne 0x140052300
lea rdi, [rsp + 0x20]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [rdi + 4]
mov dword [0x140062d60], eax
lea rcx, [0x140062d64]
call fcn.14002e86c
jmp 0x140052300
Function at 0x2fc4d7600
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 sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call fcn.2fc4d86e0
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop

Function at 0x2fc4d8002
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x2fc4fa108]
test eax, eax
je 0x2fc4d809a
lea rax, [0x2fc4fa0e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x2fc4fa110]
mov qword [rbp - 8], rax
jmp 0x2fc4d807e
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 0x2fc4d8072
cmp qword [rbp - 0x10], 0
je 0x2fc4d8072
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 0x2fc4d8038
lea rax, [0x2fc4fa0e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x2fc4d809b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x2fc4d81a0
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 0x2fc4d81c8
mov eax, 0
jmp 0x2fc4d8216
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 0x2fc4d81f1
mov eax, 0
jmp 0x2fc4d8216
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 0x2fc4d8211
mov eax, 0
jmp 0x2fc4d8216
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x2fc4d821c
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 0x2fc4d829a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x2fc4d8291
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 0x2fc4d8291
mov rax, qword [rbp - 8]
jmp 0x2fc4d82af
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 0x2fc4d8264
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x1400077b0
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x508
mov rsi, rcx
mov rax, qword [0x140031ef8]
xor rax, rsp
mov qword [rsp + 0x500], rax
mov dword [rsp + 0x30], 0xfc781ff8
lea rbx, [rsp + 0xf0]
mov qword [rsp + 0x70], rbx
mov rax, qword [rsp + 0x70]
lea rax, [rsp + 0xd8]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x58]
lea rax, [rsp + 0xd4]
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x78]
lea rax, [rsp + 0x100]
mov qword [rsp + 0x80], rax
mov rax, qword [rsp + 0x80]
lea rax, [rcx + 0x70]
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x60]
mov eax, dword [rax]
mov qword [rsp + 0xf0], rax
shl eax, 4
add eax, 0x10
mov dword [rsp + 0x40], eax
mov edx, dword [rcx + 0x50]
mov eax, dword [rsp + 0x40]
add eax, edx
lea r12, [rsp + 0xf8]
mov qword [rsp + 0xf8], rax
lea r14, [rcx + 0x48]
mov rcx, qword [rcx + 0x48]
mov rbp, qword [sym.imp.KERNEL32.dll_SetFilePointer]
xor r15d, r15d
xor r8d, r8d
xor r9d, r9d
call rbp
mov rcx, qword [rsi + 0x48]
mov qword [rsp + 0x20], 0
mov rdi, qword [sym.imp.KERNEL32.dll_WriteFile]
lea r9, [rsp + 0xec]
mov rdx, rbx
mov r8d, 8
call rdi
mov edx, dword [rsi + 0x50]
add edx, 8
mov dword [rsi + 0x50], edx
mov rcx, qword [rsi + 0x48]
xor r8d, r8d
xor r9d, r9d
call rbp
mov rcx, qword [rsi + 0x48]
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0xec]
mov rdx, r12
mov r8d, 8
call rdi
mov eax, dword [rsi + 0x50]
add eax, 8
mov dword [rsi + 0x50], eax
mov rcx, qword [rsp + 0x60]
mov ecx, dword [rcx]
shl rcx, 4
mov qword [rsp + 0x88], rax
add rcx, qword [rsp + 0x88]
mov dword [rsi + 0x50], ecx
mov ebp, ecx
mov qword [rsp + 0xc0], rsi
lea rax, [rsi + 0x68]
mov qword [rsp + 0xc8], rax
mov ecx, 0x8e233308
mov r13d, 0x7bc3e844
mov esi, 0x21e7ec58
mov ebx, 0x12417c7d
jmp 0x140007940
mov edx, 0x110
cmp ecx, 0x45be8e3
jl 0x140007952
mov edx, 0x68
mov rax, qword [0x140031ce0]
mov rdx, qword [rax + rdx - 0x76113dec]
add rdx, r13
add rax, 0xffffffff89eec214
jmp rdx

Function at 0x14000d8d0
Capabilities:
Get common file path

Disassembly:
push rbp
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x498
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x410], 0xfffffffffffffffe
mov r14, rdx
mov r15d, ecx
lea rcx, [rbp + 0xd0]
mov r8d, 0x104
xor edx, edx
call fcn.140010790
lea rbx, [rbp - 0x40]
mov r8d, 0x104
mov rcx, rbx
xor edx, edx
call fcn.140010790
lea rcx, [rbp + 0x1e0]
mov r8d, 0x104
xor edx, edx
call fcn.140010790
mov ecx, 0x104
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
xor ecx, ecx
test eax, eax
sete cl
shl rcx, 4
mov rax, qword [0x140031e30]
mov rsi, 0xffffffffcf981834
mov rax, qword [rcx + rax + 0x5e38dae8]
add rax, rsi
jmp rax

Function at 0x1400164ec
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140016250
Function at 0x1400111ea
Capabilities:
Terminate process

Disassembly:
jmp 0x140012da0
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x28
ret

Function at 0x14001126c
Capabilities:
Parse pe header

Disassembly:
jmp 0x1400140f0
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x140014110
xor al, al
jmp 0x140014191
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140014123
xor al, al
jmp 0x140014191
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x14001414d
xor al, al
jmp 0x140014191
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x140014161
xor al, al
jmp 0x140014191
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x140014173
xor al, al
jmp 0x140014191
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x14001418f
xor al, al
jmp 0x140014191
mov al, 1
add rsp, 0x38
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x0059a760]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x0059a770]
mov dword [rax], 1
mov rax, qword [0x0059a780]
mov dword [rax], 1
mov rax, qword [0x0059a750]
mov dword [rax], 1
mov rax, qword [0x0059a4f0]
cmp word [rax], 0x5a4d
jne 0x401067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010d0
mov rax, qword [0x0059a740]
mov dword [0x005cf020], ecx
mov eax, dword [rax]
test eax, eax
je 0x4010c0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x0059a5f0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x0059a5d0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x00599910]
cmp dword [rax], 1
je 0x401108
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401084
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x401120
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 0x4067dc
Capabilities:
Read file on windows

Disassembly:
push rbp
push rdi
push rbx
sub rsp, 0x450
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x3f0], rcx
mov qword [rbp + 0x3f8], rdx
mov qword [rbp + 0x400], r8
mov qword [rbp + 0x408], r9
mov qword [rbp + 0x3c8], 0x3e8
mov qword [rbp - 0x30], 0
mov qword [rbp - 0x28], 0
lea rdx, [rbp - 0x20]
mov eax, 0
mov ecx, 0x7b
mov rdi, rdx
rep stosq qword [rdi], rax
mov dword [rbp + 0x3c4], 0
mov dword [rbp + 0x3bc], 0
lea rcx, [rbp + 0x3bc]
lea rdx, [rbp - 0x30]
mov rax, qword [rbp + 0x400]
mov qword [rsp + 0x20], 0
mov r9, rcx
mov r8d, 0x3e8
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ReadFile]
call rax
mov dword [rbp + 0x3c4], eax
cmp dword [rbp + 0x3c4], 0
je 0x4068fb
mov eax, dword [rbp + 0x3bc]
test eax, eax
je 0x4068fb
lea rax, [rbp + 0x3c3]
mov rcx, rax
call fcn.0049ed30
mov eax, dword [rbp + 0x3bc]
mov r8d, eax
lea rcx, [rbp + 0x3c3]
lea rdx, [rbp - 0x30]
lea rax, [rbp - 0x50]
mov r9, rcx
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.basic_string_char_const__unsigned_long_long__std::allocator_char__const_
lea rax, [rbp + 0x3c3]
mov rcx, rax
call sym.std::allocator_char_::allocator__
lea rdx, [rbp - 0x50]
mov rax, qword [rbp + 0x3f8]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.operator_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const_
lea rax, [rbp - 0x50]
mov rcx, rax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
jmp 0x406843
mov rax, qword [rbp + 0x400]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
jmp 0x406948
add rsp, 0x450
pop rbx
pop rdi
pop rbp
ret

Function at 0x406a3d
Capabilities:
Terminate process

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov dword [rbp + 0x10], ecx
mov r8d, dword [rbp + 0x10]
mov edx, 1
mov ecx, 0x100001
mov rax, qword [sym.imp.KERNEL32.dll_OpenProcess]
call rax
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_TerminateProcess]
call rax
nop
add rsp, 0x30
pop rbp
ret
Function at 0x406a7f
Capabilities:
Get session user name

Disassembly:
push rbp
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x80]
mov qword [rbp - 0x10], rcx
mov ecx, 0x101
call sym.malloc
mov qword [rbp - 0x38], rax
mov dword [rbp - 0x40], 0x101
lea rdx, [rbp - 0x40]
mov rax, qword [rbp - 0x38]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_GetUserNameA]
call rax
test eax, eax
setne al
test al, al
je 0x406b1c
lea rax, [rbp - 0x3a]
mov rcx, rax
call fcn.0049ed30
lea rcx, [rbp - 0x3a]
mov rdx, qword [rbp - 0x38]
lea rax, [rbp - 0x60]
mov r8, rcx
mov rcx, rax
call method.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 - 0x3a]
mov rcx, rax
call sym.std::allocator_char_::allocator__
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.free
lea rax, [rbp - 0x60]
mov rdx, rax
mov rcx, qword [rbp - 0x10]
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.basic_string_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____
lea rax, [rbp - 0x60]
mov rcx, rax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
jmp 0x406b8c
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.free
lea rax, [rbp - 0x39]
mov rcx, rax
call fcn.0049ed30
lea rax, [rbp - 0x39]
mov r8, rax
mov edx, 0
mov rcx, qword [rbp - 0x10]
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string_std.allocator_char____char_const__std::allocator_char__const_
nop
lea rax, [rbp - 0x39]
mov rcx, rax
call sym.std::allocator_char_::allocator__
jmp 0x406b8c
mov rax, qword [rbp - 0x10]
add rsp, 0x58
pop rbx
pop rbp
ret
Function at 0x4084a0
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov r11d, dword [rsp + 0x90]
mov eax, r11d
and eax, 0xfffffff9
cmp eax, 1
jne 0x408686
mov rax, r9
mov rdi, rdx
mov r12, rcx
mov rbp, r8
movabs rdx, 0xaaaaaaaaaaaaaaab
mov rbx, r9
mul rdx
shr rdx, 1
mov rsi, rdx
lea rax, [rdx + rdx*2]
mov rdx, r9
shl rsi, 2
sub rdx, rax
je 0x408507
test r11b, 2
jne 0x408665
add rsi, 4
cmp rsi, rdi
jae 0x408686
and r11d, 4
je 0x408595
test rbx, rbx
je 0x40862a
lea r14, [rbp + rbx]
xor r11d, r11d
xor ebx, ebx
xor r10d, r10d
movzx eax, byte [rbp]
shl r11d, 8
add r10, 8
add r11d, eax
sub r10, 6
mov eax, r11d
mov r15, rbx
add rbx, 1
mov ecx, r10d
shr eax, cl
mov ecx, eax
and ecx, 0x3f
call sym.b64_byte_to_urlsafe_char
mov byte [r12 + rbx - 1], al
cmp r10, 5
ja 0x40853b
add rbp, 1
cmp r14, rbp
jne 0x40852c
test r10, r10
je 0x40860b
mov ecx, 6
sub ecx, r10d
shl r11d, cl
mov ecx, r11d
and ecx, 0x3f
call sym.b64_byte_to_urlsafe_char
mov byte [r12 + rbx], al
lea rbx, [r15 + 2]
jmp 0x40860b
test rbx, rbx
je 0x40862a
lea r14, [rbp + rbx]
xor r10d, r10d
xor ebx, ebx
movzx eax, byte [rbp]
shl r11d, 8
add r10, 8
add r11d, eax
sub r10, 6
mov eax, r11d
mov r15, rbx
add rbx, 1
mov ecx, r10d
shr eax, cl
mov ecx, eax
and ecx, 0x3f
call sym.b64_byte_to_char
mov byte [r12 + rbx - 1], al
cmp r10, 5
ja 0x4085b7
add rbp, 1
cmp r14, rbp
jne 0x4085a8
test r10, r10
je 0x40860b
mov ecx, 6
sub ecx, r10d
shl r11d, cl
mov ecx, r11d
and ecx, 0x3f
call sym.b64_byte_to_char
mov byte [r12 + rbx], al
lea rbx, [r15 + 2]
cmp rsi, rbx
jae 0x40862a
mov r8d, 0xe6
lea rdx, str..._.._.._libsodium_1.0.18_src_libsodium_sodium_codecs.c
lea rcx, str.b64_pos___b64_len
call qword [sym.imp.msvcrt.dll__assert]
cmp rbx, rsi
jae 0x408672
add rbx, r12
lea rax, [r12 + rsi]
mov byte [rbx], 0x3d
add rbx, 1
cmp rax, rbx
jne 0x408636
add rsi, 1
mov byte [r12 + rsi - 1], 0
cmp rdi, rsi
ja 0x408642
add rsp, 0x28
mov rax, r12
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
shr rdx, 1
lea rsi, [rsi + rdx + 2]
jmp 0x408507
mov rsi, rbx
add rsi, 1
mov byte [r12 + rsi - 1], 0
cmp rdi, rsi
ja 0x408642
jmp 0x408651
call sym.sodium_misuse
nop dword [rax + rax]
Function at 0x409080
Capabilities:
Get system information on windows

Disassembly:
push rbp
mov rbp, rsp
and rsp, 0xfffffffffffffff0
sub rsp, 0x50
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [rsp + 0x24]
mov qword [0x005cf1b0], rax
cmp rax, 0xf
jbe 0x4090bd
mov edx, 0x10
lea rcx, [0x005cf1a0]
call sym.randombytes_buf
xor eax, eax
leave
ret
call sym.sodium_misuse
nop dword [rax]
nop word cs:[rax + rax]

Function at 0x409530
Capabilities:
Encode data using xor

Disassembly:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
and rsp, 0xfffffffffffffff0
sub rsp, 0xa0
mov qword [rbp + 0x10], rcx
mov r10, qword [rbp + 0x30]
mov qword [rbp + 0x20], r8
mov rcx, qword [rbp + 0x38]
test r8, r8
je 0x40965e
mov rbx, rdx
xor eax, eax
lea r15, [rsp + 0x40]
movzx edx, byte [rcx + rax]
mov byte [r15 + rax], dl
add rax, 1
cmp rax, 0x20
jne 0x40956d
xor eax, eax
lea r12, [rsp + 0x30]
movzx ecx, byte [r9 + rax]
mov byte [r12 + rax], cl
add rax, 1
cmp rax, 8
jne 0x409586
lea r13, [rsp + 0x38]
mov rax, r13
mov byte [rax], r10b
add rax, 1
shr r10, 8
cmp rax, r15
jne 0x4095a1
cmp qword [rbp + 0x20], 0x3f
jbe 0x409671
mov rax, qword [rbp + 0x20]
mov rsi, qword [rbp + 0x10]
lea r14, [rsp + 0x60]
sub rax, 0x40
and rax, 0xffffffffffffffc0
add rax, 0x40
mov qword [rsp + 0x28], rax
lea rdi, [rbx + rax]
xor r9d, r9d
mov r8, r15
mov rdx, r12
mov rcx, r14
call sym.crypto_core_salsa20
xor eax, eax
movzx r9d, byte [rbx + rax]
xor r9b, byte [r14 + rax]
mov byte [rsi + rax], r9b
add rax, 1
cmp rax, 0x40
jne 0x4095f1
mov r9, r13
mov eax, 1
movzx r10d, byte [r9]
add r9, 1
add eax, r10d
mov byte [r9 - 1], al
shr eax, 8
cmp r9, r15
jne 0x409610
add rbx, 0x40
add rsi, 0x40
cmp rdi, rbx
jne 0x4095de
mov rax, qword [rsp + 0x28]
add qword [rbp + 0x10], rax
and qword [rbp + 0x20], 0x3f
jne 0x409679
mov edx, 0x40
mov rcx, r14
call sym.sodium_memzero
mov edx, 0x20
mov rcx, r15
call sym.sodium_memzero
lea rsp, [rbp - 0x38]
xor eax, eax
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov rdi, rbx
lea r14, [rsp + 0x60]
mov rdx, r12
xor r9d, r9d
mov r8, r15
mov rcx, r14
call sym.crypto_core_salsa20
mov r12d, dword [rbp + 0x20]
xor eax, eax
mov rcx, qword [rbp + 0x10]
movzx edx, byte [rdi + rax]
xor dl, byte [r14 + rax]
mov byte [rcx + rax], dl
add rax, 1
cmp r12d, eax
ja 0x409690
jmp 0x409644
Function at 0x40c820
Capabilities:
Encode data using xor
Encrypt data using salsa20 or chacha

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov qword [rsp + 0x70], rcx
test r9, r9
je 0x40ca5c
mov edi, dword [r9]
mov ebx, dword [r9 + 4]
mov r10d, dword [r9 + 8]
mov r15d, dword [r9 + 0xc]
mov eax, dword [r8 + 4]
mov r11d, dword [rdx + 4]
mov dword [rsp + 0x1c], 0xa
mov r13d, dword [rdx]
mov r12d, dword [r8]
mov ecx, dword [r8 + 0xc]
mov r14d, dword [r8 + 0x10]
mov dword [rsp + 8], eax
mov eax, dword [r8 + 8]
mov esi, dword [r8 + 0x14]
mov dword [rsp + 4], r11d
mov r9d, dword [r8 + 0x18]
mov r11d, dword [rdx + 8]
mov dword [rsp + 0xc], eax
mov edx, dword [rdx + 0xc]
mov eax, dword [r8 + 0x1c]
lea r8d, [rdi + rsi]
lea ebp, [r13 + r10]
rol r8d, 7
rol ebp, 7
xor ecx, r8d
xor ebp, eax
lea r8d, [rcx + rdi]
rol r8d, 9
xor r8d, r11d
mov r11d, r8d
lea r8d, [rcx + r8]
rol r8d, 0xd
mov dword [rsp + 0x10], r11d
xor r8d, esi
mov esi, r8d
mov r8d, r11d
lea r11d, [r14 + r15]
add r8d, esi
mov dword [rsp + 0x14], esi
rol r11d, 7
xor r11d, dword [rsp + 0xc]
ror r8d, 0xe
xor edi, r8d
lea r8d, [r12 + rbx]
rol r8d, 7
xor edx, r8d
lea r8d, [rdx + rbx]
rol r8d, 9
mov esi, r8d
xor esi, r9d
lea r8d, [rdx + rsi]
mov dword [rsp + 0x18], esi
rol r8d, 0xd
xor r12d, r8d
lea r8d, [rsi + r12]
ror r8d, 0xe
xor ebx, r8d
lea r8d, [rbp + r10]
rol r8d, 9
xor r8d, dword [rsp + 8]
lea eax, [rbp + r8]
rol eax, 0xd
xor r13d, eax
lea eax, [r8 + r13]
ror eax, 0xe
xor r10d, eax
lea eax, [r11 + r15]
rol eax, 9
xor eax, dword [rsp + 4]
lea r9d, [r11 + rax]
rol r9d, 0xd
xor r9d, r14d
lea esi, [rax + r9]
ror esi, 0xe
xor r15d, esi
lea esi, [rdi + r11]
rol esi, 7
xor r12d, esi
lea esi, [rdi + r12]
rol esi, 9
xor esi, r8d
lea r8d, [r12 + rsi]
mov dword [rsp + 8], esi
rol r8d, 0xd
mov r14d, r8d
xor r14d, r11d
add esi, r14d
mov dword [rsp + 0xc], r14d
mov r8d, esi
lea esi, [rbp + r15]
ror r8d, 0xe
rol esi, 7
xor esi, dword [rsp + 0x14]
xor edi, r8d
lea r8d, [rcx + rbx]
rol r8d, 7
xor r13d, r8d
lea r8d, [rbx + r13]
rol r8d, 9
mov r14d, r8d
xor r14d, eax
lea eax, [r13 + r14]
mov dword [rsp + 4], r14d
rol eax, 0xd
xor ecx, eax
lea eax, [r14 + rcx]
lea r14d, [rdx + r10]
rol r14d, 7
ror eax, 0xe
xor r14d, r9d
xor ebx, eax
lea r9d, [r15 + rsi]
lea r11d, [r10 + r14]
rol r9d, 9
xor r9d, dword [rsp + 0x18]
rol r11d, 9
xor r11d, dword [rsp + 0x10]
lea eax, [r14 + r11]
rol eax, 0xd
xor edx, eax
lea eax, [r11 + rdx]
ror eax, 0xe
xor r10d, eax
lea eax, [rsi + r9]
rol eax, 0xd
xor eax, ebp
lea r8d, [r9 + rax]
ror r8d, 0xe
xor r15d, r8d
sub dword [rsp + 0x1c], 1
jne 0x40c88f
mov rax, qword [rsp + 0x70]
mov ecx, dword [rsp + 4]
mov dword [rax], edi
mov dword [rax + 4], ebx
mov dword [rax + 8], r10d
mov dword [rax + 0xc], r15d
mov dword [rax + 0x10], r13d
mov dword [rax + 0x14], ecx
mov dword [rax + 0x18], r11d
mov dword [rax + 0x1c], edx
add rsp, 0x28
xor eax, eax
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r15d, 0x6b206574
mov r10d, 0x79622d32
mov ebx, 0x3320646e
mov edi, 0x61707865
jmp 0x40c84d
Function at 0x40ced0
Capabilities:
Hash data using sha512

Disassembly:
movabs rax, 0xbb67ae8584caa73b
push rdi
lea rdi, [rcx + 0x48]
mov r9, rcx
mov qword [rcx + 8], rax
and rdi, 0xfffffffffffffff8
movabs rax, 0x3c6ef372fe94f82b
movabs r8, 0x6a09e667f3bcc908
mov qword [rcx + 0x10], rax
movabs rax, 0xa54ff53a5f1d36f1
mov qword [rcx + 0x18], rax
movabs rax, 0x510e527fade682d1
mov qword [rcx + 0x20], rax
movabs rax, 0x9b05688c2b3e6c1f
mov qword [rcx + 0x28], rax
movabs rax, 0x1f83d9abfb41bd6b
mov qword [rcx + 0x30], rax
movabs rax, 0x5be0cd19137e2179
mov qword [rcx + 0x38], rax
mov eax, ecx
sub eax, edi
mov qword [rcx], r8
mov qword [rcx + 0x40], 0
mov qword [rcx + 0x161], 0
lea ecx, [rax + 0x169]
xor eax, eax
shr ecx, 3
rep stosq qword [rdi], rax
mov rcx, r8
jmp 0x40cf79
mov rcx, qword [r9 + rax*8]
xor rcx, qword [rdx + rax*8]
mov qword [r9 + rax*8], rcx
add rax, 1
cmp rax, 8
jne 0x40cf75
xor eax, eax
pop rdi
ret