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

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140003a98
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140003aa0
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x140003ab0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
test r8w, r8w
je 0x140003afd
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp rdx, r8
jb 0x140003af4
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x140003aff
add rax, 0x28
cmp rax, r9
jne 0x140003ae0
xor eax, eax
ret

Function at 0x140003b00
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x140003b90
mov rdx, qword [0x14009b240]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x140003b7e
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x140003b7e
cmp word [rax + 0x18], 0x20b
jne 0x140003b7e
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x140003b90
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x140003b69
add rbx, 0x28
cmp rbx, rdi
je 0x140003b90
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x140003b60
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

Function at 0x140003ba0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x14009b240]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140003bc0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140003bc8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140003bc0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x140003c1d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x140003c14
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140003bc0
add rax, 0x28
cmp rax, r9
jne 0x140003c00
xor eax, eax
ret

Function at 0x140003c20
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14009b240]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x140003c3f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140003c48
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x140003c3f
movzx ecx, word [rax + 6]
mov eax, ecx
ret
Function at 0x140003c60
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x14009b240]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x140003c80
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x140003c88
ret
cmp word [rdx + 0x18], 0x20b
jne 0x140003c80
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x140003cd0
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x140003cc7
test rcx, rcx
je 0x140003c80
sub rcx, 1
add rax, 0x28
cmp rdx, rax
jne 0x140003cb8
xor eax, eax
ret

Function at 0x140003ce0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14009b240]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x140003cff
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140003d08
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

Function at 0x140003d20
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x14009b240]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140003d40
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140003d48
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140003d40
sub rcx, rdx
movzx r9d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
test r9w, r9w
je 0x140003d40
lea eax, [r9 - 1]
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rdx + 0xc]
mov rax, r8
cmp rcx, r8
jb 0x140003d94
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x140003da0
add rdx, 0x28
cmp rdx, r9
jne 0x140003d80
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

