joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140045460
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov r8d, dword [0x140082f60]
lea r10, [0x140082f60]
mov r9d, 0x270
cmp r8d, r9d
jne 0x1400454c8
lea rax, [0x140082f68]
mov r8d, dword [rax - 4]
xor r8d, dword [rax]
lea rax, [rax + 4]
btr r8d, 0x1f
xor r8d, dword [rax - 8]
mov ecx, r8d
and cl, 1
neg cl
sbb edx, edx
shr r8d, 1
and edx, 0x9908b0df
xor edx, dword [rax + 0x62c]
xor edx, r8d
mov dword [rax + 0x9b8], edx
sub r9, 1
jne 0x140045480
mov r8d, dword [0x140082f60]
jmp 0x1400455b7
cmp r8d, 0x4e0
jb 0x1400455b7
xor r8d, r8d
mov r9d, r8d
nop dword [rax + rax]
mov edx, dword [r10 + r9*4 + 0x9c4]
xor edx, dword [r10 + r9*4 + 0x9c8]
btr edx, 0x1f
xor edx, dword [r10 + r9*4 + 0x9c4]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r10 + r9*4 + 0xff8]
xor ecx, edx
mov dword [r10 + r9*4 + 4], ecx
inc r9
cmp r9, 0xe3
jb 0x1400454e0
cmp r9, 0x26f
jae 0x140045579
mov edx, dword [r10 + r9*4 + 0x9c8]
xor edx, dword [r10 + r9*4 + 0x9c4]
btr edx, 0x1f
xor edx, dword [r10 + r9*4 + 0x9c4]
mov eax, edx
and al, 1
neg al
mov eax, dword [r10 + r9*4 - 0x388]
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor eax, ecx
xor eax, edx
mov dword [r10 + r9*4 + 4], eax
inc r9
cmp r9, 0x26f
jb 0x140045530
mov edx, dword [r10 + r9*4 + 0x9c4]
xor edx, dword [0x140082f64]
btr edx, 0x1f
xor edx, dword [r10 + r9*4 + 0x9c4]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, edx
xor ecx, dword [0x140083594]
mov dword [r10 + r9*4 + 4], ecx
mov dword [0x140082f60], r8d
mov eax, r8d
inc r8d
mov ecx, dword [r10 + rax*4 + 4]
mov eax, ecx
shr eax, 0xb
and eax, dword [0x1400842e4]
xor ecx, eax
mov dword [0x140082f60], r8d
mov eax, ecx
and eax, 0xff3a58ad
shl eax, 7
xor ecx, eax
mov eax, ecx
and eax, 0xffffdf8c
shl eax, 0xf
xor ecx, eax
mov eax, ecx
shr eax, 0x12
xor eax, ecx
ret
Function at 0x140049810
Capabilities:
Hash data using fnv

