joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001000
Capabilities:
Parse pe header

Disassembly:
push rsi
sub rsp, 0x20
mov rax, qword [0x140083028]
mov dword [rax], 1
mov rax, qword [0x140083030]
mov dword [rax], 1
mov rax, qword [0x140083038]
mov dword [rax], 1
mov rcx, qword [0x140083008]
movzx edx, word [rcx]
xor eax, eax
cmp edx, 0x5a4d
jne 0x14000108b
movsxd rdx, dword [rcx + 0x3c]
cmp dword [rcx + rdx], 0x4550
jne 0x14000108b
add rcx, rdx
movzx edx, word [rcx + 0x18]
cmp edx, 0x20b
je 0x140001073
cmp edx, 0x10b
jne 0x14000108b
cmp dword [rcx + 0x74], 0xf
jb 0x14000108b
add rcx, 0xe8
jmp 0x140001083
cmp dword [rcx + 0x84], 0xf
jb 0x14000108b
add rcx, 0xf8
xor eax, eax
cmp dword [rcx], 0
setne al
mov rcx, qword [0x140083020]
cmp dword [rcx], 1
mov dword [0x1400a93fc], eax
mov ecx, 2
sbb ecx, 0
call sym._set_app_type
mov rax, qword [0x140083088]
mov esi, dword [rax]
call sym.__p__fmode
mov dword [rax], esi
mov rax, qword [0x140083078]
mov esi, dword [rax]
call sym.__p__commode
mov dword [rax], esi
call dbg._wsetargv
mov rax, qword [section..rdata]
cmp dword [rax], 1
jne 0x1400010e5
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x20
pop rsi
ret
Function at 0x140001160
Capabilities:
Terminate process

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x20
mov rax, qword gs:[0x30]
mov rdi, qword [rax + 8]
mov rsi, qword [0x140083048]
xor eax, eax
lock cmpxchg qword [rsi], rdi
sete bl
je 0x1400011b9
cmp rdi, rax
je 0x1400011b9
mov r14, qword [sym.imp.KERNEL32.dll_Sleep]
nop word [rax + rax]
mov ecx, 0x3e8
call r14
xor eax, eax
lock cmpxchg qword [rsi], rdi
sete bl
je 0x1400011b9
cmp rdi, rax
jne 0x1400011a0
mov rdi, qword [0x140083050]
mov eax, dword [rdi]
cmp eax, 1
jne 0x1400011d3
mov ecx, 0x1f
call dbg._amsg_exit
jmp 0x1400011fa
cmp dword [rdi], 0
je 0x1400011e1
mov byte [0x1400a9418], 1
jmp 0x1400011fa
mov dword [rdi], 1
mov rcx, qword [str.H_t_]
mov rdx, qword [str.X_t_]
call sym._initterm
mov eax, dword [rdi]
cmp eax, 1
jne 0x14000121a
mov rcx, qword [0x140083058]
mov rdx, qword [str.0_t_]
call sym._initterm
mov dword [rdi], 2
test bl, bl
je 0x140001223
xor eax, eax
xchg qword [rsi], rax
mov rax, qword [0x140083010]
mov rax, qword [rax]
test rax, rax
je 0x140001242
xor ecx, ecx
mov edx, 2
xor r8d, r8d
call qword [0x1400b1008]
call dbg._pei386_runtime_relocator
lea rcx, [dbg._gnu_exception_handler]
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [0x140083040]
mov qword [rcx], rax
lea rcx, [dbg.__mingw_invalidParameterHandler]
call sym._set_invalid_parameter_handler
call dbg._fpreset
movsxd rdi, dword [0x1400a9404]
lea rcx, [rdi*8 + 8]
call sym.malloc
mov rsi, rax
test rdi, rdi
jle 0x1400012d6
mov ebx, edi
mov r14, qword [0x1400a9408]
xor r15d, r15d
nop word [rax + rax]
mov rcx, qword [r14 + r15*8]
call sym.wcslen
lea rdi, [rax*2 + 2]
mov rcx, rdi
call sym.malloc
mov qword [rsi + r15*8], rax
mov rdx, qword [r14 + r15*8]
mov rcx, rax
mov r8, rdi
call sym.memcpy
inc r15
cmp rbx, r15
jne 0x1400012a0
jmp 0x1400012d8
xor ebx, ebx
mov qword [rsi + rbx*8], 0
mov qword [0x1400a9408], rsi
call dbg.__main
mov rax, qword [0x1400a9410]
mov rcx, qword [0x140083018]
mov rcx, qword [rcx]
mov qword [rcx], rax
mov ecx, dword [0x1400a9404]
mov rdx, qword [0x1400a9408]
mov r8, qword [0x1400a9410]
call dbg.wmain
mov dword [0x1400a941c], eax
cmp dword [0x1400a93fc], 0
je 0x140001348
cmp byte [0x1400a9418], 0
jne 0x14000133c
call sym._cexit
mov eax, dword [0x1400a941c]
add rsp, 0x20
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
mov ecx, eax
call sym.exit
int3
Function at 0x140001d30
Capabilities:
Get token membership

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x90
mov dword [rsp + 0x64], 0
mov qword [rsp + 0x68], 0
mov word [rsp + 0x74], 0x500
mov dword [rsp + 0x70], 0
lea rax, [rsp + 0x68]
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
lea rcx, [rsp + 0x70]
mov dl, 2
mov r8d, 0x20
mov r9d, 0x220
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x140001dea
mov rdx, qword [rsp + 0x68]
lea r8, [rsp + 0x64]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
je 0x140001e41
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140001dd7
call qword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [rsp + 0x64], 0
setne al
add rsp, 0x90
pop rbx
pop rdi
pop rsi
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x10
call sym.__cxa_allocate_exception
mov rsi, rax
lea rdx, str.Failed_to_allocate_and_initialize_SID.
lea rcx, [rsp + 0x78]
call sym._ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2B8ue170006ILi0EEEPKc
mov bl, 1
lea rdx, [rsp + 0x78]
mov rcx, rsi
call method.std::runtime_error.runtime_error_std::__1::basic_string_char__std::__1::char_traits_char___std::__1::allocator_char____const_
lea rax, method.std::runtime_error.runtime_error__
mov qword [rsi], rax
xor ebx, ebx
lea rdx, [0x140083d60]
lea r8, [method.std::runtime_error.runtime_error__]
mov rcx, rsi
call sym.__cxa_throw
jmp 0x140001e96
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x10
call sym.__cxa_allocate_exception
mov rsi, rax
lea rdx, str.Failed_to_check_token_membership.
lea rcx, [rsp + 0x78]
call sym._ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2B8ue170006ILi0EEEPKc
mov bl, 1
lea rdx, [rsp + 0x78]
mov rcx, rsi
call method.std::runtime_error.runtime_error_std::__1::basic_string_char__std::__1::char_traits_char___std::__1::allocator_char____const_
lea rax, method.std::runtime_error.runtime_error__
mov qword [rsi], rax
xor ebx, ebx
lea rdx, [0x140083d60]
lea r8, [method.std::runtime_error.runtime_error__]
mov rcx, rsi
call sym.__cxa_throw
jmp 0x140001e9a
mov rdi, rax
test byte [rsp + 0x78], 1
jne 0x140001eb0
test bl, bl
jne 0x140001ec6
mov rcx, rdi
call sym._Unwind_Resume
mov rcx, qword [rsp + 0x88]
call sym..weak._ZdlPv.default.__clang_call_terminate
test bl, bl
je 0x140001ea8
jmp 0x140001ec6
mov rcx, rsi
call sym.__cxa_free_exception
mov rcx, rdi
call sym._Unwind_Resume
int3
Function at 0x140001ee0
Capabilities:
Create process on windows

Disassembly:
push rsi
push rdi
sub rsp, 0x98
xorps xmm0, xmm0
movaps xmmword [rsp + 0x20], xmm0
movaps xmmword [rsp + 0x30], xmm0
movaps xmmword [rsp + 0x40], xmm0
movaps xmmword [rsp + 0x50], xmm0
movaps xmmword [rsp + 0x80], xmm0
movaps xmmword [rsp + 0x70], xmm0
movaps xmmword [rsp + 0x60], xmm0
mov dword [rsp + 0x20], 0x70
lea rax, str.runas
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x40], rdx
mov dword [rsp + 0x50], 1
lea rcx, [rsp + 0x20]
call qword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x140001f51
add rsp, 0x98
pop rdi
pop rsi
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov ecx, 0x10
call sym.__cxa_allocate_exception
mov rsi, rax
cmp edi, 0x4c7
jne 0x140001f7f
lea rdx, str.Elevation_cancelled_by_user.
mov rcx, rsi
call method.std::runtime_error.runtime_error_char_const_
jmp 0x140001f8e
lea rdx, str.Failed_to_elevate_process.
mov rcx, rsi
call method.std::runtime_error.runtime_error_char_const_
lea rdx, [0x140083d48]
lea r8, [method.std::runtime_error.runtime_error__]
mov rcx, rsi
call sym.__cxa_throw
jmp 0x140001fa6
mov rdi, rax
mov rcx, rsi
call sym.__cxa_free_exception
mov rcx, rdi
call sym._Unwind_Resume
int3
Function at 0x140002600
Capabilities:
Query environment variable

