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

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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
push r15
mov eax, dword [rcx + 0x48]
lea rbx, [rcx + 0x28]
mov rdi, qword [rcx]
lea r11, [rcx + 0x28]
add rbx, rax
movabs rbp, 0xc2b2ae3d27d4eb4f
movabs rsi, 0x9e3779b185ebca87
movabs r14, 0x27d4eb2f165667c5
movabs r15, 0x7a1435883d4d519d
cmp rdi, 0x20
jb 0x140002169
mov r10, qword [rcx + 0x20]
mov r9, qword [rcx + 0x18]
mov rax, r10
mov rdx, qword [rcx + 8]
mov r8, qword [rcx + 0x10]
mov rcx, r9
rol rax, 0x12
rol rcx, 0xc
add rax, rcx
mov rcx, r8
rol rcx, 7
add rax, rcx
mov rcx, rdx
imul rdx, rbp
imul r8, rbp
imul r9, rbp
imul r10, rbp
rol rdx, 0x1f
imul rdx, rsi
rol rcx, 1
add rax, rcx
rol r8, 0x1f
xor rax, rdx
rol r9, 0x1f
imul rax, rsi
imul r8, rsi
imul r9, rsi
sub rax, r15
rol r10, 0x1f
xor rax, r8
imul rax, rsi
imul r10, rsi
sub rax, r15
xor rax, r9
imul rax, rsi
sub rax, r15
xor rax, r10
imul rax, rsi
sub rax, r15
jmp 0x140002170
mov rax, qword [rcx + 0x18]
add rax, r14
add rax, rdi
lea rdx, [r11 + 8]
cmp rdx, rbx
ja 0x1400021aa
nop dword [rax]
mov rcx, qword [r11]
add rdx, 8
imul rcx, rbp
add r11, 8
rol rcx, 0x1f
imul rcx, rsi
xor rax, rcx
rol rax, 0x1b
imul rax, rsi
sub rax, r15
cmp rdx, rbx
jbe 0x140002180
lea rdx, [r11 + 4]
movabs r9, 0x165667b19e3779f9
cmp rdx, rbx
ja 0x1400021d5
mov ecx, dword [r11]
mov r11, rdx
imul rcx, rsi
xor rax, rcx
rol rax, 0x17
imul rax, rbp
add rax, r9
xor edx, edx
mov r8, rbx
sub r8, r11
cmp r11, rbx
cmova r8, rdx
test r8, r8
je 0x14000220f
nop dword [rax]
movzx ecx, byte [r11]
lea r11, [r11 + 1]
imul rcx, r14
inc rdx
xor rax, rcx
rol rax, 0xb
imul rax, rsi
cmp rdx, r8
jb 0x1400021f0
mov rbx, qword [rsp + 0x18]
mov rcx, rax
mov rsi, qword [rsp + 0x28]
mov rdi, qword [rsp + 0x30]
shr rcx, 0x21
xor rcx, rax
imul rcx, rbp
mov rbp, qword [rsp + 0x20]
mov rdx, rcx
shr rdx, 0x1d
xor rdx, rcx
imul rdx, r9
mov rax, rdx
shr rax, 0x20
xor rax, rdx
pop r15
pop r14
ret
Function at 0x14000a8f0
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r14
sub rsp, 0x90
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x80], rax
xor r14d, r14d
lea rbx, [rsp + 0x30]
mov rbp, rdx
mov rdi, rcx
mov word [rsp + 0x30], r14w
lea esi, [r14 + 0x28]
cmp byte [rcx], r14b
je 0x14000a9a2
nop dword [rax]
nop dword [rax + rax]
movzx eax, byte [rdi]
lea rdx, [rsp + 0x20]
mov r8d, 2
mov byte [rsp + 0x20], al
lea rcx, [rsp + 0x24]
mov byte [rsp + 0x21], r14b
call fcn.14000e230
cmp rax, 1
jne 0x14000a9de
mov rcx, rsi
mov rax, rbx
cmp word [rbx], r14w
je 0x14000a980
add rax, 2
dec rcx
cmp word [rax], r14w
jne 0x14000a973
cmp rcx, 1
jb 0x14000a9d8
movzx ecx, word [rsp + 0x24]
inc rdi
add rbx, 2
mov word [rax], cx
dec rsi
mov word [rax + 2], r14w
cmp byte [rdi], r14b
jne 0x14000a940
mov rdx, rbp
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.14000c010
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
call fcn.14000deec
int3
call fcn.14000deec
int3

Function at 0x14000ab70
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x250
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov rdi, r8
lea rax, [rsp + 0x30]
mov rbx, rcx
mov qword [rsp + 0x20], rax
xor r8d, r8d
xor ecx, ecx
xor r9d, r9d
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x14000abb5
xor al, al
jmp 0x14000ac02
cmp word [rbx], 0
je 0x14000abcd
nop dword [rax + rax]
add rbx, 2
dec rdi
cmp word [rbx], 0
jne 0x14000abc0
cmp word [rsp + 0x30], 0
je 0x14000abfb
lea rcx, [rsp + 0x30]
sub rcx, rbx
nop dword [rax]
cmp rdi, 1
jb 0x14000ac23
movzx eax, word [rcx + rbx]
dec rdi
mov word [rbx], ax
add rbx, 2
cmp word [rcx + rbx], 0
jne 0x14000abe0
xor eax, eax
mov word [rbx], ax
mov al, 1
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.14000c010
mov rbx, qword [rsp + 0x270]
add rsp, 0x250
pop rdi
ret
call fcn.14000deec
int3
Function at 0x14000b2c0
Capabilities:
Write file on windows

Disassembly:
test rdx, rdx
je 0x14000b353
push rbx
push rbp
sub rsp, 0x38
mov qword [rsp + 0x50], rsi
mov rbx, rdx
mov qword [rsp + 0x60], rdi
mov rbp, rcx
mov qword [rsp + 0x30], r14
xor r14d, r14d
nop word [rax + rax]
mov edi, 0x8000
lea rcx, [0x140038d70]
cmp rbx, rdi
cmovbe edi, ebx
movsxd rsi, edi
mov rdx, rsi
call fcn.14000b180
cmp rbp, 0xffffffffffffffff
je 0x14000b339
lea r9, [rsp + 0x58]
mov dword [rsp + 0x58], r14d
mov r8d, edi
mov qword [rsp + 0x20], r14
lea rdx, [0x140038d70]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14000b354
sub rbx, rsi
jne 0x14000b2f0
mov rdi, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x50]
mov r14, qword [rsp + 0x30]
add rsp, 0x38
pop rbp
pop rbx
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error__couldnt_unpack_file_to_target_path.
call fcn.14000b040
int3

Function at 0x14000b370
Capabilities:
Create directory