Disassembly:
push rdi
sub rsp, 0x20
movabs rax, 0xfffffffffffffff
mov edi, 1
bsr rcx, rax
mov eax, edi
shl rax, cl
cmp rdx, rax
jbe 0x140049841
lea rcx, str.invalid_hash_bucket_count
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const____ptr64_]
int3
lea rax, [rdx - 1]
mov qword [rsp + 0x30], rbx
mov rbx, qword [0x140084318]
or rax, rdi
bsr rcx, rax
mov r8, rbx
inc ecx
shl rdi, cl
lea rcx, [0x140084328]
lea rdx, [rdi + rdi]
call fcn.140049620
mov rcx, qword [0x140084318]
lea r9, [rdi - 1]
mov qword [0x140084340], r9
mov qword [0x140084348], rdi
mov rcx, qword [rcx]
mov rdx, rcx
cmp rcx, rbx
je 0x1400499c5
mov qword [rsp + 0x40], rsi
movabs rdi, 0x100000001b3
movabs rsi, 0xcbf29ce484222325
movzx eax, byte [rcx + 0x11]
movzx r11d, byte [rcx + 0x10]
mov rdx, qword [rdx]
xor r11, rsi
imul r11, rdi
xor r11, rax
movzx eax, byte [rcx + 0x12]
imul r11, rdi
xor r11, rax
movzx eax, byte [rcx + 0x13]
imul r11, rdi
xor r11, rax
imul r11, rdi
and r11, r9
shl r11, 4
add r11, qword [0x140084328]
mov r10, qword [r11]
cmp r10, rbx
jne 0x140049903
mov qword [r11], rcx
mov qword [r11 + 8], rcx
jmp 0x140049986
mov rax, qword [r11 + 8]
mov r9d, dword [rcx + 0x10]
cmp r9d, dword [rax + 0x10]
jne 0x140049940
mov r10, qword [rax]
cmp r10, rcx
je 0x14004993a
mov r9, qword [rcx + 8]
mov qword [r9], rdx
mov r8, qword [rdx + 8]
mov qword [r8], r10
mov rax, qword [r10 + 8]
mov qword [rax], rcx
mov qword [r10 + 8], r8
mov qword [rdx + 8], r9
mov qword [rcx + 8], rax
mov qword [r11 + 8], rcx
jmp 0x140049986
mov r8, rax
cmp r10, rax
je 0x140049962
nop dword [rax + rax]
mov rax, qword [rax + 8]
mov r8, rax
cmp r9d, dword [rax + 0x10]
je 0x14004999a
cmp r10, rax
jne 0x140049950
mov r10, qword [rcx + 8]
mov qword [r10], rdx
mov r9, qword [rdx + 8]
mov qword [r9], r8
mov rax, qword [r8 + 8]
mov qword [rax], rcx
mov qword [r8 + 8], r9
mov qword [rdx + 8], r10
mov qword [rcx + 8], rax
mov qword [r11], rcx
mov rcx, rdx
cmp rdx, rbx
je 0x1400499c0
mov r9, qword [0x140084340]
jmp 0x1400498b1
mov r10, qword [rax]
mov r9, qword [rcx + 8]
mov qword [r9], rdx
mov r8, qword [rdx + 8]
mov qword [r8], r10
mov rax, qword [r10 + 8]
mov qword [rax], rcx
mov qword [r10 + 8], r8
mov qword [rdx + 8], r9
mov qword [rcx + 8], rax
jmp 0x140049986
mov rsi, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
push rbx
sub rsp, 0x20
mov rcx, qword [0x140084320]
xorps xmm0, xmm0
add rcx, 1
mov rbx, qword [0x140084348]
js 0x1400499f4
cvtsi2ss xmm0, rcx
jmp 0x140049a09
mov rax, rcx
and ecx, 1
shr rax, 1
or rax, rcx
cvtsi2ss xmm0, rax
addss xmm0, xmm0
divss xmm0, dword [0x140084310]
call sub.api_ms_win_crt_math_l1_1_0.dll_ceilf
movss xmm1, dword [0x14007803c]
xor ecx, ecx
comiss xmm0, xmm1
jb 0x140049a3b
subss xmm0, xmm1
comiss xmm0, xmm1
jae 0x140049a3b
movabs rax, 0x8000000000000000
mov rcx, rax
cvttss2si rax, xmm0
add rax, rcx
mov ecx, 8
cmp rax, rcx
cmova rcx, rax
cmp rbx, rcx
jae 0x140049a6d
cmp rbx, 0x200
jae 0x140049a6a
lea rbx, [rbx*8]
cmp rbx, rcx
jae 0x140049a6d
mov rbx, rcx
mov rdx, rbx
add rsp, 0x20
pop rbx
jmp 0x140049810
Function at 0x1400499d0
Capabilities:
Hash data using fnv

