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

Disassembly:
push rbp
mov rbp, rsp
push rdi
push rsi
push rbx
mov rbx, rcx
lea rdi, [rbx + 0x10]
and rsp, 0xfffffffffffffff0
sub rsp, 0x70
mov rcx, qword [rcx + 0x130]
test rcx, rcx
je 0x1401b1369
xor edx, edx
mov r8d, 2
call sub.msvcrt.dll_fseek
mov rcx, qword [rbx + 0x130]
call sub.msvcrt.dll_ftell
cmp eax, 0x24
jg 0x1401b1330
movabs rax, 0xfa340bef153eba48
mov byte [rsp + 0x64], 0
mov rcx, qword [rbx + 0x130]
mov qword [rsp + 0x40], rax
mov rax, qword [rbx]
mov qword [rsp + 0x48], 0
mov rsi, qword [rbx + 0x120]
mov qword [rsp + 0x50], 0
sub rsi, qword [rbx + 0x118]
mov qword [rsp + 0x4d], rax
mov rax, qword [rbx + 8]
mov qword [rsp + 0x58], 0
mov dword [rsp + 0x60], 0
mov rax, qword [rax + 0x10]
mov dword [rsp + 0x48], 1
mov qword [rsp + 0x55], rax
call sub.msvcrt.dll_ftell
mov qword [rsp + 0x38], rsi
xor r9d, r9d
xor edx, edx
mov dword [rsp + 0x30], eax
lea rax, str.____Before_filling_the_header__stream_pos_of__s_is__lu__and_map_pos_is__lu
xor ecx, ecx
lea r8, str.dap_chain_cell
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], rdi
call fcn.14005a0c0
lea rcx, [rsp + 0x40]
mov r8d, 1
mov r9, qword [rbx + 0x130]
mov edx, 0x25
call sub.msvcrt.dll_fwrite
mov qword [rsp + 0x30], rdi
cmp rax, 1
mov rax, qword [rbx]
mov qword [rsp + 0x28], rax
jne 0x1401b1300
lea rax, str.Initialized_file_storage_for_cell_0x_016llX____s__
xor edx, edx
xor ecx, ecx
mov r9d, 2
mov qword [rsp + 0x20], rax
lea r8, str.dap_chain_cell
call fcn.14005a0c0
mov rcx, qword [rbx + 0x130]
call sub.msvcrt.dll_fflush
mov rax, qword [rbx + 8]
cmp byte [rax + 0x31], 0
jne 0x1401b12d8
xor esi, esi
mov rcx, qword [rbx + 0x130]
call sub.msvcrt.dll_ftell
mov qword [rsp + 0x38], rsi
xor r9d, r9d
xor edx, edx
mov dword [rsp + 0x30], eax
lea rax, str.____After_filling_the_header__stream_pos_of__s_is__lu_and_map_pos_is__lu
lea r8, str.dap_chain_cell
xor ecx, ecx
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], rdi
call fcn.14005a0c0
xor eax, eax
lea rsp, [rbp - 0x18]
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov rsi, qword [rbx + 0x118]
lea rdx, [rsi + 0x25]
mov qword [rbx + 0x120], rdx
cmp byte [rax + 0x31], 0
je 0x1401b128e
mov esi, 0x25
jmp 0x1401b1290
lea rax, str.Cant_init_file_storage_for_cell_0x_016llX____s__
mov r9d, 7
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rax
lea r8, str.dap_chain_cell
call fcn.14005a0c0
mov eax, 0xffffffff
jmp 0x1401b12cb
mov rax, qword [rbx]
mov qword [rsp + 0x28], rdi
mov r9d, 7
xor edx, edx
lea r8, str.dap_chain_cell
xor ecx, ecx
mov qword [rsp + 0x30], rax
lea rax, str.Chain_cell___s__0x_016llX_is_already_not_empty_
mov qword [rsp + 0x20], rax
call fcn.14005a0c0
mov eax, 0xfffffffd
jmp 0x1401b12cb
mov rax, qword [rbx]
mov qword [rsp + 0x28], rdi
mov r9d, 7
xor edx, edx
lea r8, str.dap_chain_cell
mov qword [rsp + 0x30], rax
lea rax, str.Chain_cell___s__0x_016llX_not_opened
mov qword [rsp + 0x20], rax
call fcn.14005a0c0
mov eax, 0xfffffffe
jmp 0x1401b12cb
Function at 0x1401f52c0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push r14
push r13
mov r13d, r8d
push r12
push rdi
push rsi
mov rsi, rdx
push rbx
mov rbx, rcx
sub rsp, 0x48
call fcn.1400faca0
mov rcx, rax
mov r12, rax
call fcn.140107550
mov rcx, rbx
mov r14, rax
call fcn.140107550
mov rdi, rax
test rbx, rbx
je 0x1401f530f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1401f530f
test al, 0x10
jne 0x1401f5408
test rsi, rsi
je 0x1401f532a
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1401f532a
test al, 0x80
jne 0x1401f5468
mov rcx, r12
sub rdi, r14
call sub.msvcrt.dll_free
mov rcx, rsi
call fcn.140035f50
mov r12, rax
test rax, rax
je 0x1401f5528
mov rcx, r12
call fcn.140036160
test rax, rax
je 0x1401f53d4
cmp byte [rax + 8], 0x2e
lea rdx, [rax + 8]
jne 0x1401f5370
cmp byte [rdx + 1], 0
je 0x1401f5349
nop word cs:[rax + rax]
cmp byte [rax + 8], 0x2e
je 0x1401f53f0
xor r8d, r8d
mov rcx, rsi
call fcn.140075570
mov r14, rax
test rax, rax
je 0x1401f539f
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1401f539f
test al, 0x10
jne 0x1401f5450
test r13d, r13d
je 0x1401f5490
lea rdx, [r14 + rdi]
mov r8, r14
mov ecx, r13d
call fcn.1401f5060
test al, al
je 0x1401f5490
mov rcx, r14
call sub.msvcrt.dll_free
mov rcx, r12
call fcn.140036160
test rax, rax
jne 0x1401f5356
mov rcx, r12
call fcn.1400363b0
add rsp, 0x48
mov eax, 1
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
ret
cmp byte [rdx + 1], 0x2e
jne 0x1401f5376
cmp byte [rdx + 2], 0
je 0x1401f5349
jmp 0x1401f5376
test r13d, r13d
jne 0x1401f54d8
lea rax, str.Failed_to_add_directory_to_tar
mov qword [rsp + 0x20], rax
mov r9d, 7
xor edx, edx
xor ecx, ecx
lea r8, str.file_utils
call fcn.14005a0c0
mov rcx, r12
call sub.msvcrt.dll_free
xor eax, eax
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
ret
test r13d, r13d
jne 0x1401f54f8
lea rax, str.Failed_to_add_directory_to_tar
jmp 0x1401f5497
test r13d, r13d
je 0x1401f5483
mov r8, rsi
mov rdx, r12
mov ecx, r13d
call fcn.1401f5060
test al, al
jne 0x1401f5558
lea rax, str.Failed_to_add_file_to_tar
jmp 0x1401f5418
lea rax, str.Failed_to_add_file_to_tar
mov qword [rsp + 0x20], rax
mov r9d, 7
xor edx, edx
xor ecx, ecx
lea r8, str.file_utils
call fcn.14005a0c0
mov rcx, r12
call fcn.1400363b0
mov rcx, r14
call sub.msvcrt.dll_free
add rsp, 0x48
xor eax, eax
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
ret
mov r8, rbx
mov rdx, r12
mov ecx, r13d
call fcn.1401f4ec0
test al, al
jne 0x1401f532a
jmp 0x1401f5411
lea rdx, [r14 + rdi]
mov r8, r14
mov ecx, r13d
call fcn.1401f4ec0
test al, al
je 0x1401f5459
mov r8d, r13d
mov rdx, r14
mov rcx, rbx
call fcn.1401f52c0
jmp 0x1401f53bf
lea rax, str.Failed_to_open_input_directory
mov r9d, 7
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rax
lea r8, str.file_utils
call fcn.14005a0c0
xor eax, eax
jmp 0x1401f543d
mov rcx, r12
mov byte [rsp + 0x3f], al
call sub.msvcrt.dll_free
movzx eax, byte [rsp + 0x3f]
jmp 0x1401f543d
Function at 0x140201b40
Capabilities:
Encode data using xor

