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

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

Function at 0x14000ad40
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x14000adaf
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14000adaf
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14000adaf
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14000adaf
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14000adaf
cmp dword [rcx + 0x84], 0xe
jbe 0x14000adaf
cmp dword [rcx + 0xf8], 0
je 0x14000adaf
mov ecx, ebx
call fcn.14000ae54
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.14000ac48
nop
cmp dword [rbp + 0x20], 0
jne 0x14000ae10
call fcn.1400101a4
cmp eax, 1
jne 0x14000ae00
xor dl, dl
jmp 0x14000ae0a
call fcn.140010170
test al, al
sete dl
cmp dword [rbp + 0x20], 0
je 0x14000ae1b
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.14000ae24
int3
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
jmp 0x14000ad40

Function at 0x14000af28
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x14000ad40
Function at 0x14000fc78
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x14000fcff
mov rsi, rbx
cmp word [rax], bp
je 0x14000fcbe
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x14000fca8
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14000fca4
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14000c5f0
mov rdi, rax
test rax, rax
je 0x14000fcec
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140017240
mov rbp, rdi
xor ecx, ecx
call fcn.14000b980
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140013ec8
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x140013ede
mov al, 1
jmp 0x140013f4a
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x140013eef
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x140013f48
mov ecx, dword [rcx + 0x18]
nop
call fcn.140010480
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140013f48
and qword [rsp + 0x38], 0
lea r8, [rsp + 0x38]
mov r9d, 1
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140013f48
and qword [rsp + 0x30], 0
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140013f48
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x140013f4a
xor al, al
add rsp, 0x20
pop rbx
ret

Function at 0x1400169d0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1400169f8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x1400169f8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x100084800
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get system information on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
sub rsp, 0x50
rdtsc
shl rdx, 0x20
or rax, rdx
cdqe
mov qword [0x100495210], rax
call qword [sym.imp.KERNEL32.dll_GetVersion]
lea rbp, [0x100000000]
xor ebx, ebx
and eax, 0x80000000
cmp dword [0x10047a0e8], ebx
mov dword [0x10047a52c], eax
jne 0x10008485e
lea rcx, [0x10047a090]
call fcn.100540000
cmp eax, ebx
jl 0x100084a4f
mov dword [0x10047a0e8], 1
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov r8d, 0x80000000
movsxd rdx, dword [0x10000003c]
lea rcx, [0x100000000]
mov edx, dword [rdx + rbp + 0x50]
mov rdi, qword [rsp + 0x28]
add rdx, rcx
lea rax, [rdi + r8]
cmp rdx, rax
jb 0x100084899
lea rdi, [rdx - 0x80000000]
lea rdx, [rdi + 0xffff]
and rdx, 0xffffffffffff0000
mov rdi, qword [rsp + 0x30]
lea rax, [rdi - 0x80000000]
cmp rcx, rax
mov qword [0x100493ee0], rdx
jbe 0x1000848c8
mov qword [0x10047a028], rdi
jmp 0x1000848d2
add rcx, r8
mov qword [0x10047a028], rcx
mov word [0x10047a028], bx
mov rax, qword [0x10047a028]
sub rax, rdx
shr rax, 0x10
mov qword [0x10047b438], rax
mov eax, ebx
cmp eax, ebx
jl 0x100084a4f
mov rax, qword [0x10047a248]
cmp rax, 1
jae 0x10008493f
lea rax, [rax + rax*4]
lea rcx, [rbp + rax*8 + 0x47a3e8]
call fcn.100401ebc
mov edx, eax
cmp eax, ebx
jl 0x100084938
mov rax, qword [0x10047a248]
add rax, 1
mov qword [0x10047a248], rax
cmp rax, 1
jb 0x100084905
cmp edx, ebx
jge 0x10008493f
mov eax, edx
jmp 0x100084a4f
mov eax, dword [0x10005e244]
cmp eax, ebx
je 0x1000849da
lea r9, [rsp + 0x78]
mov edx, dword [0x1002f3aa4]
lea rsi, section..data
mov eax, dword [0x10005e244]
mov r8d, 0x40
imul edx, eax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp eax, ebx
jne 0x10008499b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x54f
cmp eax, ebx
cmove eax, ecx
movzx ecx, ax
or ecx, 0x80070000
cmp eax, ebx
cmovle ecx, eax
jmp 0x1000849dc
mov r8, rbx
mov eax, dword [0x10005e244]
cmp eax, ebx
jbe 0x1000849da
mov edi, dword [0x1002f3aa4]
mov ecx, dword [0x1002f3aa4]
mov dword [rbp + r8*4 + 0x478cb0], 0x3bd7
xor eax, eax
imul rdi, r8
add rdi, rsi
add r8, 1
rep stosb byte [rdi], al
mov eax, dword [0x10005e244]
cmp r8, rax
jb 0x1000849a8
mov ecx, ebx
cmp ecx, ebx
jge 0x1000849e4
mov eax, ecx
jmp 0x100084a4f
mov ecx, dword [0x100494f30]
cmp ecx, ebx
je 0x100084a36
mov edx, dword [0x100494f28]
lea rax, [rdx + rbp + 0x494f58]
lea rdi, [0x100494f58]
mov qword [0x100494f38], rdi
mov qword [0x100494f40], rax
mov eax, dword [0x100494f2c]
add rdx, rax
lea rax, [rdx + rbp + 0x494f58]
mov qword [0x100494f48], rax
add rcx, rdx
add rcx, rdi
mov qword [0x100494f50], rcx
lea rcx, [rsp + 0x70]
mov dword [rsp + 0x70], ebx
mov eax, 0xdbb6bf40
cmp dword [rsp + 0x70], ebx
cmovl ebx, dword [rsp + 0x70]
mov eax, ebx
mov rbx, qword [rsp + 0x80]
add rsp, 0x50
pop rdi
pop rsi
pop rbp
ret
Function at 0x402310
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
test rcx, rcx
mov rdi, rcx
mov rbp, rdx
je 0x402503
cmp qword [rcx + 8], 0
mov rbx, rcx
mov rsi, qword [rcx]
js 0x40236f
cmp rsi, 7
mov eax, 7
cmovl rsi, rax
lea rcx, [rsi + 0x11]
call fcn.0040fac0
lea rdx, [rdi + 0x10]
mov qword [rax], 0
lea rcx, [rax + 0x10]
mov rbx, rax
mov qword [rax + 8], rsi
mov rsi, qword [rdi]
mov qword [rax], rsi
lea r8, [rsi + 1]
call sub.msvcrt.dll_exit_29
test rsi, rsi
jle 0x4024f7
mov rdx, rbp
mov r8, rbp
mov r9, rbp
lea rax, [rsi - 1]
sar rdx, 8
sar r8, 0x10
sar r9, 0x18
cmp rax, 0xe
jbe 0x402507
movd xmm1, edx
movd xmm0, r8d
mov rcx, rsi
punpcklbw xmm1, xmm1
punpcklbw xmm0, xmm0
punpcklwd xmm1, xmm1
punpcklwd xmm0, xmm0
pshufd xmm2, xmm1, 0
and rcx, 0xfffffffffffffff0
pshufd xmm1, xmm0, 0
movd xmm0, ebp
pxor xmm1, xmm2
punpcklbw xmm0, xmm0
mov rax, rbx
punpcklwd xmm0, xmm0
add rcx, rbx
pshufd xmm2, xmm0, 0
movd xmm0, r9d
punpcklbw xmm0, xmm0
punpcklwd xmm0, xmm0
pshufd xmm0, xmm0, 0
pxor xmm0, xmm2
pxor xmm1, xmm0
nop word [rax + rax]
movdqu xmm0, xmmword [rax + 0x10]
add rax, 0x10
pxor xmm0, xmm1
movups xmmword [rax], xmm0
cmp rax, rcx
jne 0x402400
mov rax, rsi
and rax, 0xfffffffffffffff0
cmp rax, rsi
je 0x4024f7
lea rcx, [rax + 1]
xor edx, r8d
xor edx, ebp
xor edx, r9d
xor byte [rbx + rax + 0x10], dl
cmp rsi, rcx
jle 0x4024f7
xor byte [rbx + rcx + 0x10], dl
lea rcx, [rax + 2]
cmp rsi, rcx
jle 0x4024f7
xor byte [rbx + rcx + 0x10], dl
lea rcx, [rax + 3]
cmp rsi, rcx
jle 0x4024f7
xor byte [rbx + rcx + 0x10], dl
lea rcx, [rax + 4]
cmp rsi, rcx
jle 0x4024f7
xor byte [rbx + rcx + 0x10], dl
lea rcx, [rax + 5]
cmp rsi, rcx
jle 0x4024f7
xor byte [rbx + rcx + 0x10], dl
lea rcx, [rax + 6]
cmp rsi, rcx
jle 0x4024f7
xor byte [rbx + rcx + 0x10], dl
lea rcx, [rax + 7]
cmp rsi, rcx
jle 0x4024f7
xor byte [rbx + rcx + 0x10], dl
lea rcx, [rax + 8]
cmp rsi, rcx
jle 0x4024f7
xor byte [rbx + rcx + 0x10], dl
lea rcx, [rax + 9]
cmp rsi, rcx
jle 0x4024f7
xor byte [rbx + rcx + 0x10], dl
lea rcx, [rax + 0xa]
cmp rsi, rcx
jle 0x4024f7
xor byte [rbx + rcx + 0x10], dl
lea rcx, [rax + 0xb]
cmp rsi, rcx
jle 0x4024f7
xor byte [rbx + rcx + 0x10], dl
lea rcx, [rax + 0xc]
cmp rsi, rcx
jle 0x4024f7
xor byte [rbx + rcx + 0x10], dl
lea rcx, [rax + 0xd]
cmp rsi, rcx
jle 0x4024f7
xor byte [rbx + rcx + 0x10], dl
add rax, 0xe
cmp rsi, rax
jle 0x4024f7
xor byte [rbx + rax + 0x10], dl
mov rax, rbx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
xor ebx, ebx
jmp 0x4024f7
xor eax, eax
jmp 0x402425
Function at 0x402580
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
test rcx, rcx
mov rbp, rcx
mov rbx, rdx
je 0x402624
cmp qword [rcx + 8], 0
mov rdi, rcx
mov rsi, qword [rcx]
js 0x4025e1
mov r8d, 7
cmp rsi, 7
cmovl rsi, r8
lea rcx, [rsi + 0x11]
call fcn.0040fac0
lea rdx, [rbp + 0x10]
mov qword [rax], 0
lea rcx, [rax + 0x10]
mov rdi, rax
mov qword [rax + 8], rsi
mov rsi, qword [rbp]
mov qword [rax], rsi
lea r8, [rsi + 1]
call sub.msvcrt.dll_exit_29
lea r8, [rsi + rbx]
mov rdx, rdi
sub rdx, rbx
test rsi, rsi
jle 0x402618
mov rax, rbx
mov rcx, rbx
sar rax, 8
sar rcx, 0x10
xor eax, ebx
xor eax, ecx
mov rcx, rbx
sar rcx, 0x18
xor eax, ecx
xor byte [rdx + rbx + 0x10], al
add rbx, 1
cmp rbx, r8
jne 0x4025f0
mov rax, rdi
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
xor edi, edi
jmp 0x402618