Function at 0x140003db0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov r11, qword [0x14009b240]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x140003dd2
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x140003de0
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140003dd2
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x140003dd2
movzx edx, word [r8 + 0x14]
movzx r10d, word [r8 + 6]
lea rdx, [r8 + rdx + 0x18]
test r10w, r10w
je 0x140003dd2
lea r8d, [r10 - 1]
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop word cs:[rax + rax]
mov r9d, dword [rdx + 0xc]
mov r8, r9
cmp rax, r9
jb 0x140003e35
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x140003e48
add rdx, 0x28
cmp r10, rdx
jne 0x140003e20
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x140003e57
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x140003e67
mov edx, dword [rax + 0xc]
test edx, edx
je 0x140003e3e
test ecx, ecx
jg 0x140003e50
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x1406c8d90
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.1406c8f17
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 0x1406c8dc1
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1406c8da7
add dl, dl
jne 0x1406c8dce
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1406c8e2e
xor eax, eax
add dl, dl
jne 0x1406c8ddd
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1406c8ee5
add dl, dl
jne 0x1406c8dee
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1406c8dfb
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1406c8e08
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1406c8e15
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1406c8e22
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x1406c8db6
mov eax, 1
add dl, dl
jne 0x1406c8e3e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1406c8e4b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1406c8e33
sub eax, ebx
mov ebx, 1
jne 0x1406c8e84
mov ecx, 1
add dl, dl
jne 0x1406c8e66
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1406c8e73
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1406c8e5b
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1406c8db6
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1406c8ea0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1406c8ead
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1406c8e95
cmp eax, 0x7d00
jae 0x1406c8ed3
cmp eax, 0x500
jb 0x1406c8ece
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1406c8db6
cmp eax, 0x7f
ja 0x1406c8ed6
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1406c8db6
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1406c8f0a
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 0x1406c8db6
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140001154
Capabilities:
Terminate process

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x10], 0
mov dword [rbp - 0x1c], 0x30
mov eax, dword [rbp - 0x1c]
mov rax, qword gs:[rax]
mov qword [rbp - 0x28], rax
mov rax, qword [rbp - 0x28]
mov rax, qword [rax + 8]
mov qword [rbp - 0x18], rax
mov dword [rbp - 4], 0
jmp 0x1400011ac
mov rax, qword [rbp - 0x10]
cmp rax, qword [rbp - 0x18]
jne 0x14000119e
mov dword [rbp - 4], 1
jmp 0x1400011e3
mov ecx, 0x3e8
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
mov rax, qword [0x140005500]
mov qword [rbp - 0x30], rax
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x40], 0
mov rcx, qword [rbp - 0x38]
mov rax, qword [rbp - 0x40]
mov rdx, qword [rbp - 0x30]
lock cmpxchg qword [rdx], rcx
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x14000118b
mov rax, qword [0x140005510]
mov eax, dword [rax]
cmp eax, 1
jne 0x1400011fd
mov ecx, 0x1f
call sym._amsg_exit
jmp 0x14000123c
mov rax, qword [0x140005510]
mov eax, dword [rax]
test eax, eax
jne 0x140001232
mov rax, qword [0x140005510]
mov dword [rax], 1
mov rax, qword [0x140005550]
mov rdx, rax
mov rax, qword [0x140005540]
mov rcx, rax
call sym._initterm
jmp 0x14000123c
mov dword [0x140009024], 1
mov rax, qword [0x140005510]
mov eax, dword [rax]
cmp eax, 1
jne 0x140001270
mov rax, qword [0x140005530]
mov rdx, rax
mov rax, qword [0x140005520]
mov rcx, rax
call sym._initterm
mov rax, qword [0x140005510]
mov dword [rax], 2
cmp dword [rbp - 4], 0
jne 0x140001294
mov rax, qword [0x140005500]
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x50], 0
mov rdx, qword [rbp - 0x50]
mov rax, qword [rbp - 0x48]
xchg qword [rax], rdx
mov rax, qword [0x140005450]
mov rax, qword [rax]
test rax, rax
je 0x1400012bf
mov rax, qword [0x140005450]
mov rax, qword [rax]
mov r8d, 0
mov edx, 2
mov ecx, 0
call rax
call sym._pei386_runtime_relocator
mov rax, qword [sym._gnu_exception_handler]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
call rax
mov rdx, qword [0x1400054f0]
mov qword [rdx], rax
lea rax, [sym.__mingw_invalidParameterHandler]
mov rcx, rax
call sym._set_invalid_parameter_handler
call sym._fpreset
mov eax, dword [0x140009004]
lea rdx, [0x140009008]
mov ecx, eax
call sym.duplicate_ppstrings
call sym.__main
mov rax, qword [0x140005480]
mov rax, qword [rax]
mov rdx, qword [0x140009010]
mov qword [rax], rdx
mov rcx, qword [0x140009010]
mov rdx, qword [0x140009008]
mov eax, dword [0x140009004]
mov r8, rcx
mov ecx, eax
call dbg.main
mov dword [0x14000901c], eax
mov eax, dword [0x140009020]
test eax, eax
jne 0x14000135d
mov eax, dword [0x14000901c]
mov ecx, eax
call sym.exit
mov eax, dword [0x140009024]
test eax, eax
jne 0x14000136c
call sym._cexit
mov eax, dword [0x14000901c]
add rsp, 0x70
pop rbp
ret
Function at 0x140001378
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x1400054b0]
mov dword [rax], 1
mov rax, qword [0x1400054c0]
mov dword [rax], 1
mov rax, qword [0x1400054d0]
mov dword [rax], 1
mov rax, qword [0x140005470]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400013c9
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x1400013f5
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000141b
cmp eax, 0x20b
je 0x140001442
jmp 0x140001471
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000142e
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000145d
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov eax, 0
add rsp, 0x20
pop rbp
ret

Function at 0x140001aa0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sym.__acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sym.fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sym.__acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sym.vfprintf
call sym.abort
nop

Function at 0x140002772
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x140009168]
test eax, eax
je 0x14000280a
lea rax, [0x140009140]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x140009170]
mov qword [rbp - 8], rax
jmp 0x1400027ee
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x1400027e2
cmp qword [rbp - 0x10], 0
je 0x1400027e2
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x1400027a8
lea rax, [0x140009140]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x14000280b
nop
add rsp, 0x30
pop rbp
ret
Function at 0x140130000
Capabilities:
Access peb ldr_data
Authenticate hmac
Contain obfuscated stackstrings
Encode data using xor
Execute syscall
Hash data using fnv
Resolve function by parsing pe exports

