joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001720
Capabilities:
Encrypt or decrypt data via bcrypt

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x90
mov rax, qword [0x14000e040]
xor rax, rsp
mov qword [rsp + 0x88], rax
mov r15, rdx
mov r13, rcx
xorps xmm0, xmm0
xor eax, eax
mov rsi, qword [rdx + 8]
sub rsi, qword [rdx]
add rsi, 0x10
movdqu xmmword [rsp + 0x68], xmm0
mov edi, eax
mov qword [rsp + 0x78], rax
mov r12d, eax
mov r14d, eax
je 0x1400017ef
movabs rax, 0x7fffffffffffffff
cmp rsi, rax
ja 0x14000197f
cmp rsi, 0x1000
jb 0x1400017b9
lea rcx, [rsi + 0x27]
cmp rcx, rsi
jbe 0x140001985
call fcn.1400075b0
test rax, rax
je 0x140001918
lea r14, [rax + 0x27]
and r14, 0xffffffffffffffe0
mov qword [r14 - 8], rax
jmp 0x1400017c4
mov rcx, rsi
call fcn.1400075b0
mov r14, rax
mov rbx, r14
mov qword [rsp + 0x68], rbx
lea rdi, [r14 + rsi]
mov r12, rdi
mov qword [rsp + 0x78], rdi
mov r8, rsi
xor edx, edx
mov rcx, r14
call sub.VCRUNTIME140.dll_memset
mov rbp, rdi
mov qword [rsp + 0x70], rdi
jmp 0x1400017f9
mov rbp, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x68]
mov rdx, qword [r15]
mov r8, qword [r15 + 8]
sub r8, rdx
sub r12d, r14d
mov dword [rsp + 0x48], 1
lea rax, [rsp + 0x80]
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x38], r12d
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov rcx, qword [r13 + 8]
call qword [sym.imp.bcrypt.dll_BCryptEncrypt]
test eax, eax
jne 0x14000195c
mov esi, dword [rsp + 0x80]
mov rcx, rbp
sub rcx, rbx
cmp rsi, rcx
jae 0x140001863
lea rbp, [rsi + rbx]
jmp 0x1400018a1
jbe 0x1400018a1
mov rax, rdi
sub rax, rbx
cmp rsi, rax
jbe 0x14000188e
mov rdx, rsi
lea rcx, [rsp + 0x68]
call fcn.140006630
mov rdi, qword [rsp + 0x78]
mov rbp, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x68]
jmp 0x1400018a1
sub rsi, rcx
mov r8, rsi
xor edx, edx
mov rcx, rbp
call sub.VCRUNTIME140.dll_memset
add rbp, rsi
lea rax, [rsp + 0x68]
cmp r15, rax
je 0x1400018ef
mov rcx, qword [r15]
test rcx, rcx
je 0x1400018e0
mov rdx, qword [r15 + 0x10]
sub rdx, rcx
cmp rdx, 0x1000
jb 0x1400018db
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x14000191f
mov rcx, r8
call fcn.14000782c
mov qword [r15], rbx
mov qword [r15 + 8], rbp
mov qword [r15 + 0x10], rdi
xor ebx, ebx
xor edi, edi
test rbx, rbx
je 0x140001931
sub rdi, rbx
mov rax, rbx
cmp rdi, 0x1000
jb 0x140001926
add rdi, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001926
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
mov rdx, rdi
mov rcx, rbx
call fcn.14000782c
mov rcx, qword [rsp + 0x88]
xor rcx, rsp
call fcn.140007470
mov rbx, qword [rsp + 0xe0]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea rdx, str.Encryption_failed
lea rcx, [rsp + 0x50]
call fcn.140001250
lea rdx, [0x14000bb50]
lea rcx, [rsp + 0x50]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
call fcn.140005fd0
int3
call fcn.140001120
int3
Function at 0x140001c40
Capabilities:
Generate random numbers via winapi

Disassembly:
push rbx
sub rsp, 0x70
mov rax, qword [0x14000e040]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov rbx, rcx
mov qword [rsp + 0x50], rcx
xor ecx, ecx
mov dword [rsp + 0x30], ecx
xorps xmm0, xmm0
movups xmmword [rbx], xmm0
mov qword [rbx], rcx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rcx
mov ecx, 0x20
call fcn.1400075b0
mov rcx, rax
mov qword [rbx], rax
add rax, 0x20
mov qword [rbx + 0x10], rax
xorps xmm0, xmm0
movups xmmword [rcx], xmm0
movups xmmword [rcx + 0x10], xmm0
lea rax, [rcx + 0x20]
mov qword [rbx + 8], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x20], 0xf0000000
mov r9d, 1
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140001d2d
mov r8, qword [rbx]
mov rdx, qword [rbx + 8]
sub rdx, r8
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
xor edx, edx
mov rcx, qword [rsp + 0x58]
test eax, eax
je 0x140001d04
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rax, rbx
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140007470
add rsp, 0x70
pop rbx
ret
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea rdx, str.Failed_to_generate_random_key
lea rcx, [rsp + 0x38]
call fcn.140001250
lea rdx, [0x14000bb50]
lea rcx, [rsp + 0x38]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rdx, str.Failed_to_acquire_crypto_context
lea rcx, [rsp + 0x38]
call fcn.140001250
lea rdx, [0x14000bb50]
lea rcx, [rsp + 0x38]
call sub.VCRUNTIME140.dll__CxxThrowException
int3

