joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400b3564
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 0x1400b3594
xor eax, eax
jmp 0x1400b3657
mov rbp, rbx
cmp word [rax], si
je 0x1400b35b9
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x1400b35a0
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x1400b359c
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.1400a91cc
movsxd r14, eax
test eax, eax
jne 0x1400b35f7
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x1400b358d
mov rcx, r14
call fcn.1400a5ce8
mov rdi, rax
test rax, rax
jne 0x1400b3610
xor ecx, ecx
call fcn.1400a3348
jmp 0x1400b35ec
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.1400a91cc
test eax, eax
jne 0x1400b3641
mov rcx, rdi
call fcn.1400a3348
jmp 0x1400b364b
xor ecx, ecx
call fcn.1400a3348
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 0x1400b3674
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x1400b36fb
mov rsi, rbx
cmp word [rax], bp
je 0x1400b36ba
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x1400b36a4
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x1400b36a0
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.1400a5ce8
mov rdi, rax
test rax, rax
je 0x1400b36e8
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.1400c0990
mov rbp, rdi
xor ecx, ecx
call fcn.1400a3348
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x1400b4ab8
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400b4b02
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400b4b02
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400b4b02
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400b4b02
cmp dword [rcx + 0x84], 0xe
jbe 0x1400b4b02
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x1400b4b04
xor al, al
add rsp, 0x28
ret

Function at 0x1400b9ed4
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rbx, rdx
lea r8, [rsp + 0x60]
mov edi, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
test eax, eax
jne 0x1400b9f0e
xor r9d, r9d
mov dword [rsp + 0x60], r9d
jmp 0x1400b9f13
mov r9d, dword [rsp + 0x60]
and qword [rsp + 0x30], 0
mov r8d, edi
and dword [rsp + 0x28], 0
xor edx, edx
mov ecx, 0x1300
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x1400b9f5c
mov r8, qword [rbx]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x1400df560]
cmp byte [rcx + rax], 0
je 0x1400b9f5c
dec r8
sub rdx, 1
jne 0x1400b9f42
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret

Function at 0x1400ba6bc
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, rcx
mov rdx, rcx
mov ecx, 0x105
call fcn.1400b9fec
mov ebx, eax
test eax, eax
jne 0x1400ba6ec
and dword [rsp + 0x38], eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x3c], eax
jmp 0x1400ba748
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400ba73f
test al, 0x10
je 0x1400ba73f
bt eax, 0xa
jae 0x1400ba738
mov r9d, 0x2000000
lea rcx, [rsp + 0x38]
mov r8d, 0x80
mov rdx, rdi
call fcn.1400ba760
mov rcx, qword [rsp + 0x38]
mov edi, eax
cmp rcx, 0xffffffffffffffff
je 0x1400ba734
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x1400ba758
test edi, edi
jne 0x1400ba73f
and dword [rsp + 0x3c], 0
jmp 0x1400ba744
or dword [rsp + 0x3c], 0xffffffff
mov dword [rsp + 0x38], ebx
mov rax, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
call fcn.14009f9a0
int3
Function at 0x1400c04f8
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.1400a5abc
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.1400a5abc
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x1400c0648
cmp rax, 0xffffffffffffffff
je 0x1400c0648
xor edi, edi
test rbp, rbp
jle 0x1400c05f3
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.1400a39b0
mov rbx, rax
test rax, rax
jne 0x1400c0580
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x1400c05e9
mov edx, 0x8000
mov ecx, r14d
call fcn.1400bcec0
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.1400a3038
cmp eax, 0xffffffff
je 0x1400c05c9
cdqe
sub rbp, rax
test rbp, rbp
jg 0x1400c0590
mov edx, r15d
mov ecx, r14d
call fcn.1400bcec0
jmp 0x1400c05e9
cmp byte [rsi + 0x38], dil
je 0x1400c05e0
cmp dword [rsi + 0x34], 5
jne 0x1400c05e0
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], send
cmp byte [rsi + 0x30], dil
je 0x1400c05e9
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.1400a3348
jmp 0x1400c065c
jns 0x1400c065c
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.1400a5abc
cmp rax, 0xffffffffffffffff
jne 0x1400c0614
cmp byte [rsi + 0x30], dil
je 0x1400c065c
mov edi, dword [rsi + 0x2c]
jmp 0x1400c065c
mov ecx, r14d
call fcn.1400ab214
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1400c065c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, recv
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], send
jmp 0x1400c065c
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x1400c0655
mov eax, dword [rsi + 0x2c]
jmp 0x1400c065a
mov eax, socket
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.1400a5abc
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 0x1400c0730
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1400c0758
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x1400c0758
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x245861500
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
pxor xmm0, xmm0
mov qword [rcx + 0x10], 0
mov rsi, rcx
movups xmmword [rcx], xmm0
mov ecx, 0x108e00
call fcn.245881c20
lea rdi, [rax + 0x108e00]
mov qword [rsi], rax
mov rcx, rax
mov rbx, rax
mov qword [rsi + 0x10], rdi
mov rdx, qword [sym.payload.dll_globalByteArray]
mov r8d, 0x108e00
call sub.msvcrt.dll_memcpy
mov qword [rsi + 8], rdi
mov rbp, qword [sym.payload.dll_encryptionKey]
lea rdi, [rsp + 0x30]
mov qword [rsp + 0x20], rdi
mov rcx, rbp
call sub.msvcrt.dll_strlen
cmp rax, 1
je 0x245861610
test rax, rax
jne 0x2458615e0
mov qword [rsp + 0x28], rax
xor ecx, ecx
mov byte [rsp + rax + 0x30], 0
mov r8, qword [rsp + 0x28]
nop word [rax + rax]
mov rax, rcx
xor edx, edx
div r8
mov rax, qword [rsp + 0x20]
movzx eax, byte [rax + rdx]
xor byte [rbx + rcx], al
add rcx, 1
mov rbx, qword [rsi]
mov rax, qword [rsi + 8]
sub rax, rbx
cmp rcx, rax
jb 0x245861590
mov rcx, qword [rsp + 0x20]
cmp rcx, rdi
je 0x2458615cf
mov rax, qword [rsp + 0x30]
lea rdx, [rax + 1]
call fcn.245881c10
mov rax, rsi
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov r8, rdi
mov rdx, rbp
cmp eax, 8
jae 0x245861620
xor ecx, ecx
test al, 4
jne 0x245861660
test al, 2
jne 0x245861648
test al, 1
je 0x245861576
movzx edx, byte [rdx + rcx]
mov byte [r8 + rcx], dl
jmp 0x245861576
movzx edx, byte [rbp]
mov byte [rsp + 0x30], dl
jmp 0x245861576
mov r8d, eax
xor edx, edx
and r8d, 0xfffffff8
mov ecx, edx
add edx, 8
mov r9, qword [rbp + rcx]
mov qword [rdi + rcx], r9
cmp edx, r8d
jb 0x245861629
lea r8, [rdi + rdx]
add rdx, rbp
jmp 0x2458615eb
movzx r9d, word [rdx + rcx]
mov word [r8 + rcx], r9w
add rcx, 2
test al, 1
je 0x245861576
jmp 0x2458615fd
mov ecx, dword [rdx]
mov dword [r8], ecx
mov ecx, 4
test al, 2
je 0x2458615f5
jmp 0x245861648
Function at 0x2458775e0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, 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.24587f4c0
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.24587f4c0
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x245877650
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x245991064]
mov rbx, rcx
test esi, esi
jle 0x245877780
mov rax, qword [0x245991068]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x24587769b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x245877725
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x245877680
mov rcx, rbx
call fcn.245877f70
mov rdi, rax
test rax, rax
je 0x2458777a2
mov rax, qword [0x245991068]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.2458780b0
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x245991068]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x245877787
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x24587771e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x245877730
add dword [0x245991064], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x245991068]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x24587771e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.2458775e0
nop dword [rax]
xor esi, esi
jmp 0x2458776a8
mov rax, qword [0x245991068]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.2458775e0
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.2458775e0
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x245877c60
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
cmp edx, 2
je 0x245877d90
ja 0x245877ca8
test edx, edx
je 0x245877d28
mov eax, dword [0x245991088]
test eax, eax
je 0x245877e10
mov dword [0x245991088], 1
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp edx, 3
jne 0x245877c95
mov eax, dword [0x245991088]
test eax, eax
je 0x245877c95
lea r12, [0x2459910a0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x245991080]
test rbx, rbx
je 0x245877d14
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test rsi, rsi
je 0x245877e38
test eax, eax
jne 0x245877e38
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x245877ce8
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x245877c95
mov eax, dword [0x245991088]
test eax, eax
jne 0x245877da8
mov eax, dword [0x245991088]
cmp eax, 1
jne 0x245877c95
mov rbx, qword [0x245991080]
test rbx, rbx
je 0x245877d61
nop dword [rax]
mov rcx, rbx
mov rbx, qword [rbx + 0x10]
call fcn.245880000
test rbx, rbx
jne 0x245877d50
lea rcx, [0x2459910a0]
mov qword [0x245991080], 0
mov dword [0x245991088], 0
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jmp 0x245877c95
call fcn.245878240
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
lea r12, [0x2459910a0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x245991080]
test rbx, rbx
je 0x245877dfc
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop word [rax + rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x245877e28
test rsi, rsi
je 0x245877e28
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x245877dd8
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x245877d32
lea rcx, [0x2459910a0]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
jmp 0x245877c8b
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x245877dd8
jmp 0x245877dfc
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x245877ce8
jmp 0x245877d14

Function at 0x245877f70
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov r8, qword [0x24598e220]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x245877f90
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x245877f98
ret
cmp word [rdx + 0x18], 0x20b
jne 0x245877f90
movzx eax, word [rdx + 0x14]
sub rcx, r8
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x245877fe5
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x245877fdc
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x245877f90
add rax, 0x28
cmp rax, r9
jne 0x245877fc8
xor eax, eax
ret
Function at 0x245877ff0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x24598e220]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x24587800f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x245878018
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x24587800f
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x2458780b0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x24598e220]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x2458780cf
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x2458780d8
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