Disassembly:
xchg r9, rbx
mov qword [rsp + 0x20], rbx
xchg r9, rbx
xchg r8, rcx
mov qword [rsp + 0x18], rcx
xchg r8, rcx
mov qword [rsp + 0x10], rdx
jmp 0x14013017d
lea rax, [r10 + r9*4]
mov ecx, dword [rax + r11]
add rcx, r11
movzx eax, byte [rcx]
inc rcx
jmp 0x14013016d
mov rax, qword gs:[0x60]
xor r13d, r13d
mov r8d, r13d
mov r10, qword [rax + 0x18]
jmp 0x1401300d8
nop
sub rsp, 8
mov qword [rsp], rdi
push r13
jne 0x14013008b
je 0x14013008b
ror r15d, 0x5e
push r9
jmp rax
jmp 0x14013014e
jne 0x1401301e6
cmp edx, 0xab7addf6
je 0x140130200
inc r8d
jmp 0x1401301a2
nop
push 0x60ede05f
mov qword [rsp], rbx
jmp 0x14013004e
xchg r14, rax
mov r14, qword [r10 + 0x10]
xchg r14, rax
mov r10, qword [rax]
xchg r11, r15
mov r15, qword [r10 + 0x30]
xchg r11, r15
je 0x140130139
jne 0x140130139
jmp rax
jmp 0x14013018c
nop
sub rsp, 8
mov qword [rsp], r14
push r15
lea rbp, [rsp - 0x2b8]
sub rsp, 0x3b8
jmp 0x140130036
test al, al
je 0x1401300c1
nop dword [rax]
jmp 0x1401301e6
mov qword [rsp + 8], rcx
push rax
mov qword [rsp], rbp
jmp 0x1401300c9
movsxd rax, dword [r11 + 0x3c]
mov ebx, dword [rax + r11 + 0x88]
mov r10d, dword [rbx + r11 + 0x20]
nop dword [rax + rax]
mov r9d, r8d
mov edx, 0x1f8b9843
jne 0x1401301c3
je 0x1401301c3
cmp r14, rdx
jmp rax
jmp 0x140130020
movsx eax, al
lea rcx, [rcx + 1]
xor eax, edx
imul edx, eax, 0x1000193
movzx eax, byte [rcx - 1]
test al, al
jmp 0x1401300af
mov rax, qword gs:[0x60]
mov r8d, r13d
mov ecx, dword [rbx + r11 + 0x24]
invalid
invalid
Function at 0x140058630
Capabilities:
Access peb ldr_data
Get process filename

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x68
movabs rbp, 0xdfbba13deb1422cb
movabs r13, 0x20445ec2d8961c67
movabs rsi, 0x20445ec2400c5844
movabs rbx, 0x1ba16c4cf286adbf
mov rax, qword [0x1400f73d0]
add rax, rbx
call rax
mov rcx, qword [0x1400f7620]
movabs r14, 0x32f8a7ce960ad85e
mov qword [rcx + r14], rax
mov rax, qword gs:[0x60]
add rax, 0x18
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x50]
mov rax, qword [rax]
add rax, 0x20
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x48], rax
lea r15, [r13 - 0x284c8a1c]
mov edi, 0xe8
movabs r12, 0xc4c6bbaa46018b0e
lea rax, [rsi + 0x1a2a786b]
mov qword [rsp + 0x38], rax
lea rax, [rsi - 0x2b207b0f]
mov qword [rsp + 0x60], rax
lea rax, [rbp - 0x454af37a]
mov qword [rsp + 0x58], rax
jmp 0x140058711
mov rax, qword [rsp + 0x28]
cmp rax, r15
mov ecx, 8
cmovl rcx, rdi
add rcx, qword [0x1400f7628]
mov rcx, qword [r14 + rcx]
add rcx, r12
jmp rcx

Function at 0x140062f10
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140063040
Function at 0x140021820
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 0x140021848
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 0x14002186e
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x140021870
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x1400218c9
test ecx, ecx
jle 0x1400218a9
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 0x1400218c9
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x1400218c9
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 0x140021900
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 0x140021922
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je 0x140021938
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 0x140021954
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140021956
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140021992
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 ds:[rsi + 0x80], 0
je 0x140021a2e
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x1400219d3
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 0x140021a0e
nop dword [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 0x140021a2e
cmp rbx, rax
ja 0x1400219e0
test rbx, rbx
je 0x140021a2e
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 0x140021ea0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x1402f7e80]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x140021ecd
xor eax, eax
jmp 0x14002203f
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140021f07
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140021f07
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 0x14002203f
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x140022032
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x140021f4a
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 0x140021f77
mov rdx, qword ds:[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 0x140022037
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 0x140021fea
nop dword [rax]
sub eax, 1
je 0x140021fea
cmp eax, 2
jne 0x140022032
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 0x140022037
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140022018
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 0x140022032
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x140022037
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140173d40
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret