joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4589c0
Capabilities:
Encrypt data using aes via x86 extensions

Disassembly:
mov rax, qword [rax]
movabs rcx, 0xe7037ed1a0b428db
xor rcx, rax
xor rax, rbx
xor rax, qword [0x0052c160]
movabs rdx, 0xa0761d6478bd642f
xor rdx, rax
mov rax, rcx
mul rdx
xor rax, rdx
mov rcx, rax
movabs rax, 0x1d8e4e27c47d1247
mul rcx
nop
nop
xor rax, rdx
ret
cmp byte [0x0052beed], 0
je 0x4589f6
movq xmm0, rbx
pinsrq xmm0, qword [rax], 1
aesenc xmm0, xmmword [0x0052c4a0]
aesenc xmm0, xmmword [0x0052c4b0]
aesenc xmm0, xmmword [0x0052c4c0]
movq rax, xmm0
ret
jmp 0x408640

Function at 0x45a3a0
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x30
mov rcx, 0xfffffffffffffff4
mov qword [rsp], rcx
mov rax, qword [sym.imp.kernel32.dll_GetStdHandle]
call rax
mov rcx, rax
mov qword [rsp], rcx
lea rdx, [0x0052c420]
mov qword [rsp + 8], rdx
lea r8d, [0x0052bf04]
mov qword [rsp + 0x10], r8
lea r9, [rsp + 0x28]
mov qword [r9], 0
mov qword [rsp + 0x18], r9
mov qword [rsp + 0x20], 0
mov rax, qword [sym.imp.kernel32.dll_WriteFile]
call rax
call fcn.004588a0
add rsp, 0x30
ret

Function at 0x45a8e0
Capabilities:
Allocate thread local storage