Disassembly:
mov r9d, 0x1f
mov r8d, r8d
jmp fcn.140130de0

Function at 0x140203010
Capabilities:
Encode data using xor

Disassembly:
mov r9d, 0x1f
mov r8d, r8d
jmp fcn.14012e740
Function at 0x14020d120
Capabilities:
Encode data using xor

Disassembly:
push rbp
mov rbp, rsp
and rsp, 0xfffffffffffffff0
test edx, edx
je 0x14020d26a
lea eax, [rdx - 1]
cmp eax, 2
jbe 0x14020d26c
mov r8d, edx
movdqa xmm4, xmmword [0x1402d81e0]
movdqa xmm3, xmmword [0x1402d81f0]
mov rax, rcx
shr r8d, 2
sub r8d, 1
shl r8, 4
lea r8, [rcx + r8 + 0x10]
nop dword [rax + rax]
movdqu xmm1, xmmword [rax]
add rax, 0x10
movdqa xmm0, xmm1
movdqa xmm2, xmm1
psrld xmm0, 8
psrld xmm2, 0x10
pslld xmm0, 0x10
pslld xmm2, 8
pand xmm2, xmm3
pand xmm0, xmm4
pxor xmm0, xmm2
movdqa xmm2, xmm1
pslld xmm2, 0x18
psrld xmm1, 0x18
pxor xmm1, xmm2
pxor xmm0, xmm1
movups xmmword [rax - 0x10], xmm0
cmp rax, r8
jne 0x14020d168
mov eax, edx
and eax, 0xfffffffc
test dl, 3
je 0x14020d26a
sub edx, eax
cmp edx, 1
je 0x14020d23a
movq xmm2, qword [0x1402d81e0]
mov r8d, eax
movq xmm3, qword [0x1402d81f0]
lea r8, [rcx + r8*4]
movq xmm1, qword [r8]
movdqa xmm0, xmm1
psrld xmm0, 8
pslld xmm0, 0x10
pand xmm0, xmm2
movdqa xmm2, xmm1
psrld xmm2, 0x10
pslld xmm2, 8
pand xmm2, xmm3
pxor xmm0, xmm2
movdqa xmm2, xmm1
pslld xmm2, 0x18
psrld xmm1, 0x18
pxor xmm1, xmm2
pxor xmm0, xmm1
movq qword [r8], xmm0
mov r8d, edx
and r8d, 0xfffffffe
add eax, r8d
cmp edx, r8d
je 0x14020d26a
lea r8, [rcx + rax*4]
mov eax, dword [r8]
mov edx, eax
mov ecx, eax
mov r9d, eax
shr eax, 8
shl edx, 8
shl ecx, 0x18
and eax, 0xff00
shr r9d, 0x18
and edx, 0xff0000
xor ecx, r9d
xor edx, ecx
xor eax, edx
mov dword [r8], eax
leave
ret
xor eax, eax
jmp 0x14020d1c5
Function at 0x140212080
Capabilities:
Encode data using xor

