joyce8/EMBER2024-capa huggingface dataset:
Function at 0x468020
Capabilities:
Access peb ldr_data

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x78
mov qword [rsp + 0x30], r14
mov rax, qword [r14 + 0x30]
inc dword [rax + 0xd8]
mov byte [r14 + 0xbf], 1
mov qword [r14 + 0x10], 0xfffffffffffffade
mov rax, qword [r14 + 0x30]
mov rcx, qword [rax + 0xa0]
mov ecx, dword [rcx + 0x14]
mov dword [rax + 0x2b4], ecx
mov rax, qword [r14 + 0x30]
mov rax, qword [rax + 0xa0]
inc dword [rax + 0x14]
lea rax, [rsp + 0x88]
mov qword [rsp + 0x18], rax
call fcn.004480e0
mov qword [rsp + 0x20], rax
mov rbx, qword [rsp + 0x18]
mov rcx, rax
mov rax, qword [rsp + 0x80]
call fcn.00440320
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax + 0x38]
mov qword [rax + 0x70], rcx
mov rdx, qword [rax + 0x40]
mov qword [rax + 0x78], rdx
mov rdx, qword [rax + 0x68]
mov qword [rax + 0x80], rdx
cmp qword [rax], rcx
ja 0x4680c6
nop word [rax + rax]
cmp qword [rax + 8], rcx
jae 0x468114
mov rdx, qword [rax + 0x38]
lea rbx, [0x00440ca0]
mov qword [rsp + 0x50], rbx
mov rbx, qword [rsp + 0x18]
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x60], rdx
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0x70], rax
lea rcx, [rsp + 0x50]
mov qword [rsp], rcx
call fcn.0046d660
xorps xmm15, xmm15
mov r14, qword [0x00610130]
mov r14, qword gs:[r14]
mov r14, qword [r14]
mov rax, qword [rsp + 0x30]
mov ebx, 2
mov ecx, 3
nop
call fcn.00439e20
mov rdx, qword [rsp + 0x30]
mov rsi, qword [rdx + 0x70]
cmp qword [rdx], rsi
ja 0x468139
cmp qword [rdx + 8], rsi
jae 0x46817c
lea rax, [0x00440ba0]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x18]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rdx
lea rax, [rsp + 0x38]
mov qword [rsp], rax
nop dword [rax]
call fcn.0046d660
xorps xmm15, xmm15
mov r14, qword [0x00610130]
mov r14, qword gs:[r14]
mov r14, qword [r14]
mov rdx, qword [rsp + 0x30]
mov rax, qword [rdx + 0x80]
test rax, rax
je 0x46818d
cmp qword [rdx], rax
ja 0x468193
cmp qword [rdx + 8], rax
jae 0x4681ce
lea rax, [0x00440aa0]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x20]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rdx
lea rax, [rsp + 0x38]
mov qword [rsp], rax
call fcn.0046d660
xorps xmm15, xmm15
mov r14, qword [0x00610130]
mov r14, qword gs:[r14]
mov r14, qword [r14]
lea rax, [0x00501bc8]
mov qword [rsp], rax
call fcn.0046d660
xorps xmm15, xmm15
mov r14, qword [0x00610130]
mov r14, qword gs:[r14]
mov r14, qword [r14]
lea rax, [rsp + 0x88]
mov qword [rsp + 0x28], rax
nop dword [rax]
call fcn.004480e0
mov rbx, qword [rsp + 0x28]
mov rcx, rax
mov rax, qword [rsp + 0x80]
call fcn.00440320
mov rax, qword [rsp + 0x30]
mov rax, qword [rax + 0x30]
dec dword [rax + 0xd8]
add rsp, 0x78
pop rbp
ret
Function at 0x46a780
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x10
mov qword [rsp + 0x20], rax
test rbx, rbx
jbe 0x46a8f7
movzx edx, byte [rax]
test edx, edx
jne 0x46a7b4
nop dword [rax]
test r8b, r8b
jne 0x46a7b4
xor eax, eax
xor ebx, ebx
mov rcx, rbx
xor edi, edi
add rsp, 0x10
pop rbp
ret
bt edx, 7
jae 0x46a7c7
xor edx, edx
xor r8d, r8d
xor r9d, r9d
jmp 0x46a8b7
mov r8d, 1
mov r9d, edx
and edx, 1
neg edx
shr r9d, 1
xor edx, r9d
add dword [rsi], edx
nop dword [rax]
cmp rbx, r8
jb 0x46a8a5
sub rbx, r8
sub rcx, r8
mov rdx, rcx
neg rdx
sar rdx, 0x3f
and r8, rdx
lea rdx, [rax + r8]
test rbx, rbx
jbe 0x46a897
movzx esi, byte [rax + r8]
bt esi, 7
jae 0x46a81d
xor eax, eax
xor esi, esi
xor r8d, r8d
jmp 0x46a860
mov eax, 1
cmp rax, rbx
ja 0x46a84b
add qword [rdi], rsi
sub rcx, rax
sub rbx, rax
mov rsi, rcx
neg rsi
sar rsi, 0x3f
and rax, rsi
add rax, rdx
mov edi, 1
add rsp, 0x10
pop rbp
ret
mov rcx, rbx
call fcn.0046fb20
lea r8d, [rcx + 7]
mov rcx, r11
mov eax, r12d
nop dword [rax]
cmp rax, rbx
jae 0x46a88f
movzx r9d, byte [rax + rdx]
mov r10d, r9d
and r9d, 0x7f
mov r11, rcx
mov ecx, r8d
shl r9d, cl
lea r12d, [rax + 1]
or esi, r9d
test r10b, 0x80
jne 0x46a853
mov rcx, r11
mov eax, r12d
jmp 0x46a822
mov rcx, rbx
call fcn.0046fa60
xor eax, eax
mov rcx, rax
nop dword [rax]
call fcn.0046fa60
mov eax, r8d
mov rcx, rbx
call fcn.0046fb20
lea r9d, [rcx + 7]
mov rcx, r12
cmp rbx, rdx
jbe 0x46a8ed
movzx r10d, byte [rdx + rax]
mov r11d, r10d
and r10d, 0x7f
mov r12, rcx
mov ecx, r9d
shl r10d, cl
inc edx
or r8d, r10d
test r11b, 0x80
jne 0x46a8b0
mov rcx, r12
mov r9d, edx
mov edx, r8d
mov r8d, r9d
jmp 0x46a7cd
mov eax, edx
mov rcx, rbx
call fcn.0046fa60
xor eax, eax
mov rcx, rax
nop dword [rax]
call fcn.0046fa60
nop
int3