Disassembly:
push rsi
push rdi
sub rsp, 0x128
lea rcx, str.APPDATA
lea rsi, [rsp + 0x20]
mov rdx, rsi
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov rcx, rsi
call sym.strlen
lea rdi, [0x1400a9428]
mov rcx, rdi
mov rdx, rsi
mov r8, rax
call method.std::__1::basic_string_char__std::__1::char_traits_char___std::__1::allocator_char___.__assign_external_char_const__unsigned_long_long_
lea rdx, str.MicrosoftKernelChecker_
mov r8d, 0x19
mov rcx, rdi
call method.std::__1::basic_string_char__std::__1::char_traits_char___std::__1::allocator_char___.append_char_const__unsigned_long_long_
nop
add rsp, 0x128
pop rdi
pop rsi
ret
Function at 0x140003390
Capabilities:
Contain obfuscated stackstrings
Create process on windows
Get comspec environment variable
Query environment variable

Disassembly:
push r14
push rsi
push rdi
push rbx
mov eax, 0x1148
call sym.___chkstk_ms
sub rsp, rax
movaps xmmword [rsp + 0x1130], xmm6
mov rsi, rdx
mov rdi, rcx
lea r14, [rsp + 0xa9]
mov dword [rsp + 0xac], 0x4558452e
mov dword [rsp + 0xa9], 0x2e444d43
mov byte [rsp + 0xb0], 0
xorps xmm6, xmm6
movaps xmmword [rsp + 0xc0], xmm6
movaps xmmword [rsp + 0xf0], xmm6
movaps xmmword [rsp + 0xd0], xmm6
movaps xmmword [rsp + 0xe0], xmm6
movaps xmmword [rsp + 0x100], xmm6
movaps xmmword [rsp + 0x110], xmm6
mov qword [rsp + 0x120], 0
mov dword [rsp + 0xc0], 0x68
mov dword [rsp + 0xfc], 1
mov byte [rsp + 0x130], 0
lea rcx, str.COMSPEC
call sym.getenv
test rax, rax
cmovne r14, rax
lea rbx, [rsp + 0x130]
mov rcx, rbx
mov rdx, r14
call sym.strcpy
mov rcx, rbx
call sym.strlen
mov dword [rsp + rax + 0x130], 0x20632f20
mov byte [rsp + rax + 0x134], 0
mov rcx, rbx
mov rdx, rdi
call sym.strcat
mov rcx, rbx
call sym.strlen
mov word [rsp + rax + 0x130], 0x20
mov rcx, rbx
mov rdx, rsi
call sym.strcat
lea rax, [rsp + 0x90]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x40], rax
movups xmmword [rsp + 0x30], xmm6
mov dword [rsp + 0x28], 0x10
mov dword [rsp + 0x20], 0
xor ecx, ecx
mov rdx, rbx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x140003559
lea rsi, [rsp + 0x78]
mov rcx, rsi
call sym.GetLastErrorAsString__
lea r8, str.Failed_to_create_process_by_error
mov r9d, 0x22
mov rcx, rsi
xor edx, edx
call method.std::__1::basic_string_wchar_t__std::__1::char_traits_wchar_t___std::__1::allocator_wchar_t___.insert_unsigned_long_long__wchar_t_const__unsigned_long_long_
mov rcx, qword [rax + 0x10]
mov qword [rsp + 0x70], rcx
movups xmm0, xmmword [rax]
movaps xmmword [rsp + 0x60], xmm0
xorps xmm0, xmm0
movups xmmword [rax], xmm0
mov qword [rax + 0x10], 0
lea rcx, section..data
lea rdx, [rsp + 0x60]
call method.Logger.Error_std::__1::basic_string_wchar_t__std::__1::char_traits_wchar_t___std::__1::allocator_wchar_t____const_
test byte [rsp + 0x60], 1
je 0x140003545
mov rcx, qword [rsp + 0x70]
call sym..weak._ZdlPv.default.__clang_call_terminate
test byte [rsp + 0x78], 1
je 0x140003559
mov rcx, qword [rsp + 0x88]
call sym..weak._ZdlPv.default.__clang_call_terminate
mov rcx, qword [rsp + 0x90]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rsp + 0x90]
lea rdx, [rsp + 0x5c]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x14000358b
mov dword [rsp + 0x5c], 0
mov rcx, qword [rsp + 0x98]
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rsi
mov rcx, qword [rsp + 0x90]
call rsi
mov eax, dword [rsp + 0x5c]
movaps xmm6, xmmword [rsp + 0x1130]
add rsp, 0x1148
pop rbx
pop rdi
pop rsi
pop r14
ret
Function at 0x14001d4c0
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x68
cmp qword [rcx + 0x78], 0
je 0x14001d6e3
mov esi, edx
mov rdi, rcx
test byte [rcx + 0x9c], 0x10
jne 0x14001d511
xorps xmm0, xmm0
movups xmmword [rdi + 0x10], xmm0
mov qword [rdi + 0x20], 0
mov rax, qword [rdi + 0x60]
cmp rax, 9
jb 0x14001d55c
cmp byte [rdi + 0xa2], 0
je 0x14001d570
mov r12, qword [rdi + 0x40]
jmp 0x14001d578
mov r12, qword [rdi + 0x28]
mov r14, qword [rdi + 0x38]
mov r9, qword [rdi + 0x30]
cmp esi, 0xffffffff
je 0x14001d59e
test r9, r9
jne 0x14001d53d
lea rax, [rsp + 0x50]
lea r9, [rsp + 0x4f]
mov qword [rdi + 0x30], r9
mov qword [rdi + 0x28], r9
mov qword [rdi + 0x38], rax
mov byte [r9], sil
mov r8, qword [rdi + 0x28]
mov r9, qword [rdi + 0x30]
inc r9
mov qword [rdi + 0x30], r9
mov rbx, r9
sub rbx, r8
jne 0x14001d5ad
jmp 0x14001d6d9
movups xmmword [rdi + 0x28], xmm0
mov qword [rdi + 0x38], 0
xor r14d, r14d
xor r12d, r12d
jmp 0x14001d58b
mov r12, qword [rdi + 0x68]
mov rax, qword [rdi + 0x70]
lea r14, [rax + r12]
dec r14
mov qword [rdi + 0x30], r12
mov qword [rdi + 0x28], r12
mov qword [rdi + 0x38], r14
mov dword [rdi + 0x9c], 0x10
mov r9, qword [rdi + 0x30]
cmp esi, 0xffffffff
jne 0x14001d522
mov r8, r12
mov rbx, r9
sub rbx, r8
je 0x14001d6d9
cmp byte [rdi + 0xa2], 0
je 0x14001d5e0
mov r9, qword [rdi + 0x78]
mov edx, 1
mov rcx, r8
mov r8, rbx
call sym.fwrite
mov rcx, rax
mov eax, 0xffffffff
cmp rcx, rbx
je 0x14001d6cd
jmp 0x14001d6e8
mov qword [rsp + 0x60], r14
mov rax, qword [rdi + 0x40]
mov qword [rsp + 0x58], rax
mov rcx, qword [rdi + 0x80]
test rcx, rcx
je 0x14001d6a6
lea rbx, [rdi + 0x88]
lea r13, [rsp + 0x58]
lea r15, [rsp + 0x50]
nop
mov rdx, qword [rdi + 0x40]
mov r10, qword [rdi + 0x60]
add r10, rdx
mov rax, qword [rcx]
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r10
mov qword [rsp + 0x28], rdx
mov qword [rsp + 0x20], r15
mov rdx, rbx
call qword [0x1400b1008]
mov rcx, qword [rdi + 0x28]
cmp qword [rsp + 0x50], rcx
je 0x14001d6e3
mov ebp, eax
cmp eax, 3
je 0x14001d6ab
cmp ebp, 1
ja 0x14001d6e3
mov r14, qword [rsp + 0x58]
mov rcx, qword [rdi + 0x40]
mov r9, qword [rdi + 0x78]
sub r14, rcx
mov edx, 1
mov r8, r14
call sym.fwrite
cmp rax, r14
jne 0x14001d6e3
cmp ebp, 1
jne 0x14001d6c8
mov r8, qword [rsp + 0x50]
mov r9, qword [rdi + 0x30]
mov qword [rdi + 0x28], r8
mov qword [rdi + 0x38], r9
mov rcx, qword [rdi + 0x80]
test rcx, rcx
jne 0x14001d610
call method.std::__1.__throw_bad_cast_abi:ue170006___
mov rbx, qword [rdi + 0x30]
mov r9, qword [rdi + 0x78]
sub rbx, rcx
mov edx, 1
mov r8, rbx
call sym.fwrite
cmp rax, rbx
jne 0x14001d6e3
mov r14, qword [rsp + 0x60]
mov qword [rdi + 0x30], r12
mov qword [rdi + 0x28], r12
mov qword [rdi + 0x38], r14
xor eax, eax
cmp esi, 0xffffffff
cmovne eax, esi
jmp 0x14001d6e8
mov eax, 0xffffffff
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x14001d9b0
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x38
xor edi, edi
cmp qword [rcx + 0x78], 0
je 0x14001db04
mov rsi, rcx
mov rcx, qword [rcx + 0x80]
test rcx, rcx
je 0x14001db90
mov eax, dword [rsi + 0x9c]
test al, 0x10
jne 0x14001da14
test al, 8
je 0x14001db04
mov rax, qword [rsi + 0x90]
mov qword [rsp + 0x30], rax
cmp byte [rsi + 0xa2], 0
je 0x14001dab9
mov rbx, qword [rsi + 0x20]
sub rbx, qword [rsi + 0x18]
jmp 0x14001dae6
mov rax, qword [rsi + 0x30]
cmp rax, qword [rsi + 0x28]
je 0x14001da41
mov rax, qword [rsi]
mov rax, qword [rax + 0x68]
mov edi, 0xffffffff
mov rcx, rsi
mov edx, 0xffffffff
call qword [0x1400b1008]
cmp eax, 0xffffffff
je 0x14001db04
lea rdi, [rsi + 0x88]
lea r15, [rsp + 0x30]
nop dword [rax]
mov r8, qword [rsi + 0x40]
mov rcx, qword [rsi + 0x80]
mov r9, qword [rsi + 0x60]
add r9, r8
mov rax, qword [rcx]
mov rax, qword [rax + 0x28]
mov qword [rsp + 0x20], r15
mov rdx, rdi
call qword [0x1400b1008]
mov ebx, eax
mov r14, qword [rsp + 0x30]
mov rcx, qword [rsi + 0x40]
mov r9, qword [rsi + 0x78]
sub r14, rcx
mov edx, 1
mov r8, r14
call sym.fwrite
cmp rax, r14
jne 0x14001daff
cmp ebx, 1
je 0x14001da50
cmp ebx, 2
je 0x14001daff
mov rcx, qword [rsi + 0x78]
call sym.fflush
mov edi, 0
test eax, eax
jne 0x14001daff
jmp 0x14001db04
mov rax, qword [rcx]
mov rax, qword [rax + 0x30]
call qword [0x1400b1008]
mov r9, qword [rsi + 0x48]
mov rbx, qword [rsi + 0x50]
sub rbx, r9
test eax, eax
jle 0x14001db4b
mov rcx, qword [rsi + 0x20]
sub rcx, qword [rsi + 0x18]
mov eax, eax
imul rcx, rax
add rbx, rcx
xor ebp, ebp
mov rcx, qword [rsi + 0x78]
neg ebx
mov edx, ebx
mov r8d, 1
call sym.fseek
test eax, eax
je 0x14001db13
mov edi, 0xffffffff
mov eax, edi
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret
test bpl, bpl
je 0x14001db24
mov rax, qword [rsp + 0x30]
mov qword [rsi + 0x88], rax
mov rax, qword [rsi + 0x40]
mov qword [rsi + 0x50], rax
mov qword [rsi + 0x48], rax
mov dword [rsi + 0x9c], 0
xorps xmm0, xmm0
movups xmmword [rsi + 0x10], xmm0
mov qword [rsi + 0x20], 0
jmp 0x14001db04
mov rdx, qword [rsi + 0x18]
cmp rdx, qword [rsi + 0x20]
je 0x14001dae6
mov r8, qword [rsi + 0x40]
mov rcx, qword [rsi + 0x80]
sub rdx, qword [rsi + 0x10]
mov rax, qword [rcx]
mov rax, qword [rax + 0x40]
mov qword [rsp + 0x20], rdx
lea rdx, [rsp + 0x30]
call qword [0x1400b1008]
mov eax, eax
add rbx, qword [rsi + 0x48]
add rax, qword [rsi + 0x40]
sub rbx, rax
mov bpl, 1
jmp 0x14001dae8
call method.std::__1.__throw_bad_cast_abi:ue170006___
int3
Function at 0x14001f6c0
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x38
mov rsi, rcx
lea rdi, [rsp + 0x38]
lea r15, [rsp + 0x28]
lea rbx, [rsp + 0x30]
nop
mov rcx, qword [rsi + 0x48]
mov rdx, qword [rsi + 0x50]
mov rax, qword [rcx]
mov rax, qword [rax + 0x28]
mov qword [rsp + 0x20], r15
mov r8, rbx
mov r9, rdi
call qword [0x1400b1008]
mov ebp, eax
mov r14, qword [rsp + 0x28]
sub r14, rbx
mov r9, qword [rsi + 0x40]
mov edx, 1
mov rcx, rbx
mov r8, r14
call sym.fwrite
mov rcx, rax
mov eax, 0xffffffff
cmp rcx, r14
jne 0x14001f746
cmp ebp, 1
je 0x14001f6e0
cmp ebp, 2
je 0x14001f746
mov rcx, qword [rsi + 0x40]
call sym.fflush
mov ecx, eax
xor eax, eax
neg ecx
sbb eax, eax
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret

Function at 0x14001f760
Capabilities:
Write file on windows

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x28
mov rsi, r8
mov rdi, rdx
mov r14, rcx
cmp byte [rcx + 0x58], 0
je 0x14001f795
mov r9, qword [r14 + 0x40]
mov edx, 1
mov rcx, rdi
mov r8, rsi
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
jmp sym.fwrite
xor ebx, ebx
test rsi, rsi
jle 0x14001f7c4
nop dword [rax]
movzx edx, byte [rdi + rbx]
mov rax, qword [r14]
mov rax, qword [rax + 0x68]
mov rcx, r14
call qword [0x1400b1008]
cmp eax, 0xffffffff
je 0x14001f7c4
inc rbx
cmp rsi, rbx
jne 0x14001f7a0
mov rbx, rsi
mov rax, rbx
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
ret

Function at 0x14001f7e0
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x68
cmp edx, 0xffffffff
je 0x14001f836
mov esi, edx
mov rdi, rcx
mov byte [rsp + 0x4f], sil
cmp byte [rcx + 0x58], 0
je 0x14001f83f
mov r9, qword [rdi + 0x40]
mov byte [rsp + 0x50], sil
lea rcx, [rsp + 0x50]
mov edx, 1
mov r8d, 1
call sym.fwrite
mov rcx, rax
mov eax, 0xffffffff
cmp rcx, 1
je 0x14001f838
jmp 0x14001f8fa
xor esi, esi
mov eax, esi
jmp 0x14001f8fa
lea rbx, [rsp + 0x50]
mov qword [rsp + 0x60], rbx
lea r15, [rsp + 0x4f]
lea r12, [rsp + 0x58]
lea r13, [rsp + 0x60]
lea r14, [rsp + 0x58]
nop dword [rax]
mov rcx, qword [rdi + 0x48]
mov rdx, qword [rdi + 0x50]
mov rax, qword [rcx]
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], r14
mov r8, r15
lea r9, [rsp + 0x50]
call qword [0x1400b1008]
cmp qword [rsp + 0x58], r15
je 0x14001f8f5
mov ebp, eax
cmp eax, 3
je 0x14001f8d4
cmp ebp, 1
ja 0x14001f8f5
mov r15, qword [rsp + 0x60]
sub r15, rbx
mov r9, qword [rdi + 0x40]
mov edx, 1
mov rcx, rbx
mov r8, r15
call sym.fwrite
cmp rax, r15
jne 0x14001f8f5
mov r15, qword [rsp + 0x58]
cmp ebp, 1
je 0x14001f860
jmp 0x14001f838
mov r9, qword [rdi + 0x40]
mov edx, 1
mov r8d, 1
mov rcx, r15
call sym.fwrite
cmp rax, 1
je 0x14001f838
mov eax, 0xffffffff
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x14001fcf0
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x38
mov rsi, rcx
lea rdi, [rsp + 0x38]
lea r15, [rsp + 0x28]
lea rbx, [rsp + 0x30]
nop
mov rcx, qword [rsi + 0x48]
mov rdx, qword [rsi + 0x50]
mov rax, qword [rcx]
mov rax, qword [rax + 0x28]
mov qword [rsp + 0x20], r15
mov r8, rbx
mov r9, rdi
call qword [0x1400b1008]
mov ebp, eax
mov r14, qword [rsp + 0x28]
sub r14, rbx
mov r9, qword [rsi + 0x40]
mov edx, 1
mov rcx, rbx
mov r8, r14
call sym.fwrite
mov rcx, rax
mov eax, 0xffffffff
cmp rcx, r14
jne 0x14001fd76
cmp ebp, 1
je 0x14001fd10
cmp ebp, 2
je 0x14001fd76
mov rcx, qword [rsi + 0x40]
call sym.fflush
mov ecx, eax
xor eax, eax
neg ecx
sbb eax, eax
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret

Function at 0x14001fdf0
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x68
cmp dx, 0xffff
je 0x14001fe2d
mov esi, edx
mov rdi, rcx
mov word [rsp + 0x4e], dx
cmp byte [rcx + 0x58], 0
je 0x14001fe42
mov rdx, qword [rdi + 0x40]
mov ecx, esi
call sym.fputwc
cmp ax, 0xffff
jne 0x14001fe2f
mov si, 0xffff
jmp 0x14001fe2f
xor esi, esi
mov eax, esi
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rbx, [rsp + 0x60]
mov qword [rsp + 0x58], rbx
lea r15, [rsp + 0x4e]
lea r12, [rsp + 0x68]
lea r13, [rsp + 0x58]
lea r14, [rsp + 0x50]
mov rcx, qword [rdi + 0x48]
mov rdx, qword [rdi + 0x50]
mov rax, qword [rcx]
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], r14
mov r8, r15
lea r9, [rsp + 0x50]
call qword [0x1400b1008]
cmp qword [rsp + 0x50], r15
je 0x14001fe27
mov ebp, eax
cmp eax, 3
je 0x14001fed8
cmp ebp, 1
ja 0x14001fe27
mov r15, qword [rsp + 0x58]
sub r15, rbx
mov r9, qword [rdi + 0x40]
mov edx, 1
mov rcx, rbx
mov r8, r15
call sym.fwrite
cmp rax, r15
jne 0x14001fe27
mov r15, qword [rsp + 0x50]
cmp ebp, 1
je 0x14001fe60
jmp 0x14001fe2f
mov r9, qword [rdi + 0x40]
mov edx, 1
mov r8d, 1
mov rcx, r15
call sym.fwrite
cmp rax, 1
jne 0x14001fe27
jmp 0x14001fe2f

Function at 0x1400200a0
Capabilities:
Encode data using xor

Disassembly:
cmp rdx, r8
je 0x1400200cb
movabs rcx, 0xf000000000000000
mov r9, r8
sub r9, rdx
mov rax, rdx
not rax
add rax, r8
jne 0x1400200ce
xor r8d, r8d
test r9b, 1
jne 0x14002012e
jmp 0x140020145
xor eax, eax
ret
mov r8, r9
and r8, 0xfffffffffffffffe
xor eax, eax
nop word [rax + rax]
shl rax, 4
movsx r10, byte [rdx]
add r10, rax
mov rax, r10
shr rax, 0x38
and eax, 0xfffffff0
xor rax, r10
shl rax, 4
movsx r10, byte [rdx + 1]
add r10, rax
mov r11, r10
and r11, rcx
mov rax, r11
shr rax, 0x38
or rax, r11
xor rax, r10
add rdx, 2
add r8, 0xfffffffffffffffe
jne 0x1400200e0
mov r8, rax
shl r8, 4
test r9b, 1
je 0x140020145
movsx rax, byte [rdx]
add r8, rax
and rcx, r8
mov rax, rcx
shr rax, 0x38
or rax, rcx
xor rax, r8
ret