Disassembly:
push r13
push r12
mov r12d, r8d
push rbp
mov ebp, r9d
push rdi
push rsi
mov rsi, rcx
push rbx
mov ebx, edx
sub rsp, 0x28
mov rdi, qword [rsp + 0x80]
test edx, edx
je 0x1402120b1
mov r8d, edx
xor edx, edx
shl r8, 2
call sub.msvcrt.dll_memset
test r12d, r12d
je 0x1402120fe
xor r13d, r13d
nop dword [rax]
mov rcx, rdi
call fcn.140113670
xor edx, edx
mov ecx, eax
shr ax, 1
movzx eax, ax
div ebx
mov edx, edx
lea rdx, [rsi + rdx*4]
mov eax, dword [rdx]
and eax, 1
lea r8d, [rax - 1]
xor eax, 1
add r13d, eax
lea eax, [rcx + rcx]
and eax, 2
sub eax, 1
and eax, r8d
add eax, dword [rdx]
mov dword [rdx], eax
cmp r12d, r13d
ja 0x1402120c0
test ebp, ebp
je 0x140212154
xor r12d, r12d
nop dword [rax]
mov rcx, rdi
call fcn.140113670
xor edx, edx
mov ecx, eax
shr ax, 1
movzx eax, ax
div ebx
mov edx, edx
lea rdx, [rsi + rdx*4]
mov r8d, dword [rdx]
mov eax, r8d
sar eax, 1
or eax, r8d
and eax, 1
lea r9d, [rax - 1]
xor eax, 1
add r12d, eax
lea eax, [rcx*4]
and eax, 4
sub eax, 2
and eax, r9d
add eax, r8d
mov dword [rdx], eax
cmp ebp, r12d
ja 0x140212108
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
Function at 0x140213410
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
mov rdi, rdx
push rsi
mov rsi, rcx
push rbx
sub rsp, 0x18
mov eax, dword [rcx]
mov ecx, dword [rdi]
mov r15, qword [rsp + 0xa0]
mov r13d, dword [rsp + 0x88]
mov r10d, dword [rsp + 0x90]
mov edx, dword [rsp + 0x80]
imul r13d, eax
imul r10d, ecx
imul eax, dword [rsp + 0x98]
imul ecx, r15d
add r13d, r10d
imul r13d, edx
lea r12d, [rax + rcx]
lea rax, [r9*4 - 4]
imul r12d, edx
lea rbx, [rsi + rax]
add rax, rdi
mov qword [rsp], rbx
and r13d, 0x7fffffff
mov qword [rsp + 8], rax
and r12d, 0x7fffffff
test r9, r9
je 0x140213678
xor edx, edx
xor r11d, r11d
xor r10d, r10d
nop dword [rax + rax]
mov eax, dword [rsi + r10*4]
mov ebp, dword [rdi + r10*4]
mov rcx, qword [rsp + 0x88]
mov r14, qword [rsp + 0x90]
mov ebx, dword [r8 + r10*4]
imul rcx, rax
imul r14, rbp
imul rax, qword [rsp + 0x98]
imul rbp, r15
add rcx, r14
add rcx, r11
mov r11, rbx
imul r11, r13
add rax, rbp
imul rbx, r12
add rdx, rax
add r11, rcx
add rdx, rbx
test r10, r10
je 0x140213658
mov eax, r11d
sar r11, 0x1f
and eax, 0x7fffffff
mov dword [rsi + r10*4 - 4], eax
mov eax, edx
sar rdx, 0x1f
and eax, 0x7fffffff
mov dword [rdi + r10*4 - 4], eax
add r10, 1
cmp r9, r10
jne 0x1402134a8
mov rax, qword [rsp]
xor ebp, ebp
mov dword [rax], r11d
mov rax, qword [rsp + 8]
shr r11, 0x3f
mov r12, r11
mov r10d, r11d
mov dword [rax], edx
xor eax, eax
mov ecx, eax
nop dword [rax + rax]
mov eax, dword [rsi + rbp*4]
mov rbx, rbp
sub eax, ecx
sub eax, dword [r8 + rbp*4]
lea rbp, [rbp + 1]
shr eax, 0x1f
mov ecx, eax
cmp r9, rbp
jne 0x140213550
mov r11d, 1
mov ebp, r12d
xor ecx, ecx
sub r11d, eax
neg ebp
mov eax, r10d
or r11d, r12d
shr ebp, 1
neg r11d
nop dword [rax]
mov r10d, dword [rsi + rcx*4]
mov r9, rcx
sub r10d, eax
mov eax, dword [r8 + rcx*4]
xor eax, ebp
and eax, r11d
sub r10d, eax
mov eax, r10d
and eax, 0x7fffffff
mov dword [rsi + rcx*4], eax
mov eax, r10d
add rcx, 1
shr eax, 0x1f
cmp rbx, r9
jne 0x140213588
mov rax, rdx
xor ecx, ecx
xor r11d, r11d
shr rax, 0x3f
mov edx, ecx
mov r10d, eax
nop dword [rax]
mov ecx, dword [rdi + r11*4]
sub ecx, edx
sub ecx, dword [r8 + r11*4]
mov edx, ecx
mov rcx, r11
add r11, 1
shr edx, 0x1f
cmp rcx, rbx
jne 0x1402135d0
mov ecx, edx
mov edx, 1
mov r11d, eax
sub edx, ecx
neg r11d
xor ecx, ecx
or edx, eax
shr r11d, 1
mov eax, r10d
neg edx
nop word cs:[rax + rax]
mov r10d, dword [rdi + rcx*4]
mov r9, rcx
sub r10d, eax
mov eax, dword [r8 + rcx*4]
xor eax, r11d
and eax, edx
sub r10d, eax
mov eax, r10d
and eax, 0x7fffffff
mov dword [rdi + rcx*4], eax
mov eax, r10d
add rcx, 1
shr eax, 0x1f
cmp r9, rbx
jne 0x140213610
add rsp, 0x18
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
sar r11, 0x1f
sar rdx, 0x1f
cmp r9, 1
je 0x14021352d
mov r10d, 1
jmp 0x1402134a8
mov rax, qword [rsp + 8]
mov dword [rbx], 0
mov dword [rax], 0
jmp 0x140213640
Function at 0x140220f60
Capabilities:
Write file on windows