Disassembly:
push rdi
sub rsp, 0x20
movabs rax, 0xfffffffffffffff
mov edi, 1
bsr rcx, rax
mov eax, edi
shl rax, cl
cmp rdx, rax
jbe 0x140049841
lea rcx, str.invalid_hash_bucket_count
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const____ptr64_]
int3
lea rax, [rdx - 1]
mov qword [rsp + 0x30], rbx
mov rbx, qword [0x140084318]
or rax, rdi
bsr rcx, rax
mov r8, rbx
inc ecx
shl rdi, cl
lea rcx, [0x140084328]
lea rdx, [rdi + rdi]
call fcn.140049620
mov rcx, qword [0x140084318]
lea r9, [rdi - 1]
mov qword [0x140084340], r9
mov qword [0x140084348], rdi
mov rcx, qword [rcx]
mov rdx, rcx
cmp rcx, rbx
je 0x1400499c5
mov qword [rsp + 0x40], rsi
movabs rdi, 0x100000001b3
movabs rsi, 0xcbf29ce484222325
movzx eax, byte [rcx + 0x11]
movzx r11d, byte [rcx + 0x10]
mov rdx, qword [rdx]
xor r11, rsi
imul r11, rdi
xor r11, rax
movzx eax, byte [rcx + 0x12]
imul r11, rdi
xor r11, rax
movzx eax, byte [rcx + 0x13]
imul r11, rdi
xor r11, rax
imul r11, rdi
and r11, r9
shl r11, 4
add r11, qword [0x140084328]
mov r10, qword [r11]
cmp r10, rbx
jne 0x140049903
mov qword [r11], rcx
mov qword [r11 + 8], rcx
jmp 0x140049986
mov rax, qword [r11 + 8]
mov r9d, dword [rcx + 0x10]
cmp r9d, dword [rax + 0x10]
jne 0x140049940
mov r10, qword [rax]
cmp r10, rcx
je 0x14004993a
mov r9, qword [rcx + 8]
mov qword [r9], rdx
mov r8, qword [rdx + 8]
mov qword [r8], r10
mov rax, qword [r10 + 8]
mov qword [rax], rcx
mov qword [r10 + 8], r8
mov qword [rdx + 8], r9
mov qword [rcx + 8], rax
mov qword [r11 + 8], rcx
jmp 0x140049986
mov r8, rax
cmp r10, rax
je 0x140049962
nop dword [rax + rax]
mov rax, qword [rax + 8]
mov r8, rax
cmp r9d, dword [rax + 0x10]
je 0x14004999a
cmp r10, rax
jne 0x140049950
mov r10, qword [rcx + 8]
mov qword [r10], rdx
mov r9, qword [rdx + 8]
mov qword [r9], r8
mov rax, qword [r8 + 8]
mov qword [rax], rcx
mov qword [r8 + 8], r9
mov qword [rdx + 8], r10
mov qword [rcx + 8], rax
mov qword [r11], rcx
mov rcx, rdx
cmp rdx, rbx
je 0x1400499c0
mov r9, qword [0x140084340]
jmp 0x1400498b1
mov r10, qword [rax]
mov r9, qword [rcx + 8]
mov qword [r9], rdx
mov r8, qword [rdx + 8]
mov qword [r8], r10
mov rax, qword [r10 + 8]
mov qword [rax], rcx
mov qword [r10 + 8], r8
mov qword [rdx + 8], r9
mov qword [rcx + 8], rax
jmp 0x140049986
mov rsi, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
push rbx
sub rsp, 0x20
mov rcx, qword [0x140084320]
xorps xmm0, xmm0
add rcx, 1
mov rbx, qword [0x140084348]
js 0x1400499f4
cvtsi2ss xmm0, rcx
jmp 0x140049a09
mov rax, rcx
and ecx, 1
shr rax, 1
or rax, rcx
cvtsi2ss xmm0, rax
addss xmm0, xmm0
divss xmm0, dword [0x140084310]
call sub.api_ms_win_crt_math_l1_1_0.dll_ceilf
movss xmm1, dword [0x14007803c]
xor ecx, ecx
comiss xmm0, xmm1
jb 0x140049a3b
subss xmm0, xmm1
comiss xmm0, xmm1
jae 0x140049a3b
movabs rax, 0x8000000000000000
mov rcx, rax
cvttss2si rax, xmm0
add rax, rcx
mov ecx, 8
cmp rax, rcx
cmova rcx, rax
cmp rbx, rcx
jae 0x140049a6d
cmp rbx, 0x200
jae 0x140049a6a
lea rbx, [rbx*8]
cmp rbx, rcx
jae 0x140049a6d
mov rbx, rcx
mov rdx, rbx
add rsp, 0x20
pop rbx
jmp 0x140049810
Function at 0x14004b9d0
Capabilities:
Delete directory
Delete file

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x40
mov rbx, rcx
lea rdi, [0x14004b1b4]
mov r9, rdi
lea r8, str.SetFileInformationByHandle
lea rdx, str.kernel32.dll
lea rcx, [0x1400827f0]
call fcn.14004b154
mov rsi, rax
cmp rax, rdi
jne 0x14004ba78
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
xor edi, edi
test eax, eax
je 0x14004ba26
mov byte [rsp + 0x68], 1
mov dword [rsp + 0x6c], edi
mov rax, qword [rsp + 0x68]
jmp 0x14004ba70
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x10b
jne 0x14004ba46
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x14004ba16
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsp + 0x78], dil
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [rax - 2]
cmp ecx, 1
jbe 0x14004ba67
cmp eax, 0x35
je 0x14004ba67
cmp eax, 0x7b
mov dword [rsp + 0x7c], eax
jne 0x14004ba6b
mov dword [rsp + 0x7c], edi
mov rax, qword [rsp + 0x78]
add rsp, 0x40
pop rdi
pop rsi
pop rbx
ret
mov r9d, 0x2200000
mov r8d, 0x10000
mov rdx, rbx
lea rcx, [rsp + 0x30]
call fcn.14004b978
xor edi, edi
test eax, eax
je 0x14004bad2
mov byte [rsp + 0x78], dil
lea ecx, [rax - 2]
cmp ecx, 1
jbe 0x14004bab2
cmp eax, 0x35
je 0x14004bab2
cmp eax, 0x7b
mov dword [rsp + 0x7c], eax
jne 0x14004bab6
mov dword [rsp + 0x7c], edi
mov rcx, qword [rsp + 0x30]
cmp rcx, 0xffffffffffffffff
je 0x14004ba6b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x14004ba6b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_terminate]
int3
mov dword [rsp + 0x70], 3
mov r9d, 4
lea r8, [rsp + 0x70]
lea edx, [r9 + 0x11]
mov rbx, qword [rsp + 0x30]
mov rcx, rbx
mov rax, rsi
call qword [0x14004f800]
test eax, eax
je 0x14004bb09
mov byte [rsp + 0x78], 1
mov dword [rsp + 0x7c], edi
jmp 0x14004bb5a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
sub ecx, 1
je 0x14004bb27
sub ecx, 0x31
je 0x14004bb27
cmp ecx, 0x25
je 0x14004bb27
mov byte [rsp + 0x78], dil
jmp 0x14004bb56
mov byte [rsp + 0x68], 1
mov r9d, 1
lea r8, [rsp + 0x68]
lea edx, [r9 + 3]
mov rcx, rbx
mov rax, rsi
call qword [0x14004f800]
test eax, eax
jne 0x14004bafe
mov byte [rsp + 0x78], dil
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x7c], eax
cmp rbx, 0xffffffffffffffff
je 0x14004ba6b
mov rcx, rbx
jmp 0x14004bac1
Function at 0x140001fd0
Capabilities:
Write file on windows

