joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14035d980
Capabilities:
Encode data using xor

Disassembly:
mov r8d, dword [rsp + 0x28]
mov r9d, r8d
not r9d
mov eax, r9d
and eax, 0x6a283c6b
mov r10d, r8d
xor r10d, 0x95d7c394
or r10d, eax
not r10d
or r10d, eax
add r10d, dword [0x140587b88]
cmp ecx, r10d
jne 0x14035da84
test edx, edx
je 0x14035dabc
movzx eax, byte [0x140587513]
nop word cs:[rax + rax]
cmp al, 0x8f
je 0x14035da7c
movzx ecx, byte [0x140587b8c]
mov eax, r8d
xor al, 0x69
add al, cl
mov edx, r8d
xor dl, cl
xor dl, 0x8d
mov r10d, r8d
xor r10b, 0x72
not cl
and cl, r10b
or cl, dl
not cl
add cl, cl
add cl, dl
lock cmpxchg byte [0x140587513], cl
jne 0x14035d9d0
xor edx, edx
lea rax, [0x140587500]
lea rcx, [0x1404863d0]
mov r10d, r8d
xor r10d, 0x6a283c7c
and r10d, r9d
xor r8d, 0x95d7c383
and r9d, 0x6a283c7c
or r9d, r8d
not r9d
or r9d, r10d
movsxd r8, edx
movzx edx, byte [r8 + rcx]
mov r10d, edx
xor r10b, dl
not r10b
and r10b, byte [r8 + rax]
xor r10b, dl
mov byte [r8 + rax], r10b
lea edx, [r8 + r8]
sub edx, r8d
inc edx
mov r8d, dword [0x140587b88]
add r8d, r9d
cmp edx, r8d
jl 0x14035da40
mov al, 0x8f
xchg byte [0x140587513], al
lea rax, [0x140587500]
ret
test edx, edx
je 0x14035daec
movzx eax, byte [0x14058756f]
cmp al, 0xe2
je 0x14035dab4
mov cl, 0xc3
nop word cs:[rax + rax]
mov al, 0xd7
lock cmpxchg byte [0x14058756f], cl
je 0x14035db53
cmp al, 0xe2
jne 0x14035daa0
lea rax, [0x140587560]
ret
movzx eax, byte [0x1405874d5]
cmp al, 0xe4
je 0x14035dae4
mov cl, 0x9d
nop dword [rax]
mov al, 0xc9
lock cmpxchg byte [0x1405874d5], cl
je 0x14035dbc5
cmp al, 0xe4
jne 0x14035dad0
lea rax, [0x1405874c0]
ret
movzx eax, byte [0x140587523]
mov ecx, r8d
xor cl, 0xe8
add cl, byte [0x140587b8c]
cmp al, cl
je 0x14035db4b
mov cl, 0xc
nop word cs:[rax + rax]
mov al, 0x4e
lock cmpxchg byte [0x140587523], cl
je 0x14035dbf8
movzx edx, byte [0x140587b8c]
mov r9d, r8d
xor r9b, dl
xor r9b, 0xe8
mov r10d, r8d
xor r10b, 0x17
not dl
and dl, r10b
or dl, r9b
not dl
add dl, dl
add dl, r9b
cmp al, dl
jne 0x14035db10
lea rax, [0x140587520]
ret
xor edx, edx
lea rax, [0x140587560]
lea rcx, [0x140486430]
xor r8d, 0x6a283c78
nop word [rax + rax]
movsxd rdx, edx
movzx r9d, byte [rdx + rcx]
mov r10d, r9d
xor r10b, r9b
not r10b
and r10b, byte [rdx + rax]
xor r10b, r9b
mov byte [rdx + rax], r10b
add edx, 0xe1756e0c
mov r9d, edx
xor r9d, 0x1e8a91f5
and edx, 0x1e8a91f5
lea edx, [r9 + rdx*2]
mov r9d, dword [0x140587b88]
add r9d, r8d
cmp edx, r9d
jl 0x14035db70
mov al, 0xe2
xchg byte [0x14058756f], al
lea rax, [0x140587560]
ret
xor eax, eax
lea rcx, [0x1405874c0]
lea rdx, [0x140486390]
nop word cs:[rax + rax]
movzx r8d, byte [rax + rdx]
add byte [rax + rcx], r8b
lea r8d, [rax + 1]
cmp r8d, 0x14
jg 0x14035dc28
inc rax
jmp 0x14035dbe0
xor eax, eax
lea rcx, [0x140587520]
lea rdx, [0x1404863f0]
nop dword [rax + rax]
movzx r8d, byte [rax + rdx]
add byte [rax + rcx], r8b
lea r8d, [rax + 1]
cmp r8d, 2
jg 0x14035dc38
inc rax
jmp 0x14035dc10
mov al, 0xe4
xchg byte [0x1405874d5], al
lea rax, [0x1405874c0]
ret
mov al, 0xc9
xchg byte [0x140587523], al
lea rax, [0x140587520]
ret
Function at 0x1403819f0
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push rbp
sub rsp, 0x40
lea rbp, [rsp + 0x40]
mov qword [rbp - 8], 0xfffffffffffffffe
mov qword [rbp - 0x10], rcx
mov qword [rbp - 0x18], rdx
call fcn.1403985c0
test rax, rax
sete cl
or cl, byte [0x1405a980a]
movzx edx, byte [0x1405a9ea0]
mov r8d, edx
and r8b, cl
test r8b, 1
jne 0x140381a4e
mov r8d, edx
xor r8b, 1
and r8b, cl
test r8b, 1
jne 0x140381a4e
xor cl, 1
and dl, cl
test dl, 1
jne 0x140381a4e
add rsp, 0x40
pop rbp
ret
mov ecx, 0x7f
call fcn.14018e8e0
mov rcx, qword [rbp - 0x10]
mov rdx, qword [rbp - 0x18]
mov r8d, 0xc649bf83
mov r9d, 0xb8dcf098
add rsp, 0x40
pop rbp
jmp fcn.140382160
Function at 0x140396880
Capabilities:
Encode data using xor