Function at 0x46c060
Capabilities:
Access peb ldr_data

Disassembly:
cmp rsp, qword [r14 + 0x10]
jbe 0x46c10f
push rbp
mov rbp, rsp
sub rsp, 0x58
mov qword [rsp + 0x70], rbx
lea rdx, [rsp + 0x68]
mov qword [rsp + 8], 0
movups xmmword [rsp + 0x10], xmm15
movups xmmword [rsp + 0x18], xmm15
movups xmmword [rsp + 0x28], xmm15
movups xmmword [rsp + 0x38], xmm15
movups xmmword [rsp + 0x48], xmm15
lea rsi, [0x004585c0]
mov qword [rsp + 0x10], rsi
mov rsi, qword [rsp + 0x60]
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdx
mov rdx, r14
mov qword [rsp + 0x28], rdx
lea rdx, [rsp + 8]
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x40], rbx
lea rax, [rsp + 0x10]
mov qword [rsp], rax
call fcn.0046d660
xorps xmm15, xmm15
mov r14, qword [0x00610130]
mov r14, qword gs:[r14]
mov r14, qword [r14]
mov rax, qword [rsp + 8]
add rsp, 0x58
pop rbp
ret
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rcx
mov qword [rsp + 0x20], rdi
call fcn.0046d780
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
mov rcx, qword [rsp + 0x18]
mov rdi, qword [rsp + 0x20]
nop dword [rax]
jmp fcn.0046c060
Function at 0x46f580
Capabilities:
Encrypt data using aes via x86 extensions

Disassembly:
cmp rsp, qword [r14 + 0x10]
jbe 0x404343
push rbp
mov rbp, rsp
sub rsp, 0x18
mov rdx, qword [rax]
mov rcx, qword [rax + 8]
mov rax, rdx
call fcn.00409e60
add rsp, 0x18
pop rbp
ret
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
call fcn.0046d780
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
jmp 0x404320
cmp byte [0x0060ff09], 0
je 0x46f595
mov rcx, qword [rax + 8]
mov rax, qword [rax]
jmp 0x46c7c0
jmp 0x404320

Function at 0x46f5a0
Capabilities:
Encrypt data using aes via x86 extensions

