joyce8/EMBER2024-capa huggingface dataset:
Function at 0x18005e070
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x68
mov rax, qword [rsp + 0x78]
sub rax, 0x10000
mov rcx, rax
call fcn.18005e2c0
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x70]
cmp qword [rsp + 0x20], rax
jbe 0x18005e18a
mov rax, qword [section..data]
cmp qword [rsp + 0x20], rax
jb 0x18005e0d4
mov rax, qword [0x180094008]
cmp qword [rsp + 0x20], rax
ja 0x18005e0d4
mov rax, qword [rsp + 0x20]
sub rax, 0x8000000
mov qword [rsp + 0x20], rax
jmp 0x18005e096
mov r8d, 0x30
xor edx, edx
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll_memset
mov r8d, 0x30
lea rdx, [rsp + 0x30]
mov rcx, qword [rsp + 0x20]
call sub.KERNEL32.dll_VirtualQuery
test rax, rax
jne 0x18005e105
jmp 0x18005e18a
cmp dword [rsp + 0x50], 0x10000
jne 0x18005e16d
cmp qword [rsp + 0x48], 0x10000
jb 0x18005e16d
mov r9d, 0x40
mov r8d, 0x3000
mov edx, 0x10000
mov rcx, qword [rsp + 0x20]
call sub.KERNEL32.dll_VirtualAlloc
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
je 0x18005e14b
mov rax, qword [rsp + 0x28]
jmp 0x18005e18c
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x677
jne 0x18005e15b
xor eax, eax
jmp 0x18005e18c
mov rax, qword [rsp + 0x20]
sub rax, 0x10000
mov qword [rsp + 0x20], rax
jmp 0x18005e185
mov rax, qword [rsp + 0x38]
sub rax, 0x10000
mov rcx, rax
call fcn.18005e2c0
mov qword [rsp + 0x20], rax
jmp 0x18005e096
xor eax, eax
add rsp, 0x68
ret