Disassembly:
push rsi
push rdi
push rbp
push rbx
xor eax, eax
test rcx, rcx
je 0x1403969f9
test rdx, rdx
je 0x1403969f9
mov al, 1
cmp rcx, rdx
je 0x1403969f9
movabs r9, 0xef0d2a040d9994a9
xor r8d, r8d
xor r10d, r10d
nop word cs:[rax + rax]
mov r11, r8
sub r11, r9
movzx ebx, byte [0x14058fd58]
add bl, 0xb3
xor esi, esi
cmp byte [rcx + r8], 0
setne sil
movzx r8d, r10b
movzx r10d, bl
cmovne r10d, r8d
add r11, r9
mov r8, r11
add r8, rsi
test r10b, 1
je 0x1403968c0
xor r9d, r9d
mov r10d, 1
xor r11d, r11d
nop word cs:[rax + rax]
xor esi, esi
cmp byte [rdx + r9], 0
setne sil
movzx r11d, r11b
cmove r11d, r10d
mov rdi, rsi
xor rdi, r9
and esi, r9d
lea r9, [rdi + rsi*2]
mov ebx, r11d
and bl, 1
movzx esi, byte [0x14058fd58]
add sil, 0xb2
cmp bl, sil
je 0x140396910
cmp r8, r9
jne 0x1403969f7
test r8, r8
je 0x1403969f9
xor r9d, r9d
xor r10d, r10d
jmp 0x140396993
movzx ebx, byte [0x14058fd58]
add bl, 0xb3
cmp sil, 0x2e
movzx r10d, r10b
movzx esi, bl
cmove r10d, esi
cmp r11b, 0x2e
cmove r10d, esi
mov r11d, dword [0x1405a9b30]
add r9d, r11d
inc r9d
cmp r8, r9
jbe 0x1403969f9
movzx r11d, byte [rcx + r9]
movzx esi, byte [rdx + r9]
cmp r11b, sil
je 0x140396960
test r10b, 1
jne 0x1403969f7
lea ebx, [r11 - 0x61]
movzx edi, byte [0x14058fd58]
lea ebp, [rdi + r11]
add bpl, 0x92
cmp bl, 0x1a
movzx ebx, bpl
movzx r11d, r11b
cmovb r11d, ebx
lea ebx, [rsi - 0x61]
mov ebp, edi
xor bpl, 0xcc
and dil, 0x4c
add dil, dil
add dil, bpl
lea ebp, [rsi - 0x20]
cmp bl, dil
movzx edi, sil
movzx esi, bpl
cmovae esi, edi
cmp r11b, sil
je 0x140396960
xor eax, eax
pop rbx
pop rbp
pop rdi
pop rsi
ret
Function at 0x1403a7880
Capabilities:
Encode data using xor