Disassembly:
mov rcx, qword [0x00610208]
mov eax, dword [rax]
xor rcx, rax
xor rax, rbx
xor rax, qword [0x00610200]
mul rcx
xor rax, rdx
mov rcx, rax
movabs rax, 0x1d8e4e27c47d124b
mul rcx
xor rax, rdx
nop
nop
ret
cmp byte [0x0060ff09], 0
je 0x46f5d5
movq xmm0, rbx
pinsrd xmm0, dword [rax], 2
aesenc xmm0, xmmword [0x00610540]
aesenc xmm0, xmmword [0x00610550]
aesenc xmm0, xmmword [0x00610560]
movq rax, xmm0
ret
jmp 0x40a040

Function at 0x46f5e0
Capabilities:
Encrypt data using aes via x86 extensions

Disassembly:
mov rcx, qword [0x00610208]
mov rax, qword [rax]
xor rcx, rax
xor rax, rbx
xor rax, qword [0x00610200]
mul rcx
xor rax, rdx
mov rcx, rax
movabs rax, 0x1d8e4e27c47d1247
mul rcx
xor rax, rdx
nop
nop
ret
cmp byte [0x0060ff09], 0
je 0x46f616
movq xmm0, rbx
pinsrq xmm0, qword [rax], 1
aesenc xmm0, xmmword [0x00610540]
aesenc xmm0, xmmword [0x00610550]
aesenc xmm0, xmmword [0x00610560]
movq rax, xmm0
ret
jmp 0x40a080

Function at 0x4713c0
Capabilities:
Allocate thread local storage

Disassembly:
push rbp
mov rbp, rsp
mov rax, rsp
and rsp, 0xfffffffffffffff0
sub rsp, 0x30
mov qword [rsp + 0x20], rax
mov rax, qword [sym.imp.kernel32.dll_TlsAlloc]
call rax
mov rsp, qword [rsp + 0x20]
mov rcx, rax
cmp rcx, 0x40
jb 0x4713f4
mov rcx, 0x28
jmp 0x4713ff
shl rcx, 3
add rcx, 0x1480
mov qword [0x00610130], rcx
pop rbp
ret
Function at 0x485920
Capabilities:
Hash data using fnv

Disassembly:
cmp rsp, qword [r14 + 0x10]
jbe 0x485b5b
push rbp
mov rbp, rsp
sub rsp, 0x78
mov ebx, dword [rax + 0x2c]
test ebx, ebx
jne 0x4859ba
mov qword [rsp + 0x88], rax
lea rbx, [0x004f2740]
mov rcx, rax
lea rax, [0x005cb060]
call fcn.0047ca00
test cl, cl
jne 0x4859a3
mov rax, qword [rsp + 0x88]
call fcn.00485540
mov ecx, 1
mov rdi, rax
mov rsi, rbx
lea rax, [rsp + 0x28]
lea rbx, [0x00521ea8]
call fcn.0044f380
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x48], rbx
call fcn.00485ba0
mov rcx, qword [rsp + 0x88]
xor edx, edx
jmp 0x4859d7
lea rdx, [0x004eea80]
cmp rax, rdx
jne 0x4859c5
test byte [rbx], al
mov rax, rbx
add rsp, 0x78
pop rbp
ret
call fcn.00468be0
add rsp, 0x78
pop rbp
ret
mov rbx, rdx
lea rcx, [0x004db080]
call fcn.0040ac00
inc rdx
cmp rbx, rdx
jle 0x485a21
mov rsi, qword [rax + rdx*8]
cmp qword [rsi + 0x30], rcx
jne 0x4859d4
lea rax, [0x005cb060]
lea rbx, [0x004f2740]
lea rdi, [0x004eea80]
nop dword [rax + rax]
call fcn.0047cbc0
lea rdx, [0x004eea80]
cmp rax, rdx
jne 0x485b4b
test byte [rbx], al
mov rax, rbx
add rsp, 0x78
pop rbp
nop
ret
lea rcx, [0x004d3d60]
mov qword [rsp + 0x60], rcx
mov qword [rsp + 0x68], 0
mov rcx, qword [rsp + 0x60]
mov qword [rsp + 0x58], rcx
lea rax, [0x004def80]
call fcn.0040d3c0
mov qword [rsp + 0x70], rax
mov rcx, qword [rsp + 0x58]
test byte [rcx], al
cmp dword [0x00610190], 0
nop
je 0x485a7b
mov rbx, rax
lea rax, [0x004def80]
call fcn.00410020
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x58]
mov rdx, qword [rcx]
mov qword [rax], rdx
movups xmm0, xmmword [rcx + 8]
movups xmmword [rax + 8], xmm0
movups xmm0, xmmword [rcx + 0x18]
movups xmmword [rax + 0x18], xmm0
movups xmm0, xmmword [rcx + 0x28]
movups xmmword [rax + 0x28], xmm0
mov rbx, qword [rsp + 0x48]
xor ecx, ecx
xor edi, edi
xor esi, esi
mov r8d, esi
mov rax, qword [rsp + 0x50]
call fcn.00401460
call fcn.00468ca0
mov rsi, qword [rsp + 0x70]
mov dword [rsi + 0x28], eax
mov dword [rsi + 0x2c], 0
mov rcx, qword [rsp + 0x88]
mov edx, dword [rcx + 0x10]
xor eax, eax
jmp 0x485ae2
imul edx, edx, 0x1000193
xor edx, 0x2a
mov eax, 1
test rax, rax
jle 0x485ad4
mov dword [rsi + 0x10], edx
cmp dword [0x00610190], 0
je 0x485b03
call fcn.0046f6c0
mov qword [r11], rcx
mov rdx, qword [rsi + 0x30]
mov qword [r11 + 8], rdx
mov qword [rsi + 0x30], rcx
lea rax, [0x005cb060]
lea rbx, [0x004f2740]
lea rdi, [0x004eea80]
nop dword [rax]
call fcn.0047cbc0
lea rdx, [0x004eea80]
cmp rax, rdx
jne 0x485b3c
test byte [rbx], al
mov rax, rbx
add rsp, 0x78
pop rbp
ret
mov rbx, rdx
lea rcx, [0x004db080]
call fcn.0040ac00
mov rbx, rdx
lea rcx, [0x004db080]
call fcn.0040ac00
nop
mov qword [rsp + 8], rax
call fcn.0046d780
mov rax, qword [rsp + 8]
jmp fcn.00485920
Function at 0x48ae80
Capabilities:
Hash data using fnv

