joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140144c6f
Capabilities:
Read file via mapping

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x38
cmp dword [r8], 0
jle 0x140144cae
xor eax, eax
add rsp, 0x38
pop rbx
pop rdi
pop rsi
pop r14
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
cmp ecx, 0x8007000e
jne 0x140144c7e
mov dword [rsi], 7
jmp 0x140144c7e
mov rsi, r8
mov rbx, rdx
mov rdi, rcx
call fcn.140087343
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x10000080
mov dword [rsp + 0x20], 3
mov rcx, rbx
mov edx, 0x80000000
mov r8d, 1
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileA]
cmp rax, 0xffffffffffffffff
je 0x140144c8a
mov r14, rax
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov rcx, rax
xor edx, edx
mov r8d, 2
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov rbx, rax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rbx, rbx
je 0x140144c8a
mov qword [rsp + 0x20], 0
mov rcx, rbx
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov qword [rdi + 8], rax
test rax, rax
je 0x140144d60
mov qword [rdi + 0x28], rbx
mov al, 1
jmp 0x140144c80
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140144c7e

Function at 0x140149780
Capabilities:
Write file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0x28
test rdx, rdx
je 0x140149793
cmp dword [0x1401b5498], ecx
jle 0x14014979a
add rsp, 0x28
pop rdi
pop rsi
ret
mov rsi, rdx
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_lstrlenA]
movsxd rdi, eax
mov rcx, rsi
mov rdx, rdi
call 0x1401497e0
test edi, edi
je 0x140149793
cmp byte [rsi + rdi - 1], 0xa
je 0x140149793
lea rcx, [0x14016f8cd]
mov edx, 1
add rsp, 0x28
pop rdi
pop rsi
jmp 0x1401497e0
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x40
mov rsi, rdx
mov rdi, rcx
mov rax, qword [0x14019b038]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov ecx, 0xfffffff4
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rbx, rax
add rsi, rdi
lea r14, [rsp + 0x34]
mov r15, qword [sym.imp.KERNEL32.dll_WriteFile]
cmp rdi, rsi
jae 0x140149857
mov dword [rsp + 0x34], 0
mov r8d, esi
sub r8d, edi
mov qword [rsp + 0x20], 0
mov rcx, rbx
mov rdx, rdi
mov r9, r14
call r15
mov ecx, dword [rsp + 0x34]
test eax, eax
cmovne eax, ecx
je 0x140149857
add rdi, rax
test ecx, ecx
jne 0x14014981d
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.14009e1b0
nop
add rsp, 0x40
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
Function at 0x1401497e0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0x28
test rdx, rdx
je 0x140149793
cmp dword [0x1401b5498], ecx
jle 0x14014979a
add rsp, 0x28
pop rdi
pop rsi
ret
mov rsi, rdx
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_lstrlenA]
movsxd rdi, eax
mov rcx, rsi
mov rdx, rdi
call 0x1401497e0
test edi, edi
je 0x140149793
cmp byte [rsi + rdi - 1], 0xa
je 0x140149793
lea rcx, [0x14016f8cd]
mov edx, 1
add rsp, 0x28
pop rdi
pop rsi
jmp 0x1401497e0
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x40
mov rsi, rdx
mov rdi, rcx
mov rax, qword [0x14019b038]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov ecx, 0xfffffff4
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rbx, rax
add rsi, rdi
lea r14, [rsp + 0x34]
mov r15, qword [sym.imp.KERNEL32.dll_WriteFile]
cmp rdi, rsi
jae 0x140149857
mov dword [rsp + 0x34], 0
mov r8d, esi
sub r8d, edi
mov qword [rsp + 0x20], 0
mov rcx, rbx
mov rdx, rdi
mov r9, r14
call r15
mov ecx, dword [rsp + 0x34]
test eax, eax
cmovne eax, ecx
je 0x140149857
add rdi, rax
test ecx, ecx
jne 0x14014981d
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.14009e1b0
nop
add rsp, 0x40
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
Function at 0x140029a0c
Capabilities:
Clear file content

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.14001d0d4
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14001d0d4
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140029b5c
cmp rax, 0xffffffffffffffff
je 0x140029b5c
xor edi, edi
test rbp, rbp
jle 0x140029b07
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14001fa00
mov rbx, rax
test rax, rax
jne 0x140029a94
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140029afd
mov edx, 0x8000
mov ecx, r14d
call fcn.14001aa08
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.14001ddb0
cmp eax, 0xffffffff
je 0x140029add
cdqe
sub rbp, rax
test rbp, rbp
jg 0x140029aa4
mov edx, r15d
mov ecx, r14d
call fcn.14001aa08
jmp 0x140029afd
cmp byte [rsi + 0x38], dil
je 0x140029af4
cmp dword [rsi + 0x34], 5
jne 0x140029af4
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x140029afd
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14001b79c
jmp 0x140029b70
jns 0x140029b70
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14001d0d4
cmp rax, 0xffffffffffffffff
jne 0x140029b28
cmp byte [rsi + 0x30], dil
je 0x140029b70
mov edi, dword [rsi + 0x2c]
jmp 0x140029b70
mov ecx, r14d
call fcn.140018ec4
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140029b70
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x140029b70
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x140029b69
mov eax, dword [rsi + 0x2c]
jmp 0x140029b6e
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14001d0d4
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret

Function at 0x14002ac60
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x14002ac88
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x14002ac88
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret

Function at 0x1004010e0
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x28
call sub.cygwin1.dll___getreent
mov rcx, qword [rax + 0x18]
lea r9, str._______________Q_msgkey____M_shmkey____S_semkey__...
lea r8, str.usage:_ipcrm___q_msqid____m_shmid____s_semid_
lea rdx, str._s_n_s_n
call sub.cygwin1.dll_fprintf
mov ecx, 1
call sub.cygwin1.dll_exit
nop
nop word cs:[rax + rax]
Function at 0x180001ab0
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], rbx
push rsi
push rdi
push r15
sub rsp, 0x160
mov rsi, r8
mov rdi, rdx
mov r15, rcx
xor edx, edx
mov r8d, 0x100
lea rcx, [rsp + 0x60]
call fcn.1800012b0
mov rax, qword [rdi]
lea rdx, [r15 - 0x30]
xorps xmm0, xmm0
lea rcx, [rsp + 0x40]
add rdx, rax
mov r8d, 0x20
movups xmmword [rsp + 0x40], xmm0
lea rbx, [rax - 0x10]
movups xmmword [rsp + 0x50], xmm0
movups xmmword [rsp + 0x20], xmm0
call fcn.180001280
mov r8d, 0x10
lea rdx, [rbx + r15]
lea rcx, [rsp + 0x20]
call fcn.180001280
add qword [rdi], 0xffffffffffffffd0
lea rdx, [rsp + 0x40]
mov r9d, 0xe
lea rcx, [rsp + 0x60]
lea r8d, [r9 - 6]
call fcn.1800016f0
mov r8d, 0x10
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x150]
call fcn.180001280
mov rbx, qword [rdi]
test bl, 0xf
je 0x180001b63
xor ebx, ebx
jmp 0x180001c82
mov qword [rsp + 0x188], r14
mov r14, rbx
shr r14, 4
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsi], rax
mov rbx, rax
test rax, rax
je 0x180001c78
mov rsi, r15
test r14, r14
je 0x180001c71
lea rdi, [rsp + 0x150]
mov qword [rsp + 0x180], rbp
sub rdi, rax
lea rbp, [rax + 0xf]
nop dword [rax + rax]
mov r8d, 0x10
lea rcx, [rsp + 0x30]
mov rdx, rsi
call fcn.180001280
mov r9, rsi
lea rcx, [rsp + 0x60]
mov r8, rbx
mov edx, 0xe
call fcn.1800012e0
lea rax, [rsp + 0x15f]
cmp rbx, rax
ja 0x180001c22
lea rax, [rsp + 0x150]
cmp rbp, rax
jb 0x180001c22
mov rax, rbx
mov edx, 0x10
nop word [rax + rax]
movzx ecx, byte [rdi + rax]
xor byte [rax], cl
lea rax, [rax + 1]
sub rdx, 1
jne 0x180001c10
jmp 0x180001c37
movdqu xmm0, xmmword [rbx]
movdqu xmm1, xmmword [rsp + 0x150]
pxor xmm1, xmm0
movdqu xmmword [rbx], xmm1
mov r8d, 0x10
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x150]
call fcn.180001280
add rbx, 0x10
add rbp, 0x10
sub rdi, 0x10
add rsi, 0x10
sub r14, 1
jne 0x180001bc0
mov rbp, qword [rsp + 0x180]
mov ebx, 1
jmp 0x180001c7a
xor ebx, ebx
mov r14, qword [rsp + 0x188]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r15
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, ebx
mov rbx, qword [rsp + 0x190]
add rsp, 0x160
pop r15
pop rdi
pop rsi
ret

Function at 0x180002ac0
Capabilities:
Encode data using xor