Disassembly:
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 0x45a90c
call fcn.004588a0
shl rcx, 3
add rcx, 0x1480
mov qword [0x0052c0c0], rcx
ret
Function at 0x14001d55c
Capabilities:
Get file size
Read file on windows

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x18], rbp
mov qword [r11 + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
xor r15d, r15d
mov ebp, r8d
mov rax, rdx
mov r12, rcx
mov ebx, r15d
test rdx, rdx
je 0x14001d749
cmp word [rdx], r15w
je 0x14001d749
mov qword [r11 - 0x38], r15
lea r13d, [r15 + 1]
xor r9d, r9d
mov edx, 0x80000000
mov rcx, rax
mov r8d, r13d
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x14001d744
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
movsxd rsi, eax
test eax, eax
jle 0x14001d73b
mov ecx, ebp
call fcn.14001e3d0
mov rdi, rax
test rax, rax
je 0x14001d73b
mov rcx, r12
lea edx, [r15 + 2]
cmp ebp, 0xffffffff
je 0x14001d60a
mov edx, ebp
call fcn.14001e5d4
mov rbx, rax
test rax, rax
je 0x14001d733
mov qword [rax + 0x40], rdi
mov qword [rbx + 0x60], r15
mov dword [rbx + 0x68], r15d
mov dword [rbx + 0x20], r15d
cmp r12, 0xffffffffffffffff
lea r8, [rsi + 0x10]
cmove r12, rax
xor edx, edx
mov qword [rax + 0x48], r12
mov rax, qword [rax + 8]
mov qword [rbx + 0x58], rax
mov rcx, qword [0x14004fb48]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbx + 0x38], rax
test rax, rax
je 0x14001d674
lea ecx, [rsi + 0x10]
mov dword [rax + 8], ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], r15
mov rax, qword [rbx + 0x38]
add rax, 0x10
mov qword [rbx + 0x70], rax
cmp ebp, 0xffffffff
je 0x14001d67d
mov dword [rbx + 0x50], r13d
mov rdx, rbx
mov rcx, rdi
call fcn.140026d10
mov r12d, r15d
mov ebp, 0x4000
test esi, esi
jle 0x14001d72f
lea eax, [rbp + r12]
cmp eax, esi
jle 0x14001d6a6
mov ebp, esi
sub ebp, r12d
mov edx, ebp
mov rcx, rdi
call fcn.140026db0
mov r13, rax
test rax, rax
je 0x14001d71d
lea r9, [rsp + 0x78]
mov r8d, ebp
mov rdx, rax
mov rcx, r14
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [rsp + 0x78]
add r12d, edx
cmp dword [rbx + 0x20], r15d
jne 0x14001d6ed
mov rcx, r13
call fcn.14001e504
mov dword [rbx + 0x20], eax
mov edx, dword [rsp + 0x78]
mov rcx, rdi
cmp r12d, esi
jl 0x14001d6fd
mov r8d, 1
jmp 0x14001d700
xor r8d, r8d
call fcn.14002bc10
test eax, eax
je 0x14001d710
cmp r12d, esi
jl 0x14001d698
jmp 0x14001d72f
mov rcx, rdi
call fcn.140026f50
mov dword [rbx + 0x24], eax
jmp 0x14001d724
mov dword [rbx + 0x24], 1
mov rdx, rdi
mov rcx, rbx
call fcn.14001e4ac
mov qword [rbx + 0x40], r15
mov rcx, rdi
call fcn.14002a190
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, rbx
jmp 0x14001d74b
xor eax, eax
lea r11, [rsp + 0x40]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
or r8d, 0xffffffff
jmp 0x14001d55c
Function at 0x14001d76c
Capabilities:
Get file size
Read file on windows

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x18], rbp
mov qword [r11 + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
xor r15d, r15d
mov ebp, r8d
mov rax, rdx
mov r12, rcx
mov ebx, r15d
test rdx, rdx
je 0x14001d749
cmp word [rdx], r15w
je 0x14001d749
mov qword [r11 - 0x38], r15
lea r13d, [r15 + 1]
xor r9d, r9d
mov edx, 0x80000000
mov rcx, rax
mov r8d, r13d
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x14001d744
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
movsxd rsi, eax
test eax, eax
jle 0x14001d73b
mov ecx, ebp
call fcn.14001e3d0
mov rdi, rax
test rax, rax
je 0x14001d73b
mov rcx, r12
lea edx, [r15 + 2]
cmp ebp, 0xffffffff
je 0x14001d60a
mov edx, ebp
call fcn.14001e5d4
mov rbx, rax
test rax, rax
je 0x14001d733
mov qword [rax + 0x40], rdi
mov qword [rbx + 0x60], r15
mov dword [rbx + 0x68], r15d
mov dword [rbx + 0x20], r15d
cmp r12, 0xffffffffffffffff
lea r8, [rsi + 0x10]
cmove r12, rax
xor edx, edx
mov qword [rax + 0x48], r12
mov rax, qword [rax + 8]
mov qword [rbx + 0x58], rax
mov rcx, qword [0x14004fb48]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbx + 0x38], rax
test rax, rax
je 0x14001d674
lea ecx, [rsi + 0x10]
mov dword [rax + 8], ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], r15
mov rax, qword [rbx + 0x38]
add rax, 0x10
mov qword [rbx + 0x70], rax
cmp ebp, 0xffffffff
je 0x14001d67d
mov dword [rbx + 0x50], r13d
mov rdx, rbx
mov rcx, rdi
call fcn.140026d10
mov r12d, r15d
mov ebp, 0x4000
test esi, esi
jle 0x14001d72f
lea eax, [rbp + r12]
cmp eax, esi
jle 0x14001d6a6
mov ebp, esi
sub ebp, r12d
mov edx, ebp
mov rcx, rdi
call fcn.140026db0
mov r13, rax
test rax, rax
je 0x14001d71d
lea r9, [rsp + 0x78]
mov r8d, ebp
mov rdx, rax
mov rcx, r14
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [rsp + 0x78]
add r12d, edx
cmp dword [rbx + 0x20], r15d
jne 0x14001d6ed
mov rcx, r13
call fcn.14001e504
mov dword [rbx + 0x20], eax
mov edx, dword [rsp + 0x78]
mov rcx, rdi
cmp r12d, esi
jl 0x14001d6fd
mov r8d, 1
jmp 0x14001d700
xor r8d, r8d
call fcn.14002bc10
test eax, eax
je 0x14001d710
cmp r12d, esi
jl 0x14001d698
jmp 0x14001d72f
mov rcx, rdi
call fcn.140026f50
mov dword [rbx + 0x24], eax
jmp 0x14001d724
mov dword [rbx + 0x24], 1
mov rdx, rdi
mov rcx, rbx
call fcn.14001e4ac
mov qword [rbx + 0x40], r15
mov rcx, rdi
call fcn.14002a190
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, rbx
jmp 0x14001d74b
xor eax, eax
lea r11, [rsp + 0x40]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
or r8d, 0xffffffff
jmp 0x14001d55c
Function at 0x140022e48
Capabilities:
Enumerate gui resources

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x40
test ecx, ecx
je 0x140022ebf
movsxd rdx, ecx
lea rcx, [0x140022da4]
call qword [sym.imp.USER32.DLL_EnumWindows]
mov rbx, qword [0x14004feb8]
test rbx, rbx
je 0x140022f32
mov rdi, qword [rbx]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [rbx + 0x10], eax
jne 0x140022eb5
cmp byte [rbx + 0x20], 0
je 0x140022eb5
mov rcx, qword [rbx + 0x18]
xor r9d, r9d
mov dword [rsp + 0x30], 3
and dword [rsp + 0x28], 0
and dword [rsp + 0x20], 0
lea rdx, [r9 - 2]
xor r8d, r8d
call qword [sym.imp.USER32.DLL_SetWindowPos]
mov rbx, rdi
test rdi, rdi
jne 0x140022e7b
jmp 0x140022f32
mov rbx, qword [0x14004feb8]
test rbx, rbx
je 0x140022f32
mov rdi, qword [rbx]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [rbx + 0x10], eax
jne 0x140022f2a
cmp byte [rbx + 0x21], 0
je 0x140022eee
mov rcx, qword [rbx + 0x18]
mov edx, 1
call qword [sym.imp.USER32.DLL_EnableWindow]
cmp byte [rbx + 0x20], 0
je 0x140022f1a
mov rcx, qword [rbx + 0x18]
mov dword [rsp + 0x30], 3
and dword [rsp + 0x28], 0
and dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
or rdx, 0xffffffffffffffff
call qword [sym.imp.USER32.DLL_SetWindowPos]
lea rdx, [rbx + 0x10]
lea rcx, [0x14004feb8]
call fcn.1400261f4
mov rbx, rdi
test rdi, rdi
jne 0x140022ecb
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret

Function at 0x140022fc8
Capabilities:
Accept command line arguments

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
sub rsp, 0x20
mov rdi, rcx
mov rcx, qword [0x14004ffb0]
call fcn.140025f94
xor r12d, r12d
or esi, 0xffffffff
mov rbp, rax
mov ebx, r12d
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
movzx edx, word [rax]
test dx, dx
je 0x1400230a8
mov rcx, qword [rsp + 0x40]
cmp dx, 0x20
jne 0x14002301c
add rax, 2
cmp word [rax], 0x20
je 0x140023012
movzx edx, word [rax]
mov r8d, 1
cmp dx, 0x22
jne 0x140023060
add rax, 2
mov rbx, rax
movzx ecx, word [rax]
test cx, cx
je 0x14002305b
cmp cx, 0x22
je 0x14002304c
add rax, 2
movzx ecx, word [rax]
test cx, cx
jne 0x14002303a
cmp word [rax], r12w
je 0x14002305b
mov rcx, rax
add rax, 2
jmp 0x140023088
mov rcx, rax
jmp 0x140023088
test dx, dx
je 0x140023085
mov rbx, rax
cmp dx, 0x20
je 0x14002307a
add rax, 2
movzx edx, word [rax]
test dx, dx
jne 0x140023068
mov rcx, rax
cmp word [rax], r12w
je 0x140023088
jmp 0x140023055
mov r8d, r12d
cmp dword [rbp], esi
jne 0x140023092
test rdi, rdi
jne 0x1400230b2
test r8d, r8d
je 0x140023099
inc esi
movzx edx, word [rax]
mov rbx, r12
test dx, dx
jne 0x14002300c
test rdi, rdi
jne 0x1400230c7
movsxd rax, esi
jmp 0x1400230ca
test rbx, rbx
je 0x1400230c7
sub rcx, rbx
mov rax, rbx
sar rcx, 1
mov dword [rdi], ecx
inc dword [rbp]
jmp 0x1400230ca
mov dword [rdi], r12d
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
add rsp, 0x20
pop r12
pop rdi
pop rsi
ret
Function at 0x1400243a0
Capabilities:
Create directory

Disassembly:
push rbx
sub rsp, 0x230
xor ebx, ebx
test rcx, rcx
je 0x140024413
mov rdx, rcx
lea rcx, [rsp + 0x20]
mov r8d, 0x104
call sub.msvcrt.dll_wcsncpy
lea rcx, [rsp + 0x20]
mov word [rsp + 0x228], bx
call sub.msvcrt.dll_wcslen
lea rcx, [rsp + rax*2 + 0x20]
jmp 0x1400243f5
cmp word [rcx - 2], 0x20
je 0x1400243f1
cmp word [rcx - 2], 0x5c
je 0x1400243f1
cmp word [rcx - 2], 0x2f
jne 0x1400243ff
add rcx, 0xfffffffffffffffe
lea rax, [rsp + 0x20]
cmp rcx, rax
ja 0x1400243dc
mov word [rcx], bx
lea rcx, [rsp + 0x20]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cdqe
jmp 0x140024415
xor eax, eax
add rsp, 0x230
pop rbx
ret

Function at 0x14002452c
Capabilities:
Copy file

Disassembly:
sub rsp, 0x28
test rcx, rcx
je 0x140024547
test rdx, rdx
je 0x140024547
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CopyFileW]
cdqe
jmp 0x140024549
xor eax, eax
add rsp, 0x28
ret

Function at 0x1400246c0
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x30
xor eax, eax
mov rbx, rcx
mov dword [rsp + 0x40], eax
cmp dword [rcx + 0x1c], eax
jne 0x140024706
mov r8d, dword [rcx + 0x10]
mov rdx, qword [rcx + 8]
lea r9, [rsp + 0x40]
sub r8d, dword [rcx + 0x14]
mov rcx, qword [rcx]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r11d, dword [rbx + 0x10]
movsxd rax, dword [rsp + 0x40]
mov dword [rbx + 0x14], r11d
add rsp, 0x30
pop rbx
ret
cdqe
add rsp, 0x30
pop rbx
ret

Function at 0x140024e20
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov rdx, rcx
mov rcx, qword [0x140050000]
xor ebx, ebx
mov dword [rsp + 0x50], ebx
call fcn.140025e34
mov rdi, rax
test rax, rax
je 0x140024ec4
cmp qword [rax + 8], rbx
je 0x140024e87
lea r8d, [rbx + 1]
lea rdx, [rsp + 0x50]
mov rcx, rax
call fcn.140025110
test rax, rax
je 0x140024e74
inc dword [rdi + 0x14]
movsxd rax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
mov ebx, 1
movsxd rax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
mov rcx, qword [rax]
lea r9, [rsp + 0x58]
lea rdx, [rsp + 0x48]
mov r8d, 1
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140024ed6
cmp dword [rsp + 0x58], ebx
je 0x140024ed6
mov rcx, qword [rdi]
mov r9d, 1
xor r8d, r8d
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, dword [rsp + 0x50]
movsxd rax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
or ebx, 0xffffffff
movsxd rax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
Function at 0x140024ff0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
mov edi, r8d
mov rsi, rdx
mov dword [rsp + 0x48], 0
test rdx, rdx
je 0x1400250fb
cmp word [rdx], 0
je 0x1400250fb
mov rdx, rcx
mov rcx, qword [0x140050000]
mov qword [rsp + 0x40], rbx
call fcn.140025e34
mov rbx, rax
test rax, rax
je 0x1400250f6
mov rdx, rsi
cmp edi, 0x19
jne 0x140025091
or rcx, 0xffffffffffffffff
cmp qword [rax + 8], 0
mov rdi, rsi
je 0x14002506f
xor eax, eax
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx + rcx - 2]
mov rcx, rbx
call fcn.140025620
mov dword [rsp + 0x48], eax
jmp 0x1400250f6
xor eax, eax
lea r9, [rsp + 0x48]
repne scasw ax, word [rdi]
mov qword [rsp + 0x20], rax
not rcx
lea r8d, [rcx + rcx - 2]
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x1400250f6
xor ecx, ecx
mov eax, 0xfde9
cmp edi, 2
lea r8, [rsp + 0x58]
cmove ecx, eax
call fcn.140025720
mov rdi, rax
test rax, rax
je 0x1400250f6
cmp qword [rbx + 8], 0
mov r8d, dword [rsp + 0x58]
mov rdx, rax
je 0x1400250cd
mov rcx, rbx
call fcn.140025620
mov dword [rsp + 0x48], eax
jmp 0x1400250e4
mov rcx, qword [rbx]
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [0x14004fb48]
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbx, qword [rsp + 0x40]
movsxd rax, dword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret

Function at 0x140025110
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
sub rsp, 0x30
xor r12d, r12d
mov rdi, r8
mov rsi, rdx
mov rbx, rcx
cmp dword [rcx + 0x1c], r12d
jne 0x140025144
call fcn.1400246c0
mov dword [rbx + 0x1c], 1
mov dword [rbx + 0x14], r12d
movsxd rcx, dword [rbx + 0x14]
mov eax, dword [rbx + 0x18]
sub eax, ecx
mov rbp, rcx
cmp rcx, rdi
jl 0x1400251a9
movsxd rcx, eax
mov rax, rdi
add rcx, qword [rbx + 8]
dec rax
je 0x14002519f
dec rax
je 0x140025191
cmp rax, 2
je 0x140025185
mov rdx, rcx
mov r8, rdi
mov rcx, rsi
call sub.msvcrt.dll_memcpy
movsxd rax, edi
jmp 0x140025224
mov eax, dword [rcx]
mov dword [rsi], eax
movsxd rax, edi
jmp 0x140025224
movzx eax, word [rcx]
mov word [rsi], ax
movsxd rax, edi
jmp 0x140025224
movzx eax, byte [rcx]
mov byte [rsi], al
movsxd rax, edi
jmp 0x140025224
movsxd rdx, eax
mov r8, rcx
mov rcx, rsi
add rdx, qword [rbx + 8]
call sub.msvcrt.dll_memcpy
movsxd r8, dword [rbx + 0x10]
mov rcx, qword [rbx]
sub rdi, rbp
add rsi, rbp
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x50]
cmp rdi, r8
jl 0x1400251f1
mov r8d, edi
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x50]
mov dword [rbx + 0x14], r12d
add eax, ebp
cdqe
jmp 0x140025227
mov rdx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
movsxd r11, dword [rsp + 0x50]
mov rdx, qword [rbx + 8]
cmp rdi, r11
mov rcx, rsi
mov dword [rbx + 0x14], r11d
cmovg rdi, r11
mov dword [rbx + 0x18], r11d
mov r8, rdi
call sub.msvcrt.dll_memcpy
lea eax, [rbp + rdi]
cdqe
sub dword [rbx + 0x14], edi
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
add rsp, 0x30
pop r12
pop rdi
pop rsi
ret
Function at 0x140025240
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov rsi, rcx
mov rcx, qword [0x14004fb48]
mov rbp, r8
mov r13d, edx
mov r8d, 0x1000
xor edx, edx
mov r15, r9
xor edi, edi
mov r14d, 0x800
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r12, rax
test rax, rax
je 0x140025413
movzx edx, word [rsp + 0x30]
mov qword [rsp + 0x70], rbx
mov rbx, rax
nop dword [rax]
cmp rbp, 0xffffffffffffffff
je 0x1400252b2
test rbp, rbp
je 0x140025374
dec rbp
cmp qword [rsi + 8], 0
lea rdx, [rsp + 0x30]
je 0x1400252d2
mov r8d, 2
mov rcx, rsi
call fcn.140025110
mov dword [rsp + 0x34], eax
jmp 0x1400252ef
mov rcx, qword [rsi]
lea r9, [rsp + 0x34]
mov r8d, 2
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x34]
movzx edx, word [rsp + 0x30]
cmp eax, 2
jne 0x140025374
test dx, dx
je 0x14002530a
mov word [rbx], dx
movzx edx, word [rsp + 0x30]
add rbx, 2
mov rdi, rbx
lea eax, [r14 - 1]
sub rdi, r12
movsxd rcx, eax
sar rdi, 1
cmp rdi, rcx
jle 0x140025350
mov rcx, qword [0x14004fb48]
add r14d, 0x800
mov r8, r12
movsxd r9, r14d
mov edx, 8
add r9, r9
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
movzx edx, word [rsp + 0x30]
mov r12, rax
movsxd rax, edi
lea rbx, [r12 + rax*2]
test dx, dx
je 0x140025374
mov edi, 0
test r13d, r13d
jne 0x1400252a0
cmp dx, 0xd
je 0x140025379
cmp dx, 0xa
je 0x14002537f
jmp 0x1400252a0
test r13d, r13d
jne 0x140025383
cmp dx, 0xa
jne 0x14002539e
sub rbx, 2
xor edi, edi
mov rax, rbx
sub rax, r12
sar rax, 1
mov qword [r15], rax
mov word [rbx], di
mov rbx, qword [rsp + 0x70]
mov rax, r12
jmp 0x140025416
cmp dx, 0xd
jne 0x140025383
sub rbx, 2
cmp qword [rsi + 8], 0
lea rdx, [rsp + 0x30]
je 0x1400253ca
mov r8d, 2
mov rcx, rsi
call fcn.140025110
xor edi, edi
mov dword [rsp + 0x34], eax
jmp 0x1400253e3
mov rcx, qword [rsi]
xor edi, edi
lea r9, [rsp + 0x34]
lea r8d, [rdi + 2]
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [rsp + 0x30], 0xa
je 0x140025385
cmp qword [rsi + 8], 0
je 0x1400253f8
add dword [rsi + 0x14], 2
jmp 0x140025385
mov rcx, qword [rsi]
mov r9d, 1
xor r8d, r8d
lea edx, [r9 - 3]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x140025385
mov rax, rdi
mov rbp, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x140025440
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov rdi, rcx
mov rcx, qword [0x14004fb48]
mov rsi, r8
mov r12d, edx
mov r13d, 0x1000
xor edx, edx
mov r8d, r13d
mov r14, r9
xor r15d, r15d
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x1400255f5
movzx r8d, byte [rsp + 0x30]
mov qword [rsp + 0x70], rbx
mov rbx, rax
cmp rsi, 0xffffffffffffffff
je 0x1400254aa
test rsi, rsi
je 0x140025567
dec rsi
lea rdx, [rsp + 0x30]
cmp qword [rdi + 8], r15
je 0x1400254c9
mov r8d, 1
mov rcx, rdi
call fcn.140025110
mov dword [rsp + 0x34], eax
jmp 0x1400254e6
mov rcx, qword [rdi]
lea r9, [rsp + 0x34]
mov r8d, 1
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x34]
movzx r8d, byte [rsp + 0x30]
cmp eax, 1
jne 0x140025567
test r8b, r8b
je 0x140025502
mov byte [rbx], r8b
movzx r8d, byte [rsp + 0x30]
inc rbx
lea eax, [r13 - 1]
mov rdx, rbx
movsxd rcx, eax
sub rdx, rbp
cmp rdx, rcx
jle 0x140025544
mov rcx, qword [0x14004fb48]
add r13d, 0x1000
mov r8, rbp
mov edx, 8
movsxd r9, r13d
sub ebx, ebp
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
movzx r8d, byte [rsp + 0x30]
movsxd rbx, ebx
mov rbp, rax
add rbx, rax
test r8b, r8b
je 0x140025567
test r12d, r12d
jne 0x140025498
cmp r8b, 0xd
je 0x14002556c
cmp r8b, 0xa
jne 0x140025498
dec rbx
jmp 0x1400255df
test r12d, r12d
jne 0x1400255df
cmp r8b, 0xa
jne 0x140025577
dec rbx
jmp 0x1400255df
cmp r8b, 0xd
jne 0x1400255df
dec rbx
lea rdx, [rsp + 0x30]
cmp qword [rdi + 8], r15
je 0x14002559f
mov r8d, 1
mov rcx, rdi
call fcn.140025110
mov dword [rsp + 0x34], eax
jmp 0x1400255b8
mov rcx, qword [rdi]
lea r9, [rsp + 0x34]
mov r8d, 1
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [rsp + 0x30], 0xa
je 0x1400255df
cmp qword [rdi + 8], r15
je 0x1400255ca
inc dword [rdi + 0x14]
jmp 0x1400255df
mov rcx, qword [rdi]
mov r9d, 1
xor r8d, r8d
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rax, rbx
sub rax, rbp
mov qword [r14], rax
mov byte [rbx], r15b
mov rbx, qword [rsp + 0x70]
mov rax, rbp
jmp 0x1400255f8
mov rax, r15
mov rbp, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x140025620
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
cmp dword [rcx + 0x1c], 1
movsxd rdi, r8d
mov rsi, rdx
mov rbx, rcx
mov dword [rsp + 0x50], 0
jne 0x14002566a
mov edx, dword [rcx + 0x14]
mov rcx, qword [rcx]
mov r9d, 1
neg edx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [rbx + 0x10]
mov dword [rbx + 0x1c], 0
mov dword [rbx + 0x14], eax
mov ecx, dword [rbx + 0x14]
cmp ecx, edi
jle 0x1400256a6
mov eax, dword [rbx + 0x10]
mov edx, edi
sub eax, ecx
movsxd rcx, eax
add rcx, qword [rbx + 8]
dec edx
je 0x14002569f
dec edx
je 0x140025697
cmp edx, 2
je 0x140025691
mov rdx, rsi
jmp 0x1400256f4
mov eax, dword [rsi]
mov dword [rcx], eax
jmp 0x1400256fc
movzx eax, word [rsi]
mov word [rcx], ax
jmp 0x1400256fc
movzx eax, byte [rsi]
mov byte [rcx], al
jmp 0x1400256fc
mov rcx, rbx
call fcn.1400246c0
mov r11d, dword [rbx + 0x10]
mov rdx, rsi
cmp edi, r11d
jl 0x1400256e9
mov rcx, qword [rbx]
lea r9, [rsp + 0x50]
mov r8d, edi
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
movsxd rax, dword [rsp + 0x50]
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
sub r11d, dword [rbx + 0x14]
movsxd rcx, r11d
add rcx, qword [rbx + 8]
mov r8, rdi
call sub.msvcrt.dll_memcpy
sub dword [rbx + 0x14], edi
mov rsi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x40]
mov rax, rdi
add rsp, 0x30
pop rdi
ret

Function at 0x140026254
Capabilities:
Set console window title

Disassembly:
push rbx
sub rsp, 0x20
cmp dword [0x14004c01a], 0
mov rbx, rcx
jne 0x14002626c
call qword [sym.imp.KERNEL32.dll_AllocConsole]
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ecx, 0xfffffff5
mov qword [0x140050010], rax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ecx, 0xfffffff4
mov qword [0x140050020], rax
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, qword [0x140050020]
lea rdx, [0x140050030]
mov qword [0x140050050], rax
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
lea rcx, [0x14002623c]
mov edx, 1
call qword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
test rbx, rbx
je 0x1400262d6
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleW]
lea rcx, [0x140050060]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [0x140050090]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, 1
add rsp, 0x20
pop rbx
ret
xor ecx, ecx
jmp 0x140026254