Disassembly:
push r14
mov r14, rcx
push r13
mov r13, rdx
push r12
push rbp
push rdi
push rsi
mov rsi, r9
push rbx
mov rbx, r8
sub rsp, 0x60
mov rdi, qword [sym.imp.KERNEL32.dll_WriteFile]
lea r12, [rsp + 0x3c]
lea rbp, [rsp + 0x40]
mov r8d, 0x1000000
mov r9, r12
mov rdx, r13
mov rcx, r14
cmp rbx, r8
mov qword [rsp + 0x50], rsi
cmovbe r8, rbx
mov qword [rsp + 0x20], rbp
mov qword [rsp + 0x58], 0
call rdi
test eax, eax
jne 0x140220fc2
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140220fd8
mov eax, dword [rsp + 0x3c]
cmp rax, rbx
je 0x140220fd6
sub rbx, rax
add rsi, rax
add r13, rax
jmp 0x140220f8b
xor eax, eax
add rsp, 0x60
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret

Function at 0x140221090
Capabilities:
Suspend thread

Disassembly:
push r13
push r12
mov r12, rcx
push rbp
push rdi
push rsi
push rbx
mov ebx, edx
sub rsp, 0x38
mov rcx, qword [rcx]
mov r13d, dword [rcx]
cmp dword [rcx + 4], r13d
jne 0x1402210ef
lea eax, [r13 + r13]
mov rbp, rax
lea rdx, [rax*8 + 8]
xor eax, eax
cmp r13d, 0x1f
cmovbe rcx, rax
call sub.msvcrt.dll_realloc
test rax, rax
je 0x140221175
cmp r13d, 0x1f
jne 0x1402210e9
mov rsi, qword [r12]
mov ecx, 0x40
mov rdi, rax
rep movsd dword [rdi], dword [rsi]
mov qword [r12], rax
mov dword [rax], ebp
mov r8d, ebx
xor edx, edx
mov ecx, 0x42
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov r13, rax
test rax, rax
jne 0x140221119
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SuspendThread]
inc eax
jne 0x14022115e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
cmp eax, 5
je 0x140221150
lea rdx, [rsp + 0x2c]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x140221150
cmp dword [rsp + 0x2c], 0x103
je 0x140221153
xor r12d, r12d
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14022117b
mov rdx, qword [r12]
xor r12d, r12d
mov eax, dword [rdx + 4]
lea ecx, [rax + 1]
mov dword [rdx + 4], ecx
mov qword [rdx + rax*8 + 8], r13
jmp 0x14022117b
mov r12d, 0xe
add rsp, 0x38
mov eax, r12d
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
Function at 0x140221190
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push rbp
xor r11d, r11d
xor eax, eax
mov rbp, rsp
push r15
push r14
mov r14d, edx
push r13
add r14, 1
push r12
shl r14, 4
mov r12, rcx
push rdi
lea r13, [rcx + r14]
sub r14, 0x10
push rsi
lea r8, [rcx + r14]
push rbx
lea rbx, [r13 + r14]
and rsp, 0xfffffffffffffff0
sub rsp, 0x820
lea rsi, [rsp + 0x20]
lea r10, [rsp + 0x420]
mov edx, dword [r12 + 8]
mov ecx, 0x100
mov rdi, rsi
mov r9, r12
rep stosq qword [rdi], rax
mov ecx, r11d
xor edi, edi
shr edx, cl
nop dword [rax]
mov r15d, edx
mov edx, dword [r9 + 8]
mov ecx, r11d
add r9, 0x10
shr edx, cl
movzx ecx, dl
xor r15d, edx
add dword [rsp + rcx*4 + 0x20], 1
movzx ecx, dh
or edi, r15d
mov ecx, ecx
add dword [rsp + rcx*4 + 0x420], 1
cmp r8, r9
jne 0x1402211f8
mov rdx, rsi
xor r9d, r9d
xor ecx, ecx
mov r15d, dword [rdx]
mov dword [rdx], ecx
add rdx, 4
add ecx, r15d
mov r15d, dword [rdx + 0x3fc]
mov dword [rdx + 0x3fc], r9d
add r9d, r15d
cmp r10, rdx
jne 0x140221230
mov r9, r12
nop dword [rax]
mov edx, dword [r9 + 8]
mov ecx, r11d
movdqu xmm0, xmmword [r9]
add r9, 0x10
shr edx, cl
movzx ecx, dl
mov edx, dword [rsp + rcx*4 + 0x20]
lea r15d, [rdx + 1]
shl rdx, 4
mov dword [rsp + rcx*4 + 0x20], r15d
movups xmmword [r13 + rdx], xmm0
cmp r8, r9
jne 0x140221258
cmp edi, 0xff
jbe 0x1402212f4
mov r9, r13
nop dword [rax]
mov edx, dword [r9 + 8]
mov ecx, r11d
movdqu xmm1, xmmword [r9]
add r9, 0x10
shr edx, cl
movzx edx, dh
mov edx, edx
add rdx, 0x100
mov ecx, dword [rsp + rdx*4 + 0x20]
lea r15d, [rcx + 1]
shl rcx, 4
mov dword [rsp + rdx*4 + 0x20], r15d
movups xmmword [r12 + rcx], xmm1
cmp rbx, r9
jne 0x140221298
add r11d, 0x10
shr edi, 0x10
jne 0x1402211db
lea rsp, [rbp - 0x38]
mov eax, 1
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov r8, r14
mov rdx, r13
mov rcx, r12
call sub.msvcrt.dll_memcpy
jmp 0x1402212de
Function at 0x140221310
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push rbp
xor r8d, r8d
xor eax, eax
mov rbp, rsp
push r15
push r14
mov r14d, edx
push r13
shl r14, 2
mov r13, rcx
push r12
lea r12, [rcx + r14]
push rdi
push rsi
push rbx
lea rbx, [r12 + r14]
and rsp, 0xfffffffffffffff0
sub rsp, 0x820
lea rsi, [rsp + 0x20]
lea r11, [rsp + 0x420]
mov edx, dword [r13]
mov ecx, 0x100
mov rdi, rsi
mov r9, r13
rep stosq qword [rdi], rax
mov ecx, r8d
xor edi, edi
not edx
shr edx, cl
nop dword [rax]
mov r10d, edx
mov edx, dword [r9]
mov ecx, r8d
add r9, 4
not edx
shr edx, cl
movzx ecx, dl
xor r10d, edx
add dword [rsp + rcx*4 + 0x20], 1
movzx ecx, dh
or edi, r10d
mov ecx, ecx
add dword [rsp + rcx*4 + 0x420], 1
cmp r12, r9
jne 0x140221370
mov rdx, rsi
xor r9d, r9d
xor ecx, ecx
nop dword [rax]
mov r10d, dword [rdx]
mov dword [rdx], ecx
add rdx, 4
add ecx, r10d
mov r10d, dword [rdx + 0x3fc]
mov dword [rdx + 0x3fc], r9d
add r9d, r10d
cmp r11, rdx
jne 0x1402213b0
mov r9, r13
nop dword [rax]
mov r10d, dword [r9]
mov ecx, r8d
add r9, 4
mov edx, r10d
not edx
shr edx, cl
movzx edx, dl
mov ecx, dword [rsp + rdx*4 + 0x20]
lea r15d, [rcx + 1]
mov dword [r12 + rcx*4], r10d
mov dword [rsp + rdx*4 + 0x20], r15d
cmp r12, r9
jne 0x1402213d8
cmp edi, 0xff
jbe 0x140221467
mov r9, r12
nop dword [rax]
mov r10d, dword [r9]
mov ecx, r8d
add r9, 4
mov edx, r10d
not edx
shr edx, cl
movzx edx, dh
mov edx, edx
add rdx, 0x100
mov ecx, dword [rsp + rdx*4 + 0x20]
lea r15d, [rcx + 1]
mov dword [r13 + rcx*4], r10d
mov dword [rsp + rdx*4 + 0x20], r15d
cmp rbx, r9
jne 0x140221410
add r8d, 0x10
shr edi, 0x10
jne 0x14022134e
lea rsp, [rbp - 0x38]
mov eax, 1
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov r8, r14
mov rdx, r12
mov rcx, r13
call sub.msvcrt.dll_memcpy
jmp 0x140221451