Disassembly:
cmp rsp, qword [r14 + 0x10]
jbe 0x48b5bf
push rbp
mov rbp, rsp
sub rsp, 0x10
mov qword [rsp + 0x20], rax
movabs rcx, 0xcbf29ce484222325
jmp 0x48aead
lea rax, [rdx + 0x10]
dec rbx
mov rcx, rsi
test rbx, rbx
jle 0x48b131
mov rdx, rax
mov rsi, qword [rax]
nop dword [rax]
test rsi, rsi
je 0x48b15d
mov edi, dword [rsi + 0x10]
shr edi, 1
mov r8, qword [rax + 8]
and edi, 0x3f
lea rax, [0x005252e0]
jmp qword [rax + rdi*8]
mov rax, rcx
add rsp, 0x10
pop rbp
ret
lea rax, [0x004d7120]
lea rbx, [0x005236f0]
call fcn.004678e0
inc rax
cmp rax, r8
jge 0x48b182
mov r9, qword [rsi + rax*8]
xor r10d, r10d
nop
jmp 0x48b1b7
lea rdi, [0x004d71a0]
mov rsi, rcx
movabs rcx, 0x100000001b3
jmp 0x48aea3
movzx r11d, r9b
xor rcx, r11
inc r10
shr r9, 8
movabs r11, 0x100000001b3
imul rcx, r11
cmp r10, 8
jl 0x48b19b
jmp 0x48b170
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rcx
call fcn.0046d780
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
mov rcx, qword [rsp + 0x18]
jmp fcn.0048ae80

Function at 0x48b760
Capabilities:
Hash data using fnv

Disassembly:
test byte [rax], al
mov rcx, rbx
and ebx, 0x7f
shl rbx, 5
lea rdx, [rax + rbx]
xor eax, eax
jmp 0x48b777
inc rax
cmp rax, 4
jge 0x48b78f
lea rbx, [rdx + rax*8]
mov rbx, qword [rbx]
cmp rbx, rcx
jne 0x48b774
mov eax, 1
ret
xor eax, eax
movabs rbx, 0xcbf29ce484222325
jmp 0x48b7a0
inc rax
cmp rax, 4
jge 0x48b7ae
mov rsi, qword [rdx + rax*8]
xor edi, edi
jmp 0x48b7d7
and ebx, 3
lea rdx, [rdx + rbx*8]
xchg qword [rdx], rcx
xor eax, eax
ret
movzx r8d, sil
xor rbx, r8
inc rdi
shr rsi, 8
movabs r8, 0x100000001b3
imul rbx, r8
cmp rdi, 8
jl 0x48b7bb
jmp 0x48b79d
Function at 0x4911c0
Capabilities:
Access peb ldr_data