Function at 0x18005e1a0
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x68
mov rcx, qword [rsp + 0x70]
call fcn.18005e300
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x78]
cmp qword [rsp + 0x20], rax
jae 0x18005e2b6
mov rax, qword [section..data]
cmp qword [rsp + 0x20], rax
jb 0x18005e1fb
mov rax, qword [0x180094008]
cmp qword [rsp + 0x20], rax
ja 0x18005e1fb
mov rax, qword [rsp + 0x20]
add rax, 0x8000000
mov qword [rsp + 0x20], rax
jmp 0x18005e1bd
mov r8d, 0x30
xor edx, edx
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll_memset
mov r8d, 0x30
lea rdx, [rsp + 0x30]
mov rcx, qword [rsp + 0x20]
call sub.KERNEL32.dll_VirtualQuery
test rax, rax
jne 0x18005e22c
jmp 0x18005e2b6
cmp dword [rsp + 0x50], 0x10000
jne 0x18005e294
cmp qword [rsp + 0x48], 0x10000
jb 0x18005e294
mov r9d, 0x40
mov r8d, 0x3000
mov edx, 0x10000
mov rcx, qword [rsp + 0x20]
call sub.KERNEL32.dll_VirtualAlloc
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
je 0x18005e272
mov rax, qword [rsp + 0x28]
jmp 0x18005e2b8
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x677
jne 0x18005e282
xor eax, eax
jmp 0x18005e2b8
mov rax, qword [rsp + 0x20]
add rax, 0x10000
mov qword [rsp + 0x20], rax
jmp 0x18005e2b1
mov rax, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x30]
add rcx, rax
mov rax, rcx
mov rcx, rax
call fcn.18005e300
mov qword [rsp + 0x20], rax
jmp 0x18005e1bd
xor eax, eax
add rsp, 0x68
ret
Function at 0x18005e350
Capabilities:
Hook routines via microsoft detours

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x58
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x38]
mov rcx, qword [rsp + 0x60]
call fcn.18005e8e0
mov qword [rsp + 0x28], 0
cmp qword [0x180094e08], 0
jne 0x18005e398
cmp qword [0x180094e00], 0
je 0x18005e398
mov rax, qword [0x180094e00]
mov qword [0x180094e08], rax
cmp qword [0x180094e08], 0
je 0x18005e43e
mov rax, qword [0x180094e08]
cmp qword [rax + 0x10], 0
je 0x18005e43e
mov rax, qword [0x180094e08]
mov rcx, qword [rsp + 0x38]
cmp qword [rax + 0x10], rcx
jb 0x18005e43e
mov rax, qword [0x180094e08]
mov rcx, qword [rsp + 0x30]
cmp qword [rax + 0x10], rcx
ja 0x18005e43e
mov rax, qword [0x180094e08]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x38]
cmp qword [rsp + 0x28], rax
jb 0x18005e404
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x28], rax
jbe 0x18005e40b
xor eax, eax
jmp 0x18005e5b9
mov rax, qword [0x180094e08]
mov rcx, qword [rsp + 0x28]
mov rcx, qword [rcx + 0x48]
mov qword [rax + 0x10], rcx
mov r8d, 0x60
mov edx, 0xcc
mov rcx, qword [rsp + 0x28]
call sub.VCRUNTIME140.dll_memset
mov rax, qword [rsp + 0x28]
jmp 0x18005e5b9
mov rax, qword [0x180094e00]
mov qword [0x180094e08], rax
jmp 0x18005e460
mov rax, qword [0x180094e08]
mov rax, qword [rax + 8]
mov qword [0x180094e08], rax
cmp qword [0x180094e08], 0
je 0x18005e4ad
cmp qword [0x180094e08], 0
je 0x18005e4ab
mov rax, qword [0x180094e08]
cmp qword [rax + 0x10], 0
je 0x18005e4ab
mov rax, qword [0x180094e08]
mov rcx, qword [rsp + 0x38]
cmp qword [rax + 0x10], rcx
jb 0x18005e4ab
mov rax, qword [0x180094e08]
mov rcx, qword [rsp + 0x30]
cmp qword [rax + 0x10], rcx
ja 0x18005e4ab
jmp 0x18005e3dc
jmp 0x18005e44e
mov rcx, qword [rsp + 0x60]
call fcn.180060530
and eax, 0xffff
mov eax, eax
mov rcx, qword [rsp + 0x60]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x60], rax
mov r8, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x60]
call fcn.18005e5c0
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x18005e5b7
mov rax, qword [rsp + 0x48]
mov qword [0x180094e08], rax
mov rax, qword [0x180094e08]
mov dword [rax], 0x52727464
mov rax, qword [0x180094e08]
mov qword [rax + 0x10], 0
mov rax, qword [0x180094e08]
mov rcx, qword [0x180094e00]
mov qword [rax + 8], rcx
mov rax, qword [0x180094e08]
mov qword [0x180094e00], rax
mov qword [rsp + 0x40], 0
mov rax, qword [0x180094e08]
add rax, 0x60
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0x2a8
jmp 0x18005e568
mov eax, dword [rsp + 0x20]
dec eax
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 1
jle 0x18005e5a2
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x60
mov rcx, qword [rsp + 0x28]
mov rdx, qword [rsp + 0x40]
mov qword [rcx + rax + 0x48], rdx
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x60
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x40], rax
jmp 0x18005e55e
mov rax, qword [0x180094e08]
mov rcx, qword [rsp + 0x40]
mov qword [rax + 0x10], rcx
jmp 0x18005e3dc
xor eax, eax
add rsp, 0x58
ret
Function at 0x18005f2d0
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x78
mov r8d, 0x30
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0x80]
call sub.KERNEL32.dll_VirtualQuery
nop
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x18005f317
xor al, al
jmp 0x18005f3b9
mov rax, qword [rsp + 0x28]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
cmp dword [rax], 0x4550
je 0x18005f341
xor al, al
jmp 0x18005f3b9
mov eax, 8
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x30]
mov eax, dword [rcx + rax + 0x88]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
cmp qword [rsp + 0x88], rax
jb 0x18005f3b1
mov eax, 8
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x30]
mov eax, dword [rcx + rax + 0x88]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov ecx, 8
imul rcx, rcx, 0xc
mov rdx, qword [rsp + 0x30]
mov ecx, dword [rdx + rcx + 0x8c]
add rax, rcx
cmp qword [rsp + 0x88], rax
jae 0x18005f3b1
mov al, 1
jmp 0x18005f3b9
jmp 0x18005f3b7
xor al, al
add rsp, 0x78
ret