Disassembly:
mov r8, rcx
mov eax, 0xffffffff
movzx ecx, byte [rcx]
test cl, cl
je 0x180002b6c
movsx edx, cl
lea r8, [r8 + 1]
xor eax, edx
mov ecx, eax
shr eax, 1
and ecx, 1
neg ecx
and ecx, 0xefc98457
xor ecx, eax
mov eax, ecx
shr ecx, 1
and eax, 1
neg eax
and eax, 0xefc98457
xor eax, ecx
mov ecx, eax
shr eax, 1
and ecx, 1
neg ecx
and ecx, 0xefc98457
xor ecx, eax
mov eax, ecx
shr ecx, 1
and eax, 1
neg eax
and eax, 0xefc98457
xor eax, ecx
mov ecx, eax
shr eax, 1
and ecx, 1
neg ecx
and ecx, 0xefc98457
xor ecx, eax
mov eax, ecx
shr ecx, 1
and eax, 1
neg eax
and eax, 0xefc98457
xor eax, ecx
mov ecx, eax
shr eax, 1
and ecx, 1
neg ecx
and ecx, 0xefc98457
xor ecx, eax
mov eax, ecx
shr ecx, 1
and eax, 1
neg eax
and eax, 0xefc98457
xor eax, ecx
movzx ecx, byte [r8]
test cl, cl
jne 0x180002ad3
not eax
ret
Function at 0x180002b70
Capabilities:
Access peb ldr_data

Disassembly:
mov qword [rsp + 0x18], rbx
push rsi
sub rsp, 0x130
mov rax, qword gs:[0x60]
mov esi, ecx
mov rbx, qword [rax + 0x18]
mov rbx, qword [rbx + 0x20]
test ecx, ecx
jne 0x180002ba9
mov rax, qword [rbx + 0x20]
mov rbx, qword [rsp + 0x150]
add rsp, 0x130
pop rsi
ret
mov qword [rsp + 0x140], rbp
mov qword [rsp + 0x148], rdi
test rbx, rbx
je 0x180002c6d
mov ebp, 0x104
nop word [rax + rax]
mov rdi, qword [rbx + 0x50]
test rdi, rdi
je 0x180002c61
cmp word [rbx + 0x48], bp
jae 0x180002c61
mov r8, rbp
lea rcx, [rsp + 0x20]
xor edx, edx
call fcn.1800012b0
xor r9d, r9d
cmp word [rdi], r9w
je 0x180002c41
xor r10d, r10d
mov r11, rdi
xor eax, eax
nop dword [rax]
nop word [rax + rax]
movzx r8d, byte [rax + r11]
lea eax, [r8 + 0x20]
movzx ecx, al
lea edx, [r8 - 0x41]
cmp dl, 0x19
cmova ecx, r8d
inc r9d
mov byte [rsp + r10 + 0x20], cl
mov rdi, qword [rbx + 0x50]
mov r10d, r9d
lea rax, [r9 + r9]
cmp word [rax + rdi], 0
jne 0x180002c10
mov rcx, rdi
mov byte [rsp + r9 + 0x20], 0
call fcn.180002ac0
cmp eax, esi
je 0x180002c90
lea rcx, [rsp + 0x20]
call fcn.180002ac0
cmp eax, esi
je 0x180002c90
mov rbx, qword [rbx]
test rbx, rbx
jne 0x180002bd0
xor eax, eax
mov rbp, qword [rsp + 0x140]
mov rdi, qword [rsp + 0x148]
mov rbx, qword [rsp + 0x150]
add rsp, 0x130
pop rsi
ret
mov rax, qword [rbx + 0x20]
jmp 0x180002c6f
Function at 0x180002ca0
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x20], rbx
mov dword [rsp + 0x10], edx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x240
mov rbp, rcx
test rcx, rcx
je 0x180002d64
test edx, edx
je 0x180002d64
movsxd rax, dword [rcx + 0x3c]
cmp dword [rax + rcx], 0x4550
jne 0x180002d64
mov r13d, dword [rax + rcx + 0x88]
xor r15d, r15d
mov eax, dword [rax + rcx + 0x8c]
add r13, rcx
mov dword [rsp + 0x280], eax
mov ebx, r15d
mov edi, dword [r13 + 0x20]
mov esi, dword [r13 + 0x24]
add rdi, rcx
mov ecx, dword [r13 + 0x1c]
add rsi, rbp
mov r12d, dword [r13 + 0x14]
add rcx, rbp
mov qword [rsp + 0x290], rcx
test r12d, r12d
je 0x180002d64
nop word [rax + rax]
movzx eax, word [rsi]
mov r14d, dword [rcx + rax*4]
mov ecx, dword [rdi]
add r14, rbp
add rcx, rbp
call fcn.180002ac0
cmp eax, dword [rsp + 0x288]
je 0x180002d81
mov rcx, qword [rsp + 0x290]
inc ebx
add rsi, 2
add rdi, 4
cmp ebx, r12d
jb 0x180002d30
xor eax, eax
mov rbx, qword [rsp + 0x298]
add rsp, 0x240
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
cmp r14, r13
jb 0x180002f29
mov eax, dword [rsp + 0x280]
add rax, r13
cmp r14, rax
jae 0x180002f29
mov ebp, 0x104
lea rcx, [rsp + 0x20]
mov r8d, ebp
xor edx, edx
call fcn.1800012b0
mov rbx, 0xffffffffffffffff
mov edi, r15d
mov r8, rbx
nop
inc r8
cmp byte [r14 + r8], dil
jne 0x180002dc0
mov rdx, r14
lea rcx, [rsp + 0x20]
call fcn.180001280
mov ecx, r15d
lea rax, [rsp + 0x20]
nop
inc rbx
cmp byte [rax + rbx], cl
jne 0x180002de0
test rbx, rbx
je 0x180002e10
lea rdx, [rsp + 0x20]
cmp byte [rdx], 0x2e
je 0x180002e06
inc ecx
inc rdx
movsxd rax, ecx
cmp rax, rbx
jb 0x180002df2
jmp 0x180002e10
movsxd rax, ecx
mov edi, ecx
mov byte [rsp + rax + 0x20], r15b
mov eax, edi
lea rsi, [rsp + 0x21]
add rsi, rax
mov rax, qword gs:[0x60]
mov rcx, qword [rax + 0x18]
mov rbx, qword [rcx + 0x20]
test rbx, rbx
je 0x180002ef4
nop dword [rax]
nop dword [rax + rax]
mov rdi, qword [rbx + 0x50]
test rdi, rdi
je 0x180002ee2
cmp word [rbx + 0x48], bp
jae 0x180002ee2
mov r8, rbp
lea rcx, [rsp + 0x130]
xor edx, edx
call fcn.1800012b0
mov r9d, r15d
cmp word [rdi], r9w
je 0x180002eb4
mov r11, rdi
mov r10, r15
mov rax, r15
nop dword [rax + rax]
movzx r8d, byte [rax + r11]
lea eax, [r8 + 0x20]
movzx ecx, al
lea edx, [r8 - 0x41]
cmp dl, 0x19
cmova ecx, r8d
inc r9d
mov byte [rsp + r10 + 0x130], cl
mov rdi, qword [rbx + 0x50]
mov r10d, r9d
lea rax, [r9 + r9]
cmp word [rax + rdi], r15w
jne 0x180002e80
mov eax, r9d
mov rcx, rdi
mov byte [rsp + rax + 0x130], r15b
call fcn.180002ac0
cmp eax, 0x60372cf9
je 0x180002ef0
lea rcx, [rsp + 0x130]
call fcn.180002ac0
cmp eax, 0x60372cf9
je 0x180002ef0
mov rbx, qword [rbx]
test rbx, rbx
jne 0x180002e40
jmp 0x180002ef4
mov r15, qword [rbx + 0x20]
mov edx, 0x29f53412
mov rcx, r15
call fcn.180002ca0
mov rdi, rax
test rax, rax
je 0x180002f29
mov rcx, rsi
call fcn.180002ac0
lea rcx, [rsp + 0x20]
mov ebx, eax
call rdi
mov rcx, rax
mov edx, ebx
call fcn.180002ca0
jmp 0x180002d66
mov rax, r14
jmp 0x180002d66
Function at 0x140001ea0
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 0x140001ec8
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 0x140001eee
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x140001ef0
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x140001f49
test ecx, ecx
jle 0x140001f29
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 0x140001f49
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x140001f49
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 0x140001f70
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 0x140001f92
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je 0x140001fa8
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 0x140001fc4
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140001fc6
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140002002
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 0x14000209e
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x14000203d
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 0x14000207e
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 0x14000209e
cmp rbx, rax
ja 0x140002050
test rbx, rbx
je 0x14000209e
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 0x140002500
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x140008040]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x14000252d
xor eax, eax
jmp 0x140002699
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140002567
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140002567
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 0x140002699
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x14000268c
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x1400025aa
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 0x1400025d5
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 0x140002691
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 0x140002644
sub eax, 1
je 0x140002644
cmp eax, 2
jne 0x14000268c
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 0x140002691
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140002672
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 0x14000268c
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x140002691
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.1400034f0
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x140002950
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x140008040]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140002a23
cmp byte [rcx + 0x71], 0
je 0x140002a23
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x140002a1f
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 0x1400029e4
sub eax, 1
je 0x1400029e8
cmp eax, 2
jne 0x140002a1f
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400034f0
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140002a16
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 0x140002a1f
cmp byte [rbx + 0x71], 0
sete al
jmp 0x1400029cc
xor al, al
jmp 0x1400029cc
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400034f0
add rsp, 0x60
pop rbx
ret

Function at 0x140003e70
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140003eba
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140003eba
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140003eba
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140003eba
cmp dword [rcx + 0x84], 0xe
jbe 0x140003eba
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140003ebc
xor al, al
add rsp, 0x28
ret