Disassembly:
cmp rsp, qword [r14 + 0x10]
jbe 0x49128a
push rbp
mov rbp, rsp
sub rsp, 0x48
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x60], rbx
mov qword [rsp], rax
mov qword [rsp + 8], rbx
mov byte [rsp + 0x10], 0
call fcn.00403860
xorps xmm15, xmm15
mov r14, qword [0x00610130]
mov r14, qword gs:[r14]
mov r14, qword [r14]
cmp qword [rsp + 0x18], 0xffffffffffffffff
jne 0x49126f
mov rcx, qword [rsp + 0x60]
lea rdx, [rcx + 1]
mov qword [rsp + 0x40], rdx
lea rax, [0x004d7220]
xor ebx, ebx
mov rcx, rdx
call fcn.00469000
mov rbx, qword [rsp + 0x60]
mov rcx, rax
xor edi, edi
mov rsi, qword [rsp + 0x40]
mov rax, qword [rsp + 0x58]
nop dword [rax]
call fcn.004921c0
inc rbx
cmp rcx, rbx
jae 0x49125e
mov edi, 1
lea rsi, [0x004d7220]
call fcn.004690e0
mov word [rax + rbx*2 - 2], 0
xor edi, edi
xor esi, esi
add rsp, 0x48
pop rbp
ret
xor eax, eax
xor ebx, ebx
mov rcx, rbx
lea rdi, [0x005239a0]
lea rsi, [0x00522c60]
add rsp, 0x48
pop rbp
ret
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
call fcn.0046d780
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
jmp fcn.004911c0

Function at 0x4a1da0
Capabilities:
Access peb ldr_data

Disassembly:
cmp rsp, qword [r14 + 0x10]
jbe 0x4a1e4c
push rbp
mov rbp, rsp
sub rsp, 0x40
mov byte [rsp + 0x60], cl
mov byte [rsp + 0x61], dil
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], rbx
mov qword [rsp], rax
mov qword [rsp + 8], rbx
mov byte [rsp + 0x10], cl
call fcn.00403860
xorps xmm15, xmm15
mov r14, qword [0x00610130]
mov r14, qword gs:[r14]
mov r14, qword [r14]
cmp qword [rsp + 0x18], 0xffffffffffffffff
je 0x4a1e13
lea rax, [rsp + 0x20]
mov rbx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x58]
call fcn.0044f7c0
movzx edx, byte [rsp + 0x61]
movzx esi, byte [rsp + 0x60]
xor ecx, ecx
jmp 0x4a1e26
mov rax, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x58]
add rsp, 0x40
pop rbp
ret
inc rcx
cmp rbx, rcx
jle 0x4a1e39
movzx edi, byte [rax + rcx]
cmp dil, sil
jne 0x4a1e23
mov byte [rax + rcx], dl
jmp 0x4a1e23
mov rcx, rbx
mov rbx, rax
xor eax, eax
call fcn.00469a40
add rsp, 0x40
pop rbp
ret
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
mov byte [rsp + 0x18], cl
mov byte [rsp + 0x19], dil
nop
call fcn.0046d780
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
movzx ecx, byte [rsp + 0x18]
movzx edi, byte [rsp + 0x19]
jmp fcn.004a1da0
Function at 0x140018ca0
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 0x140018cc8
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 0x140018cee
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x140018cf0
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x140018d49
test ecx, ecx
jle 0x140018d29
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 0x140018d49
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x140018d49
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 0x140018d70
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 0x140018d92
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je 0x140018da8
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 0x140018dc4
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140018dc6
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140018e02
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 0x140018e9e
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x140018e3d
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 0x140018e7e
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 0x140018e9e
cmp rbx, rax
ja 0x140018e50
test rbx, rbx
je 0x140018e9e
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 0x140019300
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x140103040]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x14001932d
xor eax, eax
jmp 0x140019499
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140019367
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140019367
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 0x140019499
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x14001948c
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x1400193aa
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 0x1400193d5
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 0x140019491
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 0x140019444
sub eax, 1
je 0x140019444
cmp eax, 2
jne 0x14001948c
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 0x140019491
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140019472
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 0x14001948c
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x140019491
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.14008a5e0
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x14001bb40
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x140103040]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x14001bc13
cmp byte [rcx + 0x71], 0
je 0x14001bc13
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x14001bc0f
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 0x14001bbd4
sub eax, 1
je 0x14001bbd8
cmp eax, 2
jne 0x14001bc0f
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14008a5e0
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x14001bc06
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 0x14001bc0f
cmp byte [rbx + 0x71], 0
sete al
jmp 0x14001bbbc
xor al, al
jmp 0x14001bbbc
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14008a5e0
add rsp, 0x60
pop rbx
ret