Function at 0x245878360
Capabilities:
Allocate thread local storage

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rsi, rcx
mov rbx, rdx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x245878390
mov rdx, rbx
mov ecx, eax
mov dword [rsi], eax
add rsp, 0x28
pop rbx
pop rsi
jmp 0x2458801b0
add rsp, 0x28
pop rbx
pop rsi
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
test rdx, rdx
jne 0x2458801c0
xor eax, eax
ret
jmp fcn.245877b60

Function at 0x2458783d0
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov ebx, ecx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, ebx
mov esi, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, esi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, rbx
add rsp, 0x28
pop rbx
pop rsi
ret

Function at 0x245878400
Capabilities:
Set thread local storage value

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x245878418
xor eax, eax
add rsp, 0x28
ret
add rsp, 0x28
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
Function at 0x402e20
Capabilities:
Encrypt data using salsa20 or chacha
Generate random numbers via rtlgenrandom
Generate random numbers via winapi

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0xa0
mov rsi, rdx
mov rdi, rcx
xorps xmm0, xmm0
movaps xmmword [rsp + 0x30], xmm0
movaps xmmword [rsp + 0x20], xmm0
lea rdx, [rsp + 0x20]
xor ecx, ecx
mov r8d, 0x20
mov r9d, 2
call sub.bcrypt.dll_BCryptGenRandom
cmp eax, 0xc0000000
jb 0x402e71
mov ebx, eax
lea rcx, [rsp + 0x20]
mov edx, 0x20
call sub.advapi32.dll_SystemFunction036
test al, al
je 0x402ecc
movaps xmm0, xmmword [rsp + 0x20]
movaps xmm1, xmmword [rsp + 0x30]
movaps xmmword [rsp + 0x50], xmm1
movaps xmmword [rsp + 0x40], xmm0
mov rax, qword [0x005761d0]
test rax, rax
je 0x402f23
lea rbx, [rsp + 0x70]
test eax, 0x4000
jne 0x402f38
movaps xmm0, xmmword [rsp + 0x40]
movaps xmm1, xmmword [rsp + 0x50]
movaps xmmword [rsp + 0x70], xmm0
movaps xmmword [rsp + 0x80], xmm1
xorps xmm0, xmm0
movaps xmmword [rsp + 0x90], xmm0
jmp 0x402f4c
xor ebx, 0x80000000
je 0x402e71
mov rcx, qword [0x00576170]
test rcx, rcx
jne 0x402ef8
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x402f8e
mov rcx, rax
mov qword [0x00576170], rax
mov r8d, 4
xor edx, edx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x402f8e
mov dword [rax], ebx
mov rcx, qword [0x00576170]
xor edx, edx
mov r8, rax
call sub.kernel32.dll_HeapFree
jmp 0x402f62
call fcn.004eb290
lea rbx, [rsp + 0x70]
test eax, 0x4000
je 0x402ea5
lea r8, [0x0053d7d8]
lea rdx, [rsp + 0x40]
mov rcx, rbx
call fcn.0045de60
movaps xmm0, xmmword [rbx]
movaps xmm1, xmmword [rbx + 0x10]
movaps xmm2, xmmword [rbx + 0x20]
movaps xmmword [rdi + 0x20], xmm2
movaps xmmword [rdi + 0x10], xmm1
movaps xmmword [rdi], xmm0
mov qword [rdi + 0x40], 0
mov rax, 0xffffffffffffff00
add rax, qword [rdi + 0x30]
mov qword [rdi + 0x38], rax
mov rcx, rdi
mov rdx, rsi
add rsp, 0xa0
pop rbx
pop rdi
pop rsi
jmp fcn.0045b202
mov ecx, 4
mov edx, 4
call fcn.004043b0
ud2
Function at 0x402ff0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x38
movaps xmmword [rsp + 0x20], xmm6
lock dec qword [rcx + 0x1c8]
jne 0x4031e7
mov rsi, rcx
mov eax, 1
lock xadd qword [rcx + 0x88], rax
mov rbx, rax
and rbx, 0xffffffffffffffe0
and eax, 0x1f
mov rcx, qword [rcx + 0x80]
mov rdx, qword [rcx + 0x2300]
mov r8, rbx
sub r8, rdx
shr r8, 5
cmp r8, rax
seta bpl
xorps xmm6, xmm6
movabs r14, 0x100000000
jmp 0x403086
mfence
mov rax, qword [rsi + 0x88]
mov qword [rdi + 0x2318], rax
lock or qword [rdi + 0x2310], r14
mov al, 1
pause
mov rdx, qword [rcx + 0x2300]
mov ebp, eax
mov rdi, rcx
cmp rdx, rbx
je 0x4031b6
mov rcx, qword [rdi + 0x2308]
test rcx, rcx
jne 0x403180
mov r15, qword [rdi + 0x2300]
mov rax, qword [0x00576170]
test rax, rax
jne 0x4030ca
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x403235
mov qword [0x00576170], rax
mov r8d, 0x2320
mov rcx, rax
xor edx, edx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x403235
mov rdx, rax
add r15, 0x20
mov qword [rax + 0x2300], r15
movups xmmword [rax + 0x2308], xmm6
mov qword [rax + 0x2318], 0
xor eax, eax
lock cmpxchg qword [rdi + 0x2308], rdx
jne 0x403115
mov rcx, rdx
jmp 0x403180
mov rcx, rax
mov rax, qword [rax + 0x2300]
mov r8, rax
xor r8, 0x20
and eax, 0x20
lea rax, [r8 + rax*2]
mov qword [rdx + 0x2300], rax
xor eax, eax
lock cmpxchg qword [rcx + 0x2308], rdx
je 0x403180
mov r8, rax
nop word cs:[rax + rax]
pause
mov rax, qword [r8 + 0x2300]
mov r9, rax
xor r9, 0x20
and eax, 0x20
lea rax, [r9 + rax*2]
mov qword [rdx + 0x2300], rax
xor eax, eax
lock cmpxchg qword [r8 + 0x2308], rdx
mov r8, rax
jne 0x403150
nop
mov rdx, qword [rdi + 0x2310]
xor eax, eax
test bpl, bpl
je 0x40307b
mov edx, edx
cmp edx, 0xffffffff
jne 0x40307b
mov rax, rdi
lock cmpxchg qword [rsi + 0x80], rcx
je 0x403060
xor eax, eax
jmp 0x40307b
movabs rax, 0x200000000
lock or qword [rdi + 0x2310], rax
mov rax, qword [rsi + 0x110]
nop
mov rcx, rax
or rcx, 2
lock cmpxchg qword [rsi + 0x110], rcx
jne 0x4031d0
test rax, rax
je 0x4031f9
movaps xmm6, xmmword [rsp + 0x20]
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret
mov rcx, qword [rsi + 0x100]
mov rax, qword [rsi + 0x108]
mov qword [rsi + 0x108], 0
lock and qword [rsi + 0x110], 0xfffffffffffffffd
test rax, rax
je 0x4031e7
movaps xmm6, xmmword [rsp + 0x20]
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
jmp qword [rax + 8]
mov ecx, 0x2320
mov edx, 8
call fcn.004043b0
ud2
Function at 0x40ada0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x68
mov rsi, rcx
mov ecx, dword [0x00502208]
test ecx, ecx
je 0x40af5c
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
jbe 0x40addb
mov rdi, rax
mov rax, qword [rax]
add rdi, 8
test rax, rax
cmove rdi, rax
jne 0x40af9d
mov ecx, dword [0x00502208]
test ecx, ecx
je 0x40af7e
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
je 0x40af9b
mov rdi, rax
test rax, rax
jne 0x40ae9a
mov rcx, qword [0x00576170]
test rcx, rcx
jne 0x40ae2a
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x40afba
mov rcx, rax
mov qword [0x00576170], rax
mov r8d, 0x58
xor edx, edx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x40afba
mov rdi, rax
mov qword [rax], 0
movups xmm0, xmmword [rsp + 0x20]
movups xmm1, xmmword [rsp + 0x30]
movups xmm2, xmmword [rsp + 0x40]
movups xmm3, xmmword [rsp + 0x50]
movups xmmword [rax + 8], xmm0
movups xmmword [rax + 0x18], xmm1
movups xmmword [rax + 0x28], xmm2
movups xmmword [rax + 0x38], xmm3
mov rax, qword [rsp + 0x60]
mov qword [rdi + 0x48], rax
lea rax, [0x005021f0]
mov qword [rdi + 0x50], rax
mov ecx, dword [0x00502208]
test ecx, ecx
je 0x40afa7
dec ecx
mov rdx, rdi
call sub.kernel32.dll_TlsSetValue
test rsi, rsi
je 0x40aebb
lea rcx, [rsi + 8]
cmp qword [rsi], 0
mov qword [rsi], 0
lea rax, [0x0053bdc0]
cmovne rax, rcx
jmp 0x40aec2
lea rax, [0x0053bdc0]
mov rcx, qword [rax + 0x40]
mov qword [rsp + 0x60], rcx
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
movups xmm2, xmmword [rax + 0x20]
movups xmm3, xmmword [rax + 0x30]
movaps xmmword [rsp + 0x50], xmm3
movaps xmmword [rsp + 0x40], xmm2
movaps xmmword [rsp + 0x30], xmm1
movaps xmmword [rsp + 0x20], xmm0
mov rax, qword [rdi + 0x10]
cmp qword [rdi], 0
mov rcx, qword [rdi + 0x18]
mov qword [rdi], 1
movaps xmm0, xmmword [rsp + 0x20]
movaps xmm1, xmmword [rsp + 0x30]
movaps xmm2, xmmword [rsp + 0x40]
movaps xmm3, xmmword [rsp + 0x50]
movups xmmword [rdi + 8], xmm0
movups xmmword [rdi + 0x18], xmm1
movups xmmword [rdi + 0x28], xmm2
movups xmmword [rdi + 0x38], xmm3
mov rdx, qword [rsp + 0x60]
mov qword [rdi + 0x48], rdx
je 0x40af56
cmp rax, 2
je 0x40af56
lock dec qword [rcx]
sete dl
test rax, rax
je 0x40af4d
test dl, dl
je 0x40af56
call fcn.00407290
jmp 0x40af56
test dl, dl
je 0x40af56
call fcn.00408270
add rdi, 8
jmp 0x40af9d
lea rcx, [0x005021f0]
call fcn.004dae70
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
ja 0x40adc4
jmp 0x40addb
lea rcx, [0x005021f0]
call fcn.004dae70
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
jne 0x40adfa
xor edi, edi
mov rax, rdi
add rsp, 0x68
pop rdi
pop rsi
ret
lea rcx, [0x005021f0]
call fcn.004dae70
mov ecx, eax
jmp 0x40ae92
mov ecx, 0x58
mov edx, 8
call fcn.004043b0
ud2