Disassembly:
mov qword [rsp + 0x18], rsi
push rdi
mov eax, 0x2030
call fcn.14001e290
sub rsp, rax
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x2020], rax
mov r11d, dword [0x14002fd0c]
lea rsi, [0x140031d60]
mov rdi, rcx
test r11d, r11d
jne 0x14000b3e9
mov r8d, 0x1000
lea rdx, str.HOME
lea rcx, [rsp + 0x20]
call fcn.14000ac30
test al, al
je 0x14000b4c9
lea rcx, [rsp + 0x20]
call fcn.1400125a4
movsxd r11, dword [0x14002fd0c]
mov qword [rsi + r11*8], rax
inc r11d
mov dword [0x14002fd0c], r11d
xor r9d, r9d
test r11d, r11d
jle 0x14000b428
mov r10, rsi
mov r8, qword [r10]
mov rax, rdi
sub r8, rdi
nop dword [rax]
movzx edx, word [rax]
movzx ecx, word [rax + r8]
sub edx, ecx
jne 0x14000b414
add rax, 2
test ecx, ecx
jne 0x14000b400
test edx, edx
je 0x14000b4c5
inc r9d
add r10, 8
cmp r9d, r11d
jl 0x14000b3f4
or rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp word [rdi + rax*2], 0
jne 0x14000b430
cmp rax, 2
jne 0x14000b447
cmp word [rdi + 2], 0x3a
je 0x14000b4c5
xor edx, edx
mov qword [rsp + 0x2048], rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
setne bl
test bl, bl
jne 0x14000b472
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x14000b499
mov bl, 1
cmp dword [0x14002fd0c], 0x400
jge 0x14000b499
mov rcx, rdi
call fcn.1400125a4
movsxd rdx, dword [0x14002fd0c]
mov qword [rsi + rdx*8], rax
inc edx
mov dword [0x14002fd0c], edx
movzx eax, bl
mov rbx, qword [rsp + 0x2048]
mov rcx, qword [rsp + 0x2020]
xor rcx, rsp
call fcn.14000c010
mov rsi, qword [rsp + 0x2050]
add rsp, 0x2030
pop rdi
ret
mov al, 1
jmp 0x14000b4a4
mov ecx, 2
call fcn.14000e3ec
mov rcx, rax
lea r8, str.HOME
lea rdx, str.Error__couldnt_runtime_expand_spec__ls._n
call fcn.140001010
call fcn.14000deec
int3
Function at 0x14000b600
Capabilities:
Check if file exists
Delete file

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 r14
sub rsp, 0x60
xor edi, edi
mov dword [rax - 0x40], 3
lea rbp, [0x1400296a8]
mov qword [rax - 0x48], rdi
lea rsi, [0x14002fd30]
mov qword [rax - 0x30], rbp
mov r14d, 0x414
mov qword [rax - 0x38], rsi
lea rcx, [rax - 0x48]
mov word [rax - 0x28], r14w
mov dword [rax - 0x24], edi
mov qword [rax - 0x20], rdi
mov qword [rax - 0x18], rbp
call qword [sym.imp.SHELL32.dll_SHFileOperationW]
mov ebx, edi
nop
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14000b6ba
test al, 0x10
je 0x14000b6ba
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x20], rdi
mov dword [rsp + 0x28], 3
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x38], rbp
mov word [rsp + 0x40], r14w
mov dword [rsp + 0x44], edi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], rbp
call qword [sym.imp.SHELL32.dll_SHFileOperationW]
inc ebx
cmp ebx, 0x14
jl 0x14000b660
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop r14
ret
sub rsp, 0x28
mov rcx, qword [0x140031d30]
test rcx, rcx
je 0x14000b71b
mov edx, 0x1388
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x14000b70e
mov rcx, qword [0x140031d30]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov rcx, qword [0x140031d30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [0x14002fd08], 0
je 0x14000b72d
add rsp, 0x28
jmp 0x14000b600
add rsp, 0x28
ret
Function at 0x14000b6e0
Capabilities:
Check if file exists
Delete file
Get file attributes
Terminate process

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 r14
sub rsp, 0x60
xor edi, edi
mov dword [rax - 0x40], 3
lea rbp, [0x1400296a8]
mov qword [rax - 0x48], rdi
lea rsi, [0x14002fd30]
mov qword [rax - 0x30], rbp
mov r14d, 0x414
mov qword [rax - 0x38], rsi
lea rcx, [rax - 0x48]
mov word [rax - 0x28], r14w
mov dword [rax - 0x24], edi
mov qword [rax - 0x20], rdi
mov qword [rax - 0x18], rbp
call qword [sym.imp.SHELL32.dll_SHFileOperationW]
mov ebx, edi
nop
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14000b6ba
test al, 0x10
je 0x14000b6ba
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x20], rdi
mov dword [rsp + 0x28], 3
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x38], rbp
mov word [rsp + 0x40], r14w
mov dword [rsp + 0x44], edi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], rbp
call qword [sym.imp.SHELL32.dll_SHFileOperationW]
inc ebx
cmp ebx, 0x14
jl 0x14000b660
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop r14
ret
sub rsp, 0x28
mov rcx, qword [0x140031d30]
test rcx, rcx
je 0x14000b71b
mov edx, 0x1388
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x14000b70e
mov rcx, qword [0x140031d30]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov rcx, qword [0x140031d30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [0x14002fd08], 0
je 0x14000b72d
add rsp, 0x28
jmp 0x14000b600
add rsp, 0x28
ret
Function at 0x14000dcf8
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 0x14000dd67
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14000dd67
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14000dd67
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14000dd67
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14000dd67
cmp dword [rcx + 0x84], 0xe
jbe 0x14000dd67
cmp dword [rcx + 0xf8], 0
je 0x14000dd67
mov ecx, ebx
call fcn.14000de0c
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.14000dc00
nop
cmp dword [rbp + 0x20], 0
jne 0x14000ddc8
call fcn.140012b14
cmp eax, 1
jne 0x14000ddb8
xor dl, dl
jmp 0x14000ddc2
call fcn.140012ae0
test al, al
sete dl
cmp dword [rbp + 0x20], 0
je 0x14000ddd3
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.14000dddc
int3
xor r8d, r8d
xor edx, edx
jmp 0x14000dcf8

Function at 0x14000dee0
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 0x14000dd67
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14000dd67
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14000dd67
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14000dd67
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14000dd67
cmp dword [rcx + 0x84], 0xe
jbe 0x14000dd67
cmp dword [rcx + 0xf8], 0
je 0x14000dd67
mov ecx, ebx
call fcn.14000de0c
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.14000dc00
nop
cmp dword [rbp + 0x20], 0
jne 0x14000ddc8
call fcn.140012b14
cmp eax, 1
jne 0x14000ddb8
xor dl, dl
jmp 0x14000ddc2
call fcn.140012ae0
test al, al
sete dl
cmp dword [rbp + 0x20], 0
je 0x14000ddd3
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.14000dddc
int3
xor r8d, r8d
xor edx, edx
jmp 0x14000dcf8
Function at 0x1400176dc
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 0x140017763
mov rsi, rbx
cmp word [rax], bp
je 0x140017722
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x14001770c
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x140017708
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.1400128f0
mov rdi, rax
test rax, rax
je 0x140017750
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.14000cc60
mov rbp, rdi
xor ecx, ecx
call fcn.140012890
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 0x140019c80
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x140019c96
mov al, 1
jmp 0x140019d02
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x140019ca7
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x140019d00
mov ecx, dword [rcx + 0x18]
nop
call fcn.140017e80
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140019d00
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 0x140019d00
and qword [rsp + 0x30], 0
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140019d00
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x140019d02
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x140001900
Capabilities:
Read file on windows

Disassembly:
push r14
push rsi
push rdi
push rbp
push rbx
mov eax, 0x1030
call fcn.14000c000
sub rsp, rax
mov rdi, rdx
mov rsi, rcx
test rcx, rcx
je 0x140001962
lea rcx, [0x14009e090]
mov rdx, rsi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
je 0x140001962
lea rdx, [0x14009e50e]
mov rcx, rsi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen
mov rbx, rax
mov bpl, 1
test rbx, rbx
jne 0x140001991
xor ecx, ecx
mov rdx, rsi
add rsp, 0x1030
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
jmp 0x140001b80
mov rbx, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
xor ebp, ebp
xor ecx, ecx
call rbx
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
mov ecx, eax
mov edx, 0x8000
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__setmode]
xor ecx, ecx
call rbx
mov rbx, rax
test rbx, rbx
je 0x14000194b
lea rcx, [rsp + 0x30]
mov edx, 4
mov r8d, 0x400
mov r9, rbx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
test rax, rax
je 0x1400019f7
lea r14, [rsp + 0x30]
nop word cs:[rax + rax]
mov rdx, qword [rdi + 8]
lea r9, [rsp + rax*4]
add r9, 0x30
mov qword [rsp + 0x20], rax
mov rcx, rdi
mov r8, r14
call fcn.140001c20
mov edx, 4
mov r8d, 0x400
mov rcx, r14
mov r9, rbx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
test rax, rax
jne 0x1400019c0
mov rcx, rbx
mov rdx, rsi
call 0x140001b80
test bpl, bpl
je 0x140001a13
mov rcx, rbx
mov ebx, eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
mov eax, ebx
add rsp, 0x1030
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
ret
push rsi
push rdi
sub rsp, 0x28
mov rsi, rdx
test rcx, rcx
je 0x140001bcc
mov rdi, rcx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ftell
mov rcx, rdi
cmp eax, 0xffffffff
je 0x140001be0
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ftell
test al, 3
je 0x140001c0a
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.error:_file_size_should_be_a_multiple_of__zd__file__s_corrupt_n
mov r8d, 4
mov rcx, rax
mov r9, rsi
call fcn.14000c090
jmp 0x140001c06
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.error:_file_does_not_exist__s_n
jmp 0x140001bfb
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ferror
test eax, eax
je 0x140001c0a
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.error:_error_reading_file__s_n
mov rcx, rax
mov r8, rsi
call fcn.14000c090
xor eax, eax
jmp 0x140001c0c
mov al, 1
add rsp, 0x28
pop rdi
pop rsi
ret
Function at 0x140001a30
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x20
mov rbx, r9
mov r14, r8
mov rsi, rcx
test rcx, rcx
je 0x140001ac1
cmp byte [rsi], 0x2d
jne 0x140001a54
cmp byte [rsi + 1], 0
je 0x140001ac1
mov rcx, rsi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen
mov r15, rax
test r15, r15
je 0x140001b18
mov edx, 1
mov rcx, r14
mov r8, rbx
mov r9, r15
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
cmp rax, rbx
sete bl
je 0x140001aa0
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.error:_could_not_write_to_file__s_n
mov rcx, rax
mov r8, rsi
call fcn.14000c090
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp r15, rax
je 0x140001b46
mov rcx, r15
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
jmp 0x140001b64
mov rcx, rdx
mov edx, 0x62
call sub.api_ms_win_crt_private_l1_1_0.dll_strchr
xor edi, edi
test rax, rax
setne dil
mov r15, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov ecx, 1
call r15
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
shl edi, 0xe
add edi, 0x4000
mov ecx, eax
mov edx, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__setmode]
mov edi, eax
mov ecx, 1
call r15
mov r15, rax
test r15, r15
jne 0x140001a68
mov rbx, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov ecx, 2
call rbx
lea rdx, str.error:_could_not_open_file__s_n
mov rcx, rax
mov r8, rsi
call fcn.14000c090
mov ecx, 1
call rbx
xor ebx, ebx
test rax, rax
jne 0x140001b64
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
mov ecx, eax
mov edx, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__setmode]
mov eax, ebx
add rsp, 0x20
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
Function at 0x14000b6d0
Capabilities:
Execute shellcode via indirect call
Write file on windows

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