Function at 0x402630
Capabilities:
Access peb ldr_data
Check for peb beingdebugged flag

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rdi, rcx
mov rcx, qword [0x0048be10]
mov ebx, edx
mov edx, 0x383fb667
lea rbp, [rdi + 2]
call fcn.00402580
mov edx, 0x3e46fbd5
mov rcx, rax
call fcn.00402310
movzx r9d, word [rdi]
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov r8, qword [rax + 0x20]
lea r12, [rax + 0x20]
nop dword [rax]
mov rax, qword [r8 + 0x50]
test r9w, r9w
movzx r10d, word [rax]
je 0x4026de
test r10w, r10w
je 0x4026e4
mov r13, rbp
mov edx, r9d
sub r13, rax
jmp 0x4026a6
cmp word [rax], 0
je 0x4026de
movzx ecx, word [rax]
lea esi, [rdx - 0x41]
lea r11d, [rdx + 0x20]
cmp si, 0x1a
cmovb edx, r11d
lea esi, [rcx - 0x41]
lea r11d, [rcx + 0x20]
cmp si, 0x1a
cmovb ecx, r11d
cmp dx, cx
jne 0x4026e4
mov rdx, rax
add rax, 2
movzx edx, word [r13 + rdx]
test dx, dx
jne 0x4026a0
cmp r10w, r9w
je 0x402760
mov r8, qword [r8]
cmp r12, r8
jne 0x402680
xor esi, esi
test ebx, ebx
je 0x402764
mov rcx, qword [0x0048be20]
lea rbx, [rsp + 0x30]
mov edx, 0x837dafd
call fcn.00402580
mov edx, 0x73d275d7
mov rcx, rax
call fcn.00402310
mov rax, qword [0x0048bc50]
mov rdx, rdi
mov rcx, rbx
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x28], 0
call qword [rax]
mov rax, qword [0x0048bc40]
xor edx, edx
xor ecx, ecx
lea r9, [rsp + 0x28]
mov r8, rbx
call qword [rax]
test eax, eax
jne 0x402764
mov rsi, qword [rsp + 0x28]
jmp 0x402764
mov rsi, qword [r8 + 0x20]
mov rax, rsi
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
Function at 0x413200
Capabilities:
Access peb ldr_data
Check for peb beingdebugged flag

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
mov edx, 0x383fb667
mov rbx, rcx
lea rcx, [0x0048a5c0]
call fcn.00402580
lea rdi, [rbx + 2]
mov edx, 0x3e46fbd5
mov rcx, rax
call fcn.00402310
movzx r9d, word [rbx]
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
mov r8, qword [rax + 0x20]
lea rbp, [rax + 0x20]
nop dword [rax + rax]
mov rax, qword [r8 + 0x50]
test r9w, r9w
movzx r10d, word [rax]
je 0x4132ad
test r10w, r10w
je 0x4132b3
mov r12, rdi
mov edx, r9d
sub r12, rax
jmp 0x413276
cmp word [rax], 0
je 0x4132ad
movzx ecx, word [rax]
lea esi, [rdx - 0x41]
lea r11d, [rdx + 0x20]
cmp si, 0x1a
cmovb edx, r11d
lea esi, [rcx - 0x41]
lea r11d, [rcx + 0x20]
cmp si, 0x1a
cmovb ecx, r11d
cmp dx, cx
jne 0x4132b3
mov rdx, rax
add rax, 2
movzx edx, word [r12 + rdx]
test dx, dx
jne 0x413270
cmp r10w, r9w
je 0x413330
mov r8, qword [r8]
cmp rbp, r8
jne 0x413250
lea rcx, [0x0048a560]
mov edx, 0x837dafd
call fcn.00402580
lea rsi, [rsp + 0x30]
mov edx, 0x73d275d7
mov rcx, rax
call fcn.00402310
mov rdx, rbx
mov rcx, rsi
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x28], 0
call qword [0x0048f668]
xor edx, edx
xor ecx, ecx
mov r8, rsi
lea r9, [rsp + 0x28]
call qword [0x0048f660]
mov edx, eax
xor eax, eax
test edx, edx
jne 0x413334
mov rax, qword [rsp + 0x28]
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [r8 + 0x20]
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x414a00
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x004a4b60]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004a4b40]
test rbx, rbx
je 0x414a54
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x414a4b
test rsi, rsi
je 0x414a4b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x414a30
lea rcx, [0x004a4b60]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x414d90
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x0048bf20]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x414dfd
mov rcx, r8
call fcn.00414c70
test eax, eax
je 0x414dfd
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x414dfd
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x414df4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x414dff
add rax, 0x28
cmp rax, r9
jne 0x414de0
xor eax, eax
add rsp, 0x28
ret
Function at 0x1400038d0
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 0x1400038f8
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 0x14000391e
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x140003920
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x140003979
test ecx, ecx
jle 0x140003959
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 0x140003979
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x140003979
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 0x1400039a0
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 0x1400039c2
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je 0x1400039d8
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 0x1400039f4
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x1400039f6
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140003a32
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 0x140003ace
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x140003a6d
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 0x140003aae
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 0x140003ace
cmp rbx, rax
ja 0x140003a80
test rbx, rbx
je 0x140003ace
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 0x140003f30
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x14000b040]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x140003f5d
xor eax, eax
jmp 0x1400040c9
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140003f97
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140003f97
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 0x1400040c9
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x1400040bc
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x140003fda
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 0x140004005
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 0x1400040c1
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 0x140004074
sub eax, 1
je 0x140004074
cmp eax, 2
jne 0x1400040bc
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 0x1400040c1
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x1400040a2
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 0x1400040bc
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x1400040c1
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.1400057f0
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x140004490
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x14000b040]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140004563
cmp byte [rcx + 0x71], 0
je 0x140004563
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x14000455f
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 0x140004524
sub eax, 1
je 0x140004528
cmp eax, 2
jne 0x14000455f
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400057f0
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140004556
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 0x14000455f
cmp byte [rbx + 0x71], 0
sete al
jmp 0x14000450c
xor al, al
jmp 0x14000450c
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400057f0
add rsp, 0x60
pop rbx
ret

Function at 0x140006538
Capabilities:
Parse pe header

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