Function at 0x140001d50
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
push rbx
sub rsp, 0x20
mov ecx, 4
mov rax, qword gs:[0x58]
mov rax, qword [rax]
lea rbx, [0x140010070]
mov eax, dword [rcx + rax]
cmp dword [0x14000ecb0], eax
jle 0x140001de7
lea rcx, [0x14000ecb0]
call fcn.140007538
cmp dword [0x14000ecb0], 0xffffffff
jne 0x140001de7
call qword [sym.imp.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_]
mov dword [0x1400113f4], 0xffffffff
mov dword [0x140010074], eax
mov r8d, 1
nop word [rax + rax]
mov edx, eax
shr edx, 0x1e
xor edx, eax
imul eax, edx, 0x6c078965
add eax, r8d
mov dword [rbx + r8*4 + 4], eax
inc r8
cmp r8, 0x270
jb 0x140001db0
mov dword [0x140010070], 0x270
lea rcx, [0x14000ecb0]
call fcn.1400074cc
mov rcx, rbx
call fcn.140006b10
mov ecx, eax
imul rax, rcx, 0x1c3
cmp eax, 0x24
ja 0x140001e16
nop dword [rax]
mov rcx, rbx
call fcn.140006b10
mov ecx, eax
imul rax, rcx, 0x1c3
cmp eax, 0x25
jb 0x140001e00
shr rax, 0x20
sub rax, 0x7fffffce
xor rax, 0xffffffff80000000
mov qword [rsp + 0x30], rax
lea rcx, [rsp + 0x30]
call fcn.1400056a0
add rsp, 0x20
pop rbx
ret
Function at 0x140001fe0
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
mov eax, 0x13d0
call fcn.140008580
sub rsp, rax
mov rax, qword [0x14000e040]
xor rax, rsp
mov qword [rsp + 0x13c0], rax
mov rsi, rdx
mov rbx, rcx
mov qword [rsp + 0x28], rcx
xor ecx, ecx
mov dword [rsp + 0x24], ecx
xorps xmm0, xmm0
movups xmmword [rbx], xmm0
mov qword [rbx], rcx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rcx
mov edi, 1
mov dword [rsp + 0x24], edi
call qword [sym.imp.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_]
mov ecx, eax
mov dword [rsp + 0x13b4], 0xffffffff
mov dword [rsp + 0x34], eax
nop dword [rax]
mov eax, ecx
shr eax, 0x1e
xor eax, ecx
imul ecx, eax, 0x6c078965
add ecx, edi
mov dword [rsp + rdi*4 + 0x34], ecx
inc rdi
cmp rdi, 0x270
jb 0x140002050
mov dword [rsp + 0x30], 0x270
mov byte [rsp + 0x20], 0x90
mov edi, 0xa
mov rdx, qword [rbx + 8]
cmp rdx, qword [rbx + 0x10]
je 0x140002094
mov byte [rdx], 0x90
inc qword [rbx + 8]
jmp 0x1400020a1
lea r8, [rsp + 0x20]
mov rcx, rbx
call fcn.140006780
sub rdi, 1
jne 0x140002081
mov r8, qword [rsi]
mov r9, qword [rsi + 8]
sub r9, r8
mov rdx, qword [rbx + 8]
mov rcx, rbx
call fcn.140006180
mov edi, 0x14
lea rcx, [rsp + 0x30]
call fcn.140006b10
shr eax, 0x18
mov byte [rsp + 0x20], al
mov rdx, qword [rbx + 8]
cmp rdx, qword [rbx + 0x10]
je 0x1400020e5
mov byte [rdx], al
inc qword [rbx + 8]
jmp 0x1400020f2
lea r8, [rsp + 0x20]
mov rcx, rbx
call fcn.140006780
sub rdi, 1
jne 0x1400020c2
mov rcx, qword [rbx]
lea rdx, [rcx + 0xa]
lea r8, [rsp + 0x30]
call fcn.140005bf0
mov rdx, qword [rsi + 8]
sub rdx, qword [rsi]
mov rcx, qword [rbx]
add rcx, 0xa
add rcx, rdx
lea r8, [rsp + 0x30]
mov rdx, qword [rbx + 8]
call fcn.140005bf0
mov rax, rbx
mov rcx, qword [rsp + 0x13c0]
xor rcx, rsp
call fcn.140007470
lea r11, [rsp + 0x13d0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
Function at 0x140003b00
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 0x140003b28
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 0x140003b4e
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x140003b50
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x140003ba9
test ecx, ecx
jle 0x140003b89
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 0x140003ba9
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x140003ba9
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

Function at 0x140003bd0
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 0x140003bf2
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je 0x140003c08
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 0x140003c24
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140003c26
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140003c62
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 0x140003cfe
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x140003c9d
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 0x140003cde
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 0x140003cfe
cmp rbx, rax
ja 0x140003cb0
test rbx, rbx
je 0x140003cfe
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
Function at 0x140004160
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x14000e040]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x14000418d
xor eax, eax
jmp 0x1400042f9
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x1400041c7
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x1400041c7
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 0x1400042f9
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x1400042ec
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x14000420a
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 0x140004235
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 0x1400042f1
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 0x1400042a4
sub eax, 1
je 0x1400042a4
cmp eax, 2
jne 0x1400042ec
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 0x1400042f1
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x1400042d2
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 0x1400042ec
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x1400042f1
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140007470
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x140005170
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x14000e040]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140005243
cmp byte [rcx + 0x71], 0
je 0x140005243
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x14000523f
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 0x140005204
sub eax, 1
je 0x140005208
cmp eax, 2
jne 0x14000523f
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140007470
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140005236
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 0x14000523f
cmp byte [rbx + 0x71], 0
sete al
jmp 0x1400051ec
xor al, al
jmp 0x1400051ec
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140007470
add rsp, 0x60
pop rbx
ret
Function at 0x140006b10
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
sub rsp, 8
mov r9, rcx
mov r10d, 0x270
mov ecx, dword [rcx]
cmp ecx, r10d
jne 0x140006b71
lea r8, [r9 + 8]
nop dword [rax + rax]
mov edx, dword [r8 - 4]
xor edx, dword [r8]
lea r8, [r8 + 4]
btr edx, 0x1f
xor edx, dword [r8 - 8]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r8 + 0x62c]
xor ecx, edx
mov dword [r8 + 0x9b8], ecx
sub r10, 1
jne 0x140006b30
mov ecx, dword [r9]
jmp 0x140006c5b
cmp ecx, 0x4e0
jb 0x140006c5b
lea r10, [r9 + 0x9c4]
mov qword [rsp], rbx
mov r11d, dword [r10]
mov ebx, 0xe3
mov eax, r11d
mov r8, r10
mov r11d, dword [r10 + 4]
add r10, 4
mov edx, r11d
xor edx, eax
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r8 + 0x634]
xor ecx, edx
mov dword [r8 - 0x9c0], ecx
sub rbx, 1
jne 0x140006b90
lea r10, [r9 + 0xd50]
mov ebx, 0x18c
mov r11d, dword [r10]
nop
mov eax, r11d
mov r8, r10
mov r11d, dword [r10 + 4]
mov edx, eax
xor edx, r11d
add r10, 4
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r8 - 0xd4c]
xor ecx, edx
mov dword [r8 - 0x9c0], ecx
sub rbx, 1
jne 0x140006be0
mov eax, dword [r9 + 0x1380]
mov edx, eax
xor edx, dword [r9 + 4]
mov rbx, qword [rsp]
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r9 + 0x634]
xor ecx, edx
mov dword [r9 + 0x9c0], ecx
xor ecx, ecx
mov dword [r9], ecx
mov eax, ecx
mov edx, dword [r9 + rax*4 + 4]
lea eax, [rcx + 1]
mov dword [r9], eax
mov ecx, edx
mov eax, dword [r9 + 0x1384]
shr ecx, 0xb
and eax, ecx
xor edx, eax
mov eax, edx
and eax, 0xff3a58ad
shl eax, 7
xor edx, eax
mov eax, edx
and eax, 0xffffdf8c
shl eax, 0xf
xor edx, eax
mov eax, edx
shr eax, 0x12
xor eax, edx
add rsp, 8
ret