Function at 0x18005f6c0
Capabilities:
Allocate or change rwx memory

Disassembly:
sub rsp, 0x38
mov rax, qword [0x180094e00]
mov qword [rsp + 0x28], rax
jmp 0x18005f6e0
mov rax, qword [rsp + 0x28]
mov rax, qword [rax + 8]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
je 0x18005f70f
lea r9, [rsp + 0x20]
mov r8d, 0x40
mov edx, 0x10000
mov rcx, qword [rsp + 0x28]
call sub.KERNEL32.dll_VirtualProtect
test eax, eax
jne 0x18005f70d
call sub.KERNEL32.dll_GetLastError
jmp 0x18005f711
jmp 0x18005f6d2
xor eax, eax
add rsp, 0x38
ret
Function at 0x18005fdd0
Capabilities:
Resume thread

Disassembly:
sub rsp, 0x68
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [0x180094e18], eax
je 0x18005fdeb
mov eax, 0x10dd
jmp 0x18005ff10
mov rax, qword [0x180094e30]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
je 0x18005fe95
mov rax, qword [rsp + 0x28]
mov rax, qword [rax + 0x20]
movzx eax, byte [rax + 0x3e]
lea r9, [rsp + 0x20]
mov rcx, qword [rsp + 0x28]
mov r8d, dword [rcx + 0x28]
mov edx, eax
mov rax, qword [rsp + 0x28]
mov rcx, qword [rax + 0x18]
call sub.KERNEL32.dll_VirtualProtect
mov rax, qword [rsp + 0x28]
cmp dword [rax + 8], 0
jne 0x18005fe60
mov rax, qword [rsp + 0x28]
cmp qword [rax + 0x20], 0
je 0x18005fe60
mov rax, qword [rsp + 0x28]
mov rcx, qword [rax + 0x20]
call fcn.18005ea20
mov rax, qword [rsp + 0x28]
mov qword [rax + 0x20], 0
mov rax, qword [rsp + 0x28]
mov rax, qword [rax]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x38], rax
mov edx, 0x30
mov rcx, qword [rsp + 0x38]
call fcn.180062020
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x28], rax
jmp 0x18005fdf7
mov qword [0x180094e30], 0
call fcn.18005f480
mov rax, qword [0x180094e28]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
je 0x18005fef9
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax + 8]
call sub.KERNEL32.dll_ResumeThread
mov rax, qword [rsp + 0x30]
mov rax, qword [rax]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x48], rax
mov edx, 0x10
mov rcx, qword [rsp + 0x48]
call fcn.180062020
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x30], rax
jmp 0x18005feb1
mov qword [0x180094e28], 0
mov dword [0x180094e18], 0
xor eax, eax
add rsp, 0x68
ret
Function at 0x180060440
Capabilities:
Suspend thread

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x48
cmp dword [0x180094e1c], 0
je 0x18006045d
mov eax, dword [0x180094e1c]
jmp 0x180060523
call sub.KERNEL32.dll_GetCurrentThread
cmp qword [rsp + 0x50], rax
jne 0x180060470
xor eax, eax
jmp 0x180060523
mov ecx, 0x10
call fcn.180062028
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
jne 0x1800604de
mov dword [rsp + 0x20], 8
cmp qword [rsp + 0x28], 0
je 0x1800604c3
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x38], rax
mov edx, 0x10
mov rcx, qword [rsp + 0x38]
call fcn.180062020
mov qword [rsp + 0x28], 0
mov eax, dword [rsp + 0x20]
mov dword [0x180094e1c], eax
mov qword [0x180094e20], 0
mov eax, dword [rsp + 0x20]
jmp 0x180060523
mov rcx, qword [rsp + 0x50]
call sub.KERNEL32.dll_SuspendThread
cmp eax, 0xffffffff
jne 0x1800604f8
call sub.KERNEL32.dll_GetLastError
mov dword [rsp + 0x20], eax
jmp 0x180060499
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x50]
mov qword [rax + 8], rcx
mov rax, qword [rsp + 0x28]
mov rcx, qword [0x180094e28]
mov qword [rax], rcx
mov rax, qword [rsp + 0x28]
mov qword [0x180094e28], rax
xor eax, eax
add rsp, 0x48
ret