Disassembly:
push rbx
push rdi
push r15
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov rbx, r8
mov r15, rdx
mov rdi, rcx
je case.default.0x140001ff1
add rsp, 0x20
pop r15
pop rdi
pop rbx
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x40]
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x48], rsi
mov rsi, rbx
mov qword [rsp + 0x58], r14
mov r9, qword [rax]
test r9, r9
je 0x14000201e
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x140002020
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x140002079
test ecx, ecx
jle 0x140002059
cmp rbx, rbp
mov rcx, r9
cmovl rbp, rbx
mov r8, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rdi + 0x58]
add r15, rbp
sub rbx, rbp
sub dword [rax], ebp
mov rcx, qword [rdi + 0x40]
movsxd rax, ebp
add qword [rcx], rax
test rbx, rbx
jle 0x140002079
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x140002079
mov r8, rbx
mov edx, 1
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
sub rbx, rax
mov r14, qword [rsp + 0x58]
sub rsi, rbx
mov rbp, qword [rsp + 0x40]
mov rax, rsi
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r15
pop rdi
pop rbx
ret
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
Function at 0x1400020a0
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push r14
sub rsp, 0x30
mov rbp, r8
mov r14, rdx
mov rsi, rcx
test r8, r8
jg 0x1400020c2
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je case.default.0x1400020d1
add rsp, 0x30
pop r14
pop rsi
pop rbp
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x38]
mov qword [rsp + 0x28], rbx
mov rbx, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x1400020f4
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x1400020f6
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140002132
mov qword [rsp + 0x20], rdi
cmp rax, rbp
mov rdi, rbp
mov rcx, r14
cmovb rdi, rax
mov r8, rdi
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rsi + 0x50]
add r14, rdi
sub rbx, rdi
sub dword [rax], edi
mov rcx, qword [rsi + 0x38]
movsxd rax, edi
mov rdi, qword [rsp + 0x20]
add qword [rcx], rax
cmp qword [rsi + 0x80], 0
je 0x1400021ce
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x14000216d
mov rcx, qword [rsi + 0x88]
mov rdx, qword [rsi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rsi + 0x38]
mov qword [rax], rcx
mov rax, qword [rsi + 0x50]
mov dword [rax], edx
cmp rbx, 0xfff
jbe 0x1400021ae
nop word [rax + rax]
mov r9, qword [rsi + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add r14, rax
sub rbx, rax
cmp rax, 0xfff
jne 0x1400021ce
cmp rbx, rax
ja 0x140002180
test rbx, rbx
je 0x1400021ce
mov r9, qword [rsi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
sub rbx, rax
sub rbp, rbx
mov rbx, qword [rsp + 0x28]
mov rax, rbp
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
Function at 0x140002630
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x140009040]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x14000265d
xor eax, eax
jmp 0x1400027c9
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140002697
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140002697
lea ecx, [r8 - 1]
mov dword [rax], ecx
mov eax, edi
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], dil
jmp 0x1400027c9
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x1400027bc
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x1400026da
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x140002705
mov rdx, qword [rbx + 0x80]
movsx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x1400027c1
lea rax, [rsp + 0x40]
mov byte [rsp + 0x50], dil
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x51]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x50]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140002774
sub eax, 1
je 0x140002774
cmp eax, 2
jne 0x1400027bc
movsx ecx, byte [rsp + 0x50]
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x1400027c1
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x1400027a2
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x58]
mov r8, rsi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rsi, rax
jne 0x1400027bc
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x1400027c1
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140003ab0
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x140002b80
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x140009040]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140002c53
cmp byte [rcx + 0x71], 0
je 0x140002c53
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x140002c4f
mov rcx, qword [rbx + 0x68]
lea rax, [rsp + 0x30]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140002c14
sub eax, 1
je 0x140002c18
cmp eax, 2
jne 0x140002c4f
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140003ab0
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140002c46
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rdi, rax
jne 0x140002c4f
cmp byte [rbx + 0x71], 0
sete al
jmp 0x140002bfc
xor al, al
jmp 0x140002bfc
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140003ab0
add rsp, 0x60
pop rbx
ret