Function at 0x1402215a0
Capabilities:
Resume thread

Disassembly:
push r13
push r12
xor r12d, r12d
push rdi
push rsi
mov rsi, rcx
push rbx
xor ebx, ebx
sub rsp, 0x30
cmp dword [rsi + 4], ebx
jbe 0x140221604
mov eax, ebx
mov r13, qword [rsi + rax*8 + 8]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ResumeThread]
inc eax
jne 0x1402215f7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp eax, 5
je 0x1402215f7
lea rdx, [rsp + 0x2c]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x1402215f7
cmp dword [rsp + 0x2c], 0x103
cmove r12d, edi
mov rcx, r13
inc ebx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1402215b3
add rsp, 0x30
mov eax, r12d
pop rbx
pop rsi
pop rdi
pop r12
pop r13
ret
Function at 0x1402216a0
Capabilities:
Enumerate threads

Disassembly:
push r14
push r13
push r12
push rbp
mov rbp, rcx
push rdi
push rsi
mov rsi, rdx
push rbx
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
mov rax, qword [rbp + 0x40]
test rax, rax
je 0x14022176a
mov r14d, dword [rax + 0xc0]
lea rbx, [rax + 0x100]
xor r13d, r13d
shl r14, 5
mov rax, qword [rbp + 0xb0]
add r14, rbx
test rax, rax
je 0x140221702
mov r13, qword [rax + 0x70]
jmp 0x140221702
mov eax, dword [rbx + 0x10]
cmp eax, dword [rbp + 0x94]
je 0x140221709
add rbx, 0x20
cmp rbx, r14
jb 0x1402216f3
jmp 0x140221744
mov rax, qword [rbx + 8]
test rax, rax
je 0x1402216fe
mov rax, qword [rbx + 8]
cmp rax, rdi
je 0x1402216fe
mov rax, qword [rbx + 8]
cmp rax, r13
je 0x1402216fe
mov rdx, qword [rbx + 8]
mov rcx, rsi
call fcn.140221090
mov r12d, eax
test eax, eax
je 0x1402216fe
mov rcx, qword [rsi]
call fcn.1402215a0
jmp 0x14022181b
test r13, r13
je 0x14022174e
cmp r13, rdi
jne 0x140221756
xor r12d, r12d
jmp 0x14022181b
mov edx, r13d
mov rcx, rsi
call fcn.140221090
mov r12d, eax
test eax, eax
je 0x14022174e
jmp 0x140221737
xor edx, edx
mov ecx, 4
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov r13, rax
cmp rax, 0xffffffffffffffff
jne 0x140221793
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
lea r14, [rsp + 0x24]
mov rcx, rax
mov dword [rsp + 0x24], 0x1c
mov rdx, r14
call sub.KERNEL32.dll_Thread32First
test eax, eax
jne 0x1402217e7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, r13
mov r12d, ebx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsi]
call fcn.1402215a0
jmp 0x14022181b
mov edx, dword [rsp + 0x2c]
cmp edi, edx
jne 0x1402217f5
mov rdx, r14
mov rcx, r13
call sub.KERNEL32.dll_Thread32Next
mov r12d, eax
test eax, eax
je 0x140221805
mov eax, dword [rbp + 0x94]
cmp dword [rsp + 0x30], eax
je 0x1402217cd
jmp 0x1402217d5
mov rcx, rsi
call fcn.140221090
mov ebx, eax
test eax, eax
je 0x1402217d5
jmp 0x1402217b7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp eax, 0x12
jne 0x1402217b7
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rsp, 0x40
mov eax, r12d
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
Function at 0x1402219b0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push rbp
xor eax, eax
mov rbp, rsp
push r14
push r13
push r12
push rdi
push rsi
push rbx
mov rbx, rcx
mov ecx, 8
mov rdi, rbx
sub rsp, 0x30
rep stosd dword [rdi], eax
mov eax, 0x57
test rdx, rdx
je 0x140221ba4
mov rsi, r8
mov r8d, 0x7fffffff
mov r12, rdx
mov r13d, r9d
call sub.msvcrt.dll_mbstowcs
mov rdi, rax
lea rax, [rax - 1]
cmp rax, 0x7ffe
jbe 0x140221a0b
mov eax, 0x7b
jmp 0x140221ba4
lea r8, [rdi + 1]
lea rax, [r8 + r8]
add rax, 0xf
shr rax, 4
shl rax, 4
call fcn.1400358f0
sub rsp, rax
mov rdx, r12
lea r14, [rsp + 0x30]
mov rcx, r14
call sub.msvcrt.dll_mbstowcs
cmp rax, rdi
jne 0x140221a01
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140221a96
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
call rdi
cmp eax, 2
jne 0x140221ba4
test r13w, r13w
je 0x140221ba4
mov edx, dword [rsi]
bt edx, 0x11
jb 0x140221ba4
bt edx, 0xe
jb 0x140221aa8
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x140221aa8
call rdi
cmp eax, 0xb7
jne 0x140221ba4
jmp 0x140221aa8
mov edx, dword [rsi]
or dh, 0x40
test al, 0x10
lea ecx, [rdx - 0x4000]
cmovne edx, ecx
mov dword [rsi], edx
mov rcx, r12
call sub.msvcrt.dll_strlen
mov edi, dword [rsi]
mov qword [rbx + 0x18], rax
bt edi, 0xe
jae 0x140221aec
cmp rax, 8
jbe 0x140221aec
lea r13, [rax - 9]
mov r8d, 9
lea rcx, str._mdbx.dat
lea rdx, [r12 + r13]
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x140221aec
sub edi, 0x4000
mov dword [rsi], edi
mov qword [rbx + 0x18], r13
mov esi, dword [rsi]
mov r13, qword [rbx + 0x18]
and esi, 0x4000
lea rdx, [r13 + r13]
cmp esi, 1
sbb rax, rax
and eax, 0xe
lea rcx, [rax + rdx + 6]
call sub.msvcrt.dll_malloc
mov rcx, rax
mov qword [rbx], rax
mov eax, 0xe
test rcx, rcx
je 0x140221ba4
mov qword [rbx + 8], rcx
test esi, esi
je 0x140221b59
lea rax, [rcx + r13 + 5]
lea r9, str._lck
mov r8, r12
mov qword [rbx + 0x10], rax
lea rdx, [0x1402b7b6c]
call fcn.140221980
mov rcx, qword [rbx + 0x10]
mov rdx, r12
call sub.msvcrt.dll_strcpy
jmp 0x140221ba2
lea rax, [rcx + r13 + 0xa]
mov r8d, r13d
lea r13, [0x1402b7b71]
mov r9, r12
mov qword [rbx + 0x10], rax
lea rax, str._mdbx.lck
mov rdx, r13
mov qword [rsp + 0x20], rax
call fcn.140221980
mov rcx, qword [rbx + 0x10]
mov r8d, dword [rbx + 0x18]
mov r9, r12
lea rax, str._mdbx.dat
mov rdx, r13
mov qword [rsp + 0x20], rax
call fcn.140221980
xor eax, eax
lea rsp, [rbp - 0x30]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop rbp
ret