Disassembly:
push rsi
push rdi
sub rsp, 0x238
mov rax, qword [0x140598fd8]
xor rax, rsp
mov qword [rsp + 0x230], rax
movabs rdi, 0xa3d3020ee34b4bef
mov rax, qword [0x1405acaf0]
test rax, rax
je 0x1403a794d
movabs rax, 0x4a6fdd95ef42331
mov ecx, dword [0x1405acbc4]
cmp ecx, 0xe
jg 0x1403a78de
inc qword [0x14058f560]
mov rsi, qword [0x1405acaf0]
xor ecx, ecx
test cl, cl
je 0x1403a7931
mov rcx, qword [0x14058f560]
mov rdx, rcx
neg rdx
mov r8, rdx
sub r8, rcx
inc r8
mov r9, rdi
sub r9, rax
add r9, qword [0x140591330]
add r9, rax
imul r8, rdx
add r9, rcx
add r9, r8
shl r9, cl
shl r9, cl
mov rdx, r9
xor rdx, rcx
and r9, rcx
lea rcx, [rdx + r9*2]
mov qword [0x14058f560], rcx
mov rcx, qword [0x1405acaf0]
jmp 0x1403a78ca
mov eax, esi
not eax
and eax, 0x11223344
and rsi, 0xffffffffeeddccbb
or rsi, rax
test rsi, rsi
jne 0x1403a7a79
movaps xmm0, xmmword [0x140489140]
movaps xmmword [rsp + 0x30], xmm0
movabs rax, 0x1804242b697f3d33
mov qword [rsp + 0x40], rax
movzx eax, byte [0x140591328]
add al, 7
mov ecx, 0xffffdb99
add ecx, dword [0x140591054]
mov byte [rsp + 0x48], al
movsxd rax, ecx
add rax, qword [0x140591060]
lea rsi, [rsp + 0x30]
mov rcx, rsi
mov edx, 6
mov r8d, 0xed48e103
mov r9d, 0xf29cb72a
call qword [case.0x14013008b.0]
mov rax, qword [0x140591330]
mov rcx, rdi
xor rcx, rax
and rdi, rax
lea rax, [rcx + rdi*2]
mov qword [rsp + 0x28], rax
mov eax, dword [0x140591050]
sub eax, dword [0x140591338]
add eax, 0x9c92825a
cdqe
add rax, qword [0x140591068]
lea rdx, [rsp + 0x28]
mov rcx, rsi
mov r8d, 0xd6c05557
mov r9d, 0x5f397b2d
call qword [case.0x14013008b.0]
mov rsi, rax
xorps xmm0, xmm0
movaps xmmword [rsp + 0x30], xmm0
mov qword [rsp + 0x40], 0
test rax, rax
je 0x1403a7a59
mov rax, qword [0x1405acaf0]
test rax, rax
jne 0x1403a7a59
mov eax, dword [0x1405acbc4]
cmp eax, 0x1f
jg 0x1403a7a3e
mov qword [0x1405acaf0], rsi
xor qword [0x1405acaf0], 0x11223344
xor eax, eax
test al, al
je 0x1403a7a59
mov qword [0x1405acaf0], rsi
mov rax, qword [0x1405acaf0]
mov qword [0x1405acaf0], 0
jmp 0x1403a7a26
xor eax, eax
test al, al
nop dword [rax]
mov eax, dword [0x140591338]
mov ecx, eax
xor ecx, 0x636d593f
and eax, 0x636d593f
add eax, eax
add eax, ecx
jne 0x1403a7a60
xor eax, eax
test al, al
jne 0x1403a7a90
mov eax, dword [0x1405acbc0]
lea ecx, [rax - 1]
imul ecx, eax
test cl, 1
je 0x1403a7aa3
mov eax, dword [0x1405acbc0]
lea ecx, [rax - 1]
imul ecx, eax
test cl, 1
jne 0x1403a7a90
jmp 0x1403a7a7f
mov rcx, qword [rsp + 0x230]
xor rcx, rsp
call fcn.14041e230
mov rax, rsi
add rsp, 0x238
pop rdi
pop rsi
ret
Function at 0x140002db0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.140003cb0
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.140003cb0
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x140002e20
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1400080a4]
mov rbx, rcx
test esi, esi
jle 0x140002f50
mov rax, qword [0x1400080a8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140002e6b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140002ef5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140002e50
mov rcx, rbx
call fcn.140003870
mov rdi, rax
test rax, rax
je 0x140002f72
mov rax, qword [0x1400080a8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.1400039b0
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400080a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140002f57
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140002eee
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140002f00
add dword [0x1400080a4], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x1400080a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140002eee
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140002db0
nop dword [rax]
xor esi, esi
jmp 0x140002e78
mov rax, qword [0x1400080a8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140002db0
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140002db0
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x1400034e0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140008100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400080e0]
test rbx, rbx
je 0x14000353c
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x140003533
test rsi, rsi
je 0x140003533
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140003518
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x140003870
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1400059e0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140003890
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140003898
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140003890
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x1400038ed
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 0x1400038e4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140003890
add rax, 0x28
cmp rax, r9
jne 0x1400038d0
xor eax, eax
ret

Function at 0x1400038f0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400059e0]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x14000390f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140003918
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x14000390f
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x1400039b0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400059e0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x1400039cf
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x1400039d8
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x140003970
Capabilities:
Create directory
Move file

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x47]
sub rsp, 0x90
mov rax, qword [0x14000d010]
xor rax, rsp
mov qword [rbp + 0x3f], rax
mov rdi, rdx
mov rbx, rcx
xor esi, esi
mov rcx, qword [rcx + 0x10]
movabs rax, 0x7fffffffffffffff
sub rax, rcx
cmp rax, 4
jb 0x140003b40
mov r9, rbx
cmp qword [rbx + 0x18], 0x10
jb 0x1400039c2
mov r9, qword [rbx]
mov qword [rsp + 0x30], 4
lea rax, str..zip
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea rcx, [rbp + 0x1f]
call fcn.1400058f0
nop
lea rdx, [rbp + 0x1f]
cmp qword [rbp + 0x37], 0x10
cmovae rdx, qword [rbp + 0x1f]
cmp qword [rbx + 0x18], 0x10
jb 0x1400039fe
mov rbx, qword [rbx]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
jne 0x140003a14
lea rdx, str.Failed_to_rename_File
jmp 0x140003a41
mov rcx, rdi
cmp qword [rdi + 0x18], 0x10
jb 0x140003a21
mov rcx, qword [rdi]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x140003aa4
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x140003aa4
lea rdx, str.Failed_to_Create_path
xorps xmm0, xmm0
movups xmmword [rbp - 9], xmm0
mov qword [rbp + 7], rsi
mov qword [rbp + 0xf], rsi
mov r8d, 0x15
lea rcx, [rbp - 9]
call fcn.140001a90
lea rcx, [rbp - 9]
call fcn.1400012d0
nop
mov rdx, qword [rbp + 0x37]
cmp rdx, 0x10
jb 0x140003aa0
inc rdx
mov rcx, qword [rbp + 0x1f]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003a9b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140003b15
call fcn.1400067cc
xor al, al
jmp 0x140003b21
lea rax, [rbp - 9]
xorps xmm0, xmm0
movups xmmword [rbp - 9], xmm0
mov qword [rbp + 7], rsi
mov qword [rbp + 0xf], rsi
mov r8d, 0x25
lea rdx, str.Renamed_Fluster_Binary_for_extraction
lea rcx, [rbp - 9]
call fcn.140001a90
lea rcx, [rbp - 9]
call fcn.1400011d0
mov rdx, rdi
lea rcx, [rbp + 0x1f]
call fcn.1400030b0
nop
mov rdx, qword [rbp + 0x37]
cmp rdx, 0x10
jb 0x140003b21
inc rdx
mov rcx, qword [rbp + 0x1f]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003b1c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140003b1c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400067cc
mov rcx, qword [rbp + 0x3f]
xor rcx, rsp
call fcn.140006650
mov rbx, qword [rsp + 0xc0]
add rsp, 0x90
pop rdi
pop rsi
pop rbp
ret
call fcn.1400011b0
int3
Function at 0x140003ee0
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 0x140003f08
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 0x140003f2e
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x140003f30
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x140003f89
test ecx, ecx
jle 0x140003f69
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 0x140003f89
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x140003f89
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 0x140003fb0
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 0x140003fd2
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je 0x140003fe8
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 0x140004004
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140004006
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140004042
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 0x1400040de
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x14000407d
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 0x1400040be
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 0x1400040de
cmp rbx, rax
ja 0x140004090
test rbx, rbx
je 0x1400040de
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 0x140004500
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x14000d010]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x14000452d
xor eax, eax
jmp 0x140004699
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140004567
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140004567
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 0x140004699
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x14000468c
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x1400045aa
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 0x1400045d5
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 0x140004691
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 0x140004644
sub eax, 1
je 0x140004644
cmp eax, 2
jne 0x14000468c
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 0x140004691
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140004672
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 0x14000468c
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x140004691
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140006650
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x1400048b0
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x14000d010]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140004983
cmp byte [rcx + 0x71], 0
je 0x140004983
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x14000497f
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 0x140004944
sub eax, 1
je 0x140004948
cmp eax, 2
jne 0x14000497f
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140006650
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140004976
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 0x14000497f
cmp byte [rbx + 0x71], 0
sete al
jmp 0x14000492c
xor al, al
jmp 0x14000492c
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140006650
add rsp, 0x60
pop rbx
ret