Function at 0x140004430
Capabilities:
Parse pe header

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

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004718d0]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x004718e0]
mov dword [rax], 1
mov rax, qword [0x004718f0]
mov dword [rax], 1
mov rax, qword [0x004718c0]
mov dword [rax], 1
mov rax, qword [0x00471530]
cmp word [rax], 0x5a4d
je 0x4010d0
mov rax, qword [0x004718b0]
mov dword [0x0047c008], edx
mov eax, dword [rax]
test eax, eax
je 0x4010c2
mov ecx, 2
call sym.__set_app_type
mov rcx, 0xffffffffffffffff
call sym._encode_pointer
mov rdx, qword [0x004715d0]
mov qword [rdx], rax
mov rdx, qword [0x004715c0]
mov qword [rdx], rax
mov rax, qword [0x00471630]
mov edx, dword [rax]
mov rax, qword [sym.imp.msvcrt.dll__fmode]
mov rax, qword [rax]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x004714e0]
cmp dword [rax], 1
je 0x401120
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401075
movsxd rcx, dword [rax + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x401058
movzx ecx, word [rax + 0x18]
cmp cx, 0x10b
je 0x401133
cmp cx, 0x20b
jne 0x401058
cmp dword [rax + 0x84], 0xe
jbe 0x401058
mov ecx, dword [rax + 0xf8]
xor edx, edx
test ecx, ecx
setne dl
jmp 0x401058
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401058
mov r8d, dword [rax + 0xe8]
xor edx, edx
test r8d, r8d
setne dl
jmp 0x401058

Function at 0x4031e0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov r14, rdx
mov rsi, rcx
call sym.func_newL
mov rbx, rax
movzx eax, byte [r14 + 0x3c]
test eax, eax
mov r13d, eax
je 0x40326d
sub eax, 1
mov r12d, r14d
xor r15d, r15d
lea rbp, [rax + rax + 2]
mov rdi, 0xffffffffffffffff
nop
mov edx, 0x30
mov rcx, rsi
call sym.lj_mem_newgco
mov edx, 0x105
mov qword [rax + 0x10], rdi
mov word [rax + 9], dx
lea rdx, [rax + 0x10]
mov qword [rax + 0x20], rdx
mov rdx, qword [r14 + 0x28]
movzx edx, word [rdx + r15]
mov ecx, edx
shl edx, 0x18
sar ecx, 0xe
xor edx, r12d
and ecx, 1
mov dword [rax + 0x28], edx
mov byte [rax + 0xb], cl
mov qword [rbx + r15*4 + 0x28], rax
add r15, 2
cmp rbp, r15
jne 0x403220
mov rax, rbx
mov byte [rbx + 0xb], r13b
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x404ea0
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push rbx
sub rsp, 0x20
mov rax, qword [0x0047c040]
mov rbx, rcx
test rax, rax
je 0x404f30
mov edx, 0x20
mov rcx, rbx
call rax
test al, al
je 0x404f67
mov rax, qword [rbx]
cmp rax, 1
jbe 0x404f70
mov rax, qword [rbx + 8]
cmp rax, 0x3f
ja 0x404ee5
add rax, 0x40
mov qword [rbx + 8], rax
mov rax, qword [rbx + 0x10]
cmp rax, 0x1ff
ja 0x404efb
add rax, 0x200
mov qword [rbx + 0x10], rax
mov rax, qword [rbx + 0x18]
cmp rax, 0x1ffff
jbe 0x404f20
mov rcx, rbx
call sym.lj_prng_u64
mov eax, 1
add rsp, 0x20
pop rbx
ret
add rax, 0x20000
mov qword [rbx + 0x18], rax
jmp 0x404f07
xor r8d, r8d
xor edx, edx
lea rcx, str.advapi32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryExA]
test rax, rax
je 0x404f67
lea rdx, str.SystemFunction036
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
mov qword [0x0047c040], rax
jne 0x404eb4
xor eax, eax
add rsp, 0x20
pop rbx
ret
add rax, 2
mov qword [rbx], rax
mov rax, qword [rbx + 8]
cmp rax, 0x3f
ja 0x404ee5
jmp 0x404edd