Function at 0x1400080cc
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140008116
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140008116
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140008116
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140008116
cmp dword [rcx + 0x84], 0xe
jbe 0x140008116
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140008118
xor al, al
add rsp, 0x28
ret
Function at 0x140002028
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp dword [0x14006f0c0], 0
je 0x14000204b
mov edx, 1
jmp 0x140002213
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
xor edx, edx
mov rcx, qword [rax + 0x10]
xor eax, eax
mov rbx, qword [rcx + 0x30]
test rbx, rbx
je 0x1400020ae
movsxd rdx, dword [rbx + 0x3c]
mov edx, dword [rbx + rdx + 0x88]
test edx, edx
je 0x1400020a6
lea rax, [rdx + rbx]
mov edx, dword [rax + 0xc]
add rdx, rbx
mov r8d, dword [rdx]
or r8d, 0x20202020
cmp r8d, 0x6c64746e
jne 0x1400020a6
mov edx, dword [rdx + 4]
or edx, 0x20202020
cmp edx, 0x6c642e6c
je 0x1400020b1
mov rcx, qword [rcx]
mov rdx, rbx
jmp 0x140002060
mov rbx, rdx
xor edx, edx
test rax, rax
je 0x140002213
mov ebp, dword [rax + 0x1c]
mov edi, dword [rax + 0x24]
xor esi, esi
lea r13, [0x14006f0c8]
mov edx, dword [rax + 0x18]
mov eax, dword [rax + 0x20]
add rdi, rbx
add rbp, rbx
lea r10d, [rdx - 1]
add rax, rbx
lea r12, [rax + r10*4]
add r10, r10
add r10, rdi
mov ecx, dword [r12]
add rcx, rbx
cmp word [rcx], 0x775a
jne 0x140002124
call fcn.140001f70
mov r11d, esi
inc esi
shl r11, 4
add r11, r13
mov dword [r11], eax
movzx eax, word [r10]
mov eax, dword [rbp + rax*4]
mov dword [r11 + 4], eax
xor eax, eax
mov qword [r11 + 8], rax
cmp esi, 0x1f4
je 0x140002136
sub r12, 4
lea rax, [r10 - 2]
cmp rdi, r10
je 0x140002136
mov r10, rax
jmp 0x1400020e8
mov dword [0x14006f0c0], esi
lea ebp, [rsi - 1]
lea r10, [0x14006f0c8]
test ebp, ebp
je 0x14000219d
lea rdx, [0x14006f0c0]
xor ecx, ecx
lea eax, [rcx + 1]
mov r8d, dword [rdx + 0xc]
mov rcx, rax
shl rax, 4
add rax, r10
mov r9d, dword [rax + 4]
cmp r9d, r8d
jae 0x140002191
mov edi, dword [rdx + 8]
mov r11, qword [rdx + 0x10]
mov r12d, dword [rax]
mov dword [rdx + 0xc], r9d
mov r9, qword [rax + 8]
mov dword [rdx + 8], r12d
mov qword [rdx + 0x10], r9
mov dword [rax], edi
mov dword [rax + 4], r8d
mov qword [rax + 8], r11
add rdx, 0x10
cmp ecx, ebp
jb 0x140002153
dec ebp
jmp 0x140002146
mov eax, dword [0x14006f0cc]
mov r13d, dword [0x14006f0dc]
xor edi, edi
lea r15, [0x14006bc20]
sub r13d, eax
lea r12, [rbx + rax]
mov r14d, edi
cmp edi, r13d
jae 0x140002041
lea rdx, [r12 + rdi]
mov r8d, 3
mov rcx, r15
inc rdi
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x1400021ba
lea rdi, [0x14006f0c0]
test r14d, r14d
je 0x140002041
add rdi, 0x10
cmp esi, ebp
je 0x140002041
mov ecx, dword [rdi - 4]
mov r8d, r13d
mov edx, r14d
inc ebp
add rcx, rbx
call fcn.140001f98
mov qword [rdi], rax
jmp 0x1400021ef
mov eax, edx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x140002900
Capabilities:
Read file on windows

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
mov ecx, 0x800
call sub.msvcrt.dll_malloc
mov r8d, 0x800
mov rcx, rbx
mov rsi, rax
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea rdx, [0x14006c010]
mov rcx, rsi
call sub.msvcrt.dll_fopen
mov rdi, qword [0x14006c500]
mov rbp, rax
movsxd r8, dword [rdi + 4]
mov rcx, r8
mov qword [rsp + 0x28], r8
call sub.msvcrt.dll_malloc
mov r8, qword [rsp + 0x28]
mov edx, 1
mov r9, rbp
mov rcx, rax
mov rbx, rax
call sub.msvcrt.dll_fread
mov rcx, rbp
call sub.msvcrt.dll_fclose
mov edx, dword [rdi + 4]
xor eax, eax
cmp edx, eax
jle 0x140002989
mov cl, byte [rdi + rax + 0x18]
mov byte [rbx + rax], cl
inc rax
jmp 0x140002979
lea r8, [rdi + 8]
mov rcx, rbx
call fcn.1400016ca
mov rcx, rsi
call sub.msvcrt.dll_free
mov rcx, rbx
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
jmp sub.msvcrt.dll_free

Function at 0x140002c70
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.140003ae0
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.140003ae0
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 0x140002ce0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140071094]
mov rbx, rcx
test esi, esi
jle 0x140002e10
mov rax, qword [0x140071098]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140002d2b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140002db5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140002d10
mov rcx, rbx
call fcn.140003750
mov rdi, rax
test rax, rax
je 0x140002e32
mov rax, qword [0x140071098]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140003890
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140071098]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140002e17
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x140002dae
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140002dc0
add dword [0x140071094], 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 [0x140071098]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140002dae
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140002c70
nop dword [rax]
xor esi, esi
jmp 0x140002d38
mov rax, qword [0x140071098]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140002c70
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140002c70
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x1400033c0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140071100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400710e0]
test rbx, rbx
je 0x14000341c
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 0x140003413
test eax, eax
jne 0x140003413
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400033f8
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]