Function at 0x180061968
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rdi, rdx
lea r8, [rsp + 0x60]
mov ebx, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
mov r8d, ebx
mov ecx, 0x1300
neg eax
sbb r9d, r9d
and qword [rsp + 0x30], 0
and r9d, dword [rsp + 0x60]
xor edx, edx
and dword [rsp + 0x28], 0
mov dword [rsp + 0x60], r9d
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x1800619ec
mov r8, qword [rdi]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x180065910]
cmp byte [rcx + rax], 0
je 0x1800619ec
dec r8
sub rdx, 1
jne 0x1800619d2
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret
Function at 0x1408a2058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x1408a21df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x1408a2089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1408a206f
add dl, dl
jne 0x1408a2096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1408a20f6
xor eax, eax
add dl, dl
jne 0x1408a20a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1408a21ad
add dl, dl
jne 0x1408a20b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1408a20c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1408a20d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1408a20dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1408a20ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x1408a207e
mov eax, 1
add dl, dl
jne 0x1408a2106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1408a2113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1408a20fb
sub eax, ebx
mov ebx, 1
jne 0x1408a214c
mov ecx, 1
add dl, dl
jne 0x1408a212e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1408a213b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1408a2123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1408a207e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1408a2168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1408a2175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1408a215d
cmp eax, 0x7d00
jae 0x1408a219b
cmp eax, 0x500
jb 0x1408a2196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1408a207e
cmp eax, 0x7f
ja 0x1408a219e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1408a207e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1408a21d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x1408a207e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140003f10
Capabilities:
Enumerate pe sections

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
mov eax, 0x1080
call fcn.14000fb70
sub rsp, rax
mov rax, qword [0x140022010]
xor rax, rsp
mov qword [rsp + 0x1070], rax
mov r14, qword [rsp + 0x10d0]
xor ebx, ebx
mov rbp, r9
mov rdi, r8
mov rsi, rcx
test r8, r8
je 0x140004039
mov qword [rsp + 0x38], rbx
lea rax, [rsp + 0x70]
mov qword [rsp + 0x60], rax
lea r9d, [rbx + 0x28]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x58], r8
mov qword [rsp + 0x30], rax
lea r8, [rsp + 0x48]
mov dword [rsp + 0x28], ebx
mov edx, 0x80862007
mov qword [rsp + 0x20], rbx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x48], 0x33
mov qword [rsp + 0x68], 0x1000
mov dword [rsp + 0x40], ebx
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x140003fb5
lea rdx, str.____Cant_read_module_headers
jmp 0x14000401d
movsxd rax, dword [rsp + 0xac]
lea rcx, [rsp + 0x70]
add rcx, rax
mov r8d, ebx
movzx eax, word [rcx + 0x14]
lea r10, [rcx + 0x18]
movzx r9d, word [rcx + 6]
add r10, rax
test r9d, r9d
je 0x140004016
nop dword [rax]
mov eax, r8d
lea rcx, [rax + rax*4]
cmp dword [r10 + rcx*8], 0x45474150
lea rdx, [r10 + rcx*8]
jne 0x14000400e
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp byte [rdx + rax], bl
jne 0x140004000
cmp rax, 4
je 0x14000406d
inc r8d
cmp r8d, r9d
jb 0x140003fe0
lea rdx, str.____Cant_find_section
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140006020
lea rdx, [0x140006200]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
mov rdx, rbx
mov r8d, ebx
mov r9, rbp
mov rcx, rsi
mov qword [rsp + 0x20], r14
call fcn.140003d30
mov rcx, qword [rsp + 0x1070]
xor rcx, rsp
call fcn.14000e960
add rsp, 0x1080
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x140004016
mov ecx, dword [rdx + 8]
mov edx, eax
lea rax, [rsp + 0x70]
add rax, rdx
je 0x140004016
test ecx, ecx
je 0x140004016
mov ebx, ecx
add rdx, rdi
jmp 0x14000403c
Function at 0x140004e20
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov rbx, r8
mov r14, rdx
mov rdi, rcx
je 0x140004e57
mov rbx, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
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 + 0x30], rbp
mov qword [rsp + 0x38], rsi
mov rsi, rbx
mov r9, qword [rax]
test r9, r9
je 0x140004e78
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x140004e7a
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x140004ed3
test ecx, ecx
jle 0x140004eb3
cmp rbx, rbp
mov rcx, r9
cmovl rbp, rbx
mov r8, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rdi + 0x58]
sub rbx, rbp
add r14, rbp
sub dword [rax], ebp
mov rcx, qword [rdi + 0x40]
movsxd rax, ebp
add qword [rcx], rax
test rbx, rbx
jle 0x140004ed3
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x140004ed3
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
sub rbx, rax
mov rbp, qword [rsp + 0x30]
sub rsi, rbx
mov rbx, qword [rsp + 0x40]
mov rax, rsi
mov rsi, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
Function at 0x140004f00
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 0x140004f22
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je 0x140004f38
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 0x140004f54
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140004f56
xor ecx, ecx
mov qword [rsp + 0x20], rdi
movsxd rax, ecx
test ecx, ecx
je 0x140004f90
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]
sub rbx, rdi
add r14, rdi
mov r8, rbx
sub dword [rax], edi
mov rcx, qword [rsi + 0x38]
movsxd rax, edi
add qword [rcx], rax
cmp qword [rsi + 0x80], 0
je 0x140005037
mov r9, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r9], rax
jne 0x140004fcb
mov rcx, qword [rsi + 0x88]
mov rdx, qword [rsi + 0x90]
mov qword [r9], rcx
sub edx, ecx
mov rax, qword [rsi + 0x38]
mov qword [rax], rcx
mov rax, qword [rsi + 0x50]
mov dword [rax], edx
mov rdi, r8
cmp r8, 0xfff
jbe 0x140005011
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]
sub rbx, rax
add r14, rax
mov rdi, rbx
cmp rax, 0xfff
jne 0x140005050
cmp rbx, rax
ja 0x140004fe0
mov r8, rdi
test rdi, rdi
je 0x140005037
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]
mov r8, rdi
sub r8, rax
sub rbp, r8
mov rdi, qword [rsp + 0x20]
mov rax, rbp
mov rbx, qword [rsp + 0x28]
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
sub rbp, rbx
jmp 0x14000503a
Function at 0x140005460
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x140022010]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x14000548d
xor eax, eax
jmp 0x1400055e2
mov rdx, qword [rcx + 0x40]
mov rax, qword [rdx]
test rax, rax
je 0x1400054b8
mov rdx, qword [rcx + 0x58]
movsxd r8, dword [rdx]
add r8, rax
cmp rax, r8
jae 0x1400054b8
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void____ptr64]
mov byte [rax], dil
mov eax, edi
jmp 0x1400055e2
cmp qword [rcx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x1400055d5
mov r8, qword [rcx + 0x18]
lea rax, [rcx + 0x70]
cmp qword [r8], rax
jne 0x1400054fb
mov rdx, qword [rcx + 0x90]
mov rcx, qword [rcx + 0x88]
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 0x140005526
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 0x1400055da
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 0x140005595
sub eax, 1
je 0x140005595
cmp eax, 2
jne 0x1400055d5
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 0x1400055da
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x1400055c3
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 0x1400055d5
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov eax, edi
jne 0x1400055da
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.14000e960
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x1400059e0
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x140022010]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140005ab3
cmp byte [rcx + 0x71], 0
je 0x140005ab3
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x140005aaf
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 0x140005a74
sub eax, 1
je 0x140005a78
cmp eax, 2
jne 0x140005aaf
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14000e960
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140005aa6
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 0x140005aaf
cmp byte [rbx + 0x71], 0
sete al
jmp 0x140005a5c
xor al, al
jmp 0x140005a5c
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14000e960
add rsp, 0x60
pop rbx
ret