Function at 0x14000b740
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov rsi, rcx
mov ecx, dword [0x1401059c4]
mov rdi, rdx
mov rbp, r8
test ecx, ecx
jle 0x14000b881
mov rax, qword [0x1401059c8]
xor ebx, ebx
nop dword [rax]
mov r9, qword [rax + 0x18]
cmp rsi, r9
jb 0x14000b78c
mov rdx, qword [rax + 0x20]
mov edx, dword [rdx + 8]
add r9, rdx
cmp rsi, r9
jb 0x14000b811
add ebx, 1
add rax, 0x28
cmp ebx, ecx
jne 0x14000b770
mov rcx, rsi
call fcn.14006ce10
test rax, rax
mov r12, rax
je 0x14000b8a5
movsxd rbx, ebx
lea r13, [rbx + rbx*4]
shl r13, 3
mov rbx, r13
add rbx, qword [0x1401059c8]
mov qword [rbx + 0x20], rax
mov dword [rbx], 0
call fcn.14006cf50
mov edx, dword [r12 + 0xc]
mov r8d, 0x30
add rax, rdx
lea rdx, [rsp + 0x20]
mov qword [rbx + 0x18], rax
mov rax, qword [0x1401059c8]
mov rcx, qword [rax + r13 + 0x18]
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x14000b888
mov eax, dword [rsp + 0x44]
cmp eax, 0x40
jne 0x14000b830
add dword [0x1401059c4], 1
mov r8, rbp
mov rdx, rdi
mov rcx, rsi
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
cmp eax, 4
je 0x14000b80a
cmp eax, 0x80
je 0x14000b80a
cmp eax, 8
je 0x14000b80a
mov r9, r13
add r9, qword [0x1401059c8]
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov qword [r9 + 8], rcx
mov qword [r9 + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000b80a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.14000b6d0
xor ebx, ebx
jmp 0x14000b797
mov rax, qword [0x1401059c8]
mov edx, dword [r12 + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + r13 + 0x18]
call fcn.14000b6d0
lea rcx, str.Address__p_has_no_image_section
mov rdx, rsi
call fcn.14000b6d0
nop
nop
nop word cs:[rax + rax]