joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140002800
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.0x140002821
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 0x14000284e
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x140002850
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x1400028a9
test ecx, ecx
jle 0x140002889
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 0x1400028a9
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x1400028a9
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 0x1400028d0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push r14
sub rsp, 0x20
mov rbp, r8
mov r14, rdx
mov rsi, rcx
test r8, r8
jg 0x140002901
xor eax, eax
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
cmp qword [rcx + 0x68], 0
je case.default.0x140002918
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
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 + 0x30], rbx
mov rbx, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x14000293b
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x14000293d
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140002979
mov qword [rsp + 0x38], 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 + 0x38]
add qword [rcx], rax
cmp qword [rsi + 0x80], 0
je 0x140002a0e
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x1400029b4
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 0x1400029ee
nop dword [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 0x140002a0e
cmp rbx, rax
ja 0x1400029c0
test rbx, rbx
je 0x140002a0e
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
mov rsi, qword [rsp + 0x48]
sub rbp, rbx
mov rbx, qword [rsp + 0x30]
mov rax, rbp
mov rbp, qword [rsp + 0x40]
add rsp, 0x20
pop r14
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 0x140002e50
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x70
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x140002e74
xor eax, eax
mov rbx, qword [rsp + 0x88]
add rsp, 0x70
pop rdi
ret
mov rax, qword [rcx + 0x40]
mov rcx, qword [rax]
test rcx, rcx
je 0x140002eb7
mov rdx, qword [rbx + 0x58]
movsxd r8, dword [rdx]
lea rax, [rcx + r8]
cmp rcx, rax
jae 0x140002eb7
lea eax, [r8 - 1]
mov dword [rdx], eax
mov rcx, qword [rbx + 0x40]
mov rdx, qword [rcx]
lea rax, [rdx + 1]
mov qword [rcx], rax
mov eax, edi
mov byte [rdx], dil
mov rbx, qword [rsp + 0x88]
add rsp, 0x70
pop rdi
ret
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0x80], rsi
je 0x140002fe8
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x140002efa
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 0x140002f25
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
cmove edi, ecx
mov eax, edi
jmp 0x140002fed
lea rax, [rsp + 0x90]
mov byte [rsp + 0x40], dil
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x41]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x40]
lea rax, [rsp + 0x98]
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 0x140002f9a
sub eax, 1
je 0x140002f9a
cmp eax, 2
jne 0x140002fe8
movsx ecx, byte [rsp + 0x40]
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
cmove edi, ecx
mov eax, edi
jmp 0x140002fed
mov rsi, qword [rsp + 0x90]
lea rax, [rsp + 0x48]
sub rsi, rax
je 0x140002fcb
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x48]
mov r8, rsi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rsi, rax
jne 0x140002fe8
lea rax, [rsp + 0x40]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x98], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x140002fed
mov eax, 0xffffffff
mov rsi, qword [rsp + 0x80]
mov rbx, qword [rsp + 0x88]
add rsp, 0x70
pop rdi
ret
Function at 0x1400033d0
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x50
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x140003499
cmp byte [rcx + 0x71], 0
je 0x140003499
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x68], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x14000348c
mov rcx, qword [rbx + 0x68]
lea rax, [rsp + 0x60]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x50]
lea r8, [rsp + 0x30]
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 0x140003448
sub eax, 1
je 0x14000344c
cmp eax, 2
jne 0x14000348c
mov rdi, qword [rsp + 0x68]
mov al, 1
mov byte [rbx + 0x71], 0
add rsp, 0x50
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x60]
lea rax, [rsp + 0x30]
sub rdi, rax
je 0x14000347a
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x30]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rdi, rax
jne 0x14000348c
cmp byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x68]
sete al
add rsp, 0x50
pop rbx
ret
mov rdi, qword [rsp + 0x68]
xor al, al
add rsp, 0x50
pop rbx
ret
mov al, 1
add rsp, 0x50
pop rbx
ret

Function at 0x1400043fc
Capabilities:
Parse pe header

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

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov dword [0x0040e074], 1
mov dword [0x0040e078], 1
mov dword [0x0040e07c], 1
mov dword [0x0040e340], 1
lea rax, [0x00400000]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x401466
mov eax, 0
jmp 0x401513
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x401492
mov eax, 0
jmp 0x401513
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x4014b8
cmp eax, 0x20b
je 0x4014df
jmp 0x40150e
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x4014cb
mov eax, 0
jmp 0x401513
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x401513
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x4014fa
mov eax, 0
jmp 0x401513
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x401513
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x401680
Capabilities:
Allocate or change rwx memory
Encrypt data using rc4 prga
Execute shellcode via indirect call

Disassembly:
push rbp
push rdi
push rsi
sub rsp, 0x240
lea rbp, [rsp + 0x80]
call sym.__main
lea rdx, [rbp - 0x50]
lea r8, [0x0040b020]
mov eax, 0x3f
mov rdi, rdx
mov rsi, r8
mov rcx, rax
rep movsq qword [rdi], qword [rsi]
mov dword [rbp - 0x60], 0x79726576
mov dword [rbp - 0x5c], 0x64726168
mov dword [rbp - 0x58], 0x79656b
mov dword [rbp + 0x1bc], 0
jmp 0x40172b
mov eax, dword [rbp + 0x1bc]
cdqe
movzx eax, byte [rbp + rax - 0x50]
mov r8d, eax
mov ecx, dword [rbp + 0x1bc]
mov edx, 0x2e8ba2e9
mov eax, ecx
imul edx
sar edx, 1
mov eax, ecx
sar eax, 0x1f
sub edx, eax
mov eax, edx
shl eax, 2
add eax, edx
add eax, eax
add eax, edx
mov edx, ecx
sub edx, eax
movsxd rax, edx
movzx eax, byte [rbp + rax - 0x60]
xor eax, r8d
mov edx, eax
mov eax, dword [rbp + 0x1bc]
cdqe
mov byte [rbp + rax - 0x50], dl
add dword [rbp + 0x1bc], 1
mov eax, dword [rbp + 0x1bc]
cmp eax, 0x1f6
jbe 0x4016d4
mov r9d, 0x40
mov r8d, 0x1000
mov edx, 0x1f8
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp + 0x1b0], rax
mov rax, qword [rbp + 0x1b0]
lea rdx, [rbp - 0x50]
mov r8d, 0x1f8
mov rcx, rax
and ecx, 1
test rcx, rcx
je 0x40178b
movzx ecx, byte [rdx]
mov byte [rax], cl
add rax, 1
add rdx, 1
sub r8d, 1
mov rcx, rax
and ecx, 2
test rcx, rcx
je 0x4017a8
movzx ecx, word [rdx]
mov word [rax], cx
add rax, 2
add rdx, 2
sub r8d, 2
mov rcx, rax
and ecx, 4
test rcx, rcx
je 0x4017c3
mov ecx, dword [rdx]
mov dword [rax], ecx
add rax, 4
add rdx, 4
sub r8d, 4
mov ecx, r8d
shr ecx, 3
mov ecx, ecx
mov rdi, rax
mov rsi, rdx
rep movsq qword [rdi], qword [rsi]
mov rdx, rsi
mov rax, rdi
mov ecx, 0
mov r9d, r8d
and r9d, 4
test r9d, r9d
je 0x4017f5
mov r9d, dword [rdx]
mov dword [rax], r9d
add rcx, 4
mov r9d, r8d
and r9d, 2
test r9d, r9d
je 0x40180f
movzx r9d, word [rdx + rcx]
mov word [rax + rcx], r9w
add rcx, 2
and r8d, 1
test r8d, r8d
je 0x40181f
movzx edx, byte [rdx + rcx]
mov byte [rax + rcx], dl
mov rax, qword [rbp + 0x1b0]
call rax
mov eax, 0
add rsp, 0x240
pop rsi
pop rdi
pop rbp
ret
Function at 0x4022f4
Capabilities:
Terminate process

Disassembly:
push rbp
mov rbp, rsp
add rsp, 0xffffffffffffff80
mov qword [rbp + 0x10], rcx
lea rcx, [0x0040e400]
mov rax, qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
call rax
mov rax, qword [0x0040e4f8]
mov qword [rbp - 8], rax
lea rdx, [rbp - 0x28]
mov rax, qword [rbp - 8]
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_RtlLookupFunctionEntry]
call rax
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
je 0x40238c
mov rax, qword [rbp - 0x28]
mov r8, qword [rbp - 0x10]
mov rcx, qword [rbp - 8]
mov qword [rsp + 0x38], 0
lea rdx, [rbp - 0x30]
mov qword [rsp + 0x30], rdx
lea rdx, [rbp - 0x38]
mov qword [rsp + 0x28], rdx
lea rdx, [0x0040e400]
mov qword [rsp + 0x20], rdx
mov r9, r8
mov r8, rcx
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_RtlVirtualUnwind]
call rax
jmp 0x4023a5
mov rax, qword [rbp + 8]
mov qword [0x0040e4f8], rax
mov rax, rbp
add rax, 8
mov qword [0x0040e498], rax
mov rax, qword [0x0040e4f8]
mov qword [0x0040e370], rax
mov rax, qword [rbp + 0x10]
mov qword [0x0040e480], rax
mov dword [0x0040e360], 0xc0000409
mov dword [0x0040e364], 1
mov rax, qword [0x0040a0d0]
mov qword [rbp - 0x20], rax
mov rax, qword [0x0040a0e0]
mov qword [rbp - 0x18], rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
call rax
lea rcx, [0x0040a030]
mov rax, qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call rax
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call rax
mov edx, 0xc0000409
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_TerminateProcess]
call rax
call sym.abort
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
Function at 0x40248b
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push rbp
mov rbp, rsp
push rbx
sub rsp, 0x68
mov qword [rbp + 0x10], rcx
mov dword [rbp - 0x14], 0
jmp 0x402520
mov rcx, qword [0x0040e8e0]
mov eax, dword [rbp - 0x14]
movsxd rdx, eax
mov rax, rdx
add rax, rax
add rax, rdx
shl rax, 3
add rax, rcx
mov rax, qword [rax + 8]
cmp rax, qword [rbp + 0x10]
ja 0x40251c
mov rcx, qword [0x0040e8e0]
mov eax, dword [rbp - 0x14]
movsxd rdx, eax
mov rax, rdx
add rax, rax
add rax, rdx
shl rax, 3
add rax, rcx
mov rcx, qword [rax + 8]
mov r8, qword [0x0040e8e0]
mov eax, dword [rbp - 0x14]
movsxd rdx, eax
mov rax, rdx
add rax, rax
add rax, rdx
shl rax, 3
add rax, r8
mov rax, qword [rax + 0x10]
mov eax, dword [rax + 8]
mov eax, eax
add rax, rcx
cmp rax, qword [rbp + 0x10]
ja 0x4026bb
add dword [rbp - 0x14], 1
mov eax, dword [0x0040e8e8]
cmp dword [rbp - 0x14], eax
jl 0x4024a1
mov rcx, qword [rbp + 0x10]
call sym.__mingw_GetSectionForAddress
mov qword [rbp - 0x20], rax
cmp qword [rbp - 0x20], 0
jne 0x402553
mov rdx, qword [rbp + 0x10]
lea rcx, str.Address__p_has_no_image_section
call sym.__report_error
mov rcx, qword [0x0040e8e0]
mov eax, dword [rbp - 0x14]
movsxd rdx, eax
mov rax, rdx
add rax, rax
add rax, rdx
shl rax, 3
lea rdx, [rcx + rax]
mov rax, qword [rbp - 0x20]
mov qword [rdx + 0x10], rax
mov rcx, qword [0x0040e8e0]
mov eax, dword [rbp - 0x14]
movsxd rdx, eax
mov rax, rdx
add rax, rax
add rax, rdx
shl rax, 3
add rax, rcx
mov dword [rax], 0
mov rcx, qword [0x0040e8e0]
mov eax, dword [rbp - 0x14]
movsxd rdx, eax
mov rax, rdx
add rax, rax
add rax, rdx
shl rax, 3
lea rbx, [rcx + rax]
call sym._GetPEImageBase
mov rdx, qword [rbp - 0x20]
mov edx, dword [rdx + 0xc]
mov edx, edx
add rax, rdx
mov qword [rbx + 8], rax
mov rcx, qword [0x0040e8e0]
mov eax, dword [rbp - 0x14]
movsxd rdx, eax
mov rax, rdx
add rax, rax
add rax, rdx
shl rax, 3
add rax, rcx
mov rax, qword [rax + 8]
lea rdx, [rbp - 0x50]
mov r8d, 0x30
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualQuery]
call rax
test rax, rax
jne 0x402644
mov rcx, qword [0x0040e8e0]
mov eax, dword [rbp - 0x14]
movsxd rdx, eax
mov rax, rdx
add rax, rax
add rax, rdx
shl rax, 3
add rax, rcx
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 8]
mov r8, rdx
mov edx, eax
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
call sym.__report_error
mov eax, dword [rbp - 0x2c]
cmp eax, 0x40
je 0x4026ac
mov eax, dword [rbp - 0x2c]
cmp eax, 4
je 0x4026ac
mov rcx, qword [0x0040e8e0]
mov eax, dword [rbp - 0x14]
movsxd rdx, eax
mov rax, rdx
add rax, rax
add rax, rdx
shl rax, 3
add rax, rcx
mov rcx, rax
mov rdx, qword [rbp - 0x38]
mov rax, qword [rbp - 0x50]
mov r9, rcx
mov r8d, 0x40
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualProtect]
call rax
test eax, eax
jne 0x4026ac
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
call sym.__report_error
mov eax, dword [0x0040e8e8]
add eax, 1
mov dword [0x0040e8e8], eax
add rsp, 0x68
pop rbx
pop rbp
ret
Function at 0x4027e8
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov dword [rbp - 4], 0
cmp qword [rbp + 0x20], 0
je 0x4028d2
mov rcx, qword [rbp + 0x10]
call sym.mark_section_writable
lea rax, [rbp - 0x40]
mov r8d, 0x30
mov rdx, rax
mov rcx, qword [rbp + 0x10]
mov rax, qword [sym.imp.KERNEL32.dll_VirtualQuery]
call rax
test rax, rax
jne 0x40284b
mov r8, qword [rbp + 0x10]
mov edx, 0x30
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
call sym.__report_error
mov eax, dword [rbp - 0x1c]
cmp eax, 0x40
je 0x402883
mov eax, dword [rbp - 0x1c]
cmp eax, 4
je 0x402883
mov dword [rbp - 4], 1
mov rdx, qword [rbp - 0x28]
mov rax, qword [rbp - 0x40]
lea rcx, [rbp - 0x44]
mov r9, rcx
mov r8d, 0x40
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualProtect]
call rax
mov rdx, qword [rbp + 0x20]
mov rax, qword [rbp + 0x18]
mov r8, rdx
mov rdx, rax
mov rcx, qword [rbp + 0x10]
call sym.memcpy
cmp dword [rbp - 4], 0
je 0x4028d2
mov eax, dword [rbp - 0x1c]
cmp eax, 0x40
je 0x4028d2
mov eax, dword [rbp - 0x1c]
cmp eax, 4
je 0x4028d2
mov ecx, dword [rbp - 0x44]
mov rdx, qword [rbp - 0x28]
mov rax, qword [rbp - 0x40]
lea r8, [rbp - 0x44]
mov r9, r8
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualProtect]
call rax
nop
add rsp, 0x70
pop rbp
ret

Function at 0x402d80
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x402da8
mov eax, 0
jmp 0x402df6
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x402dd1
mov eax, 0
jmp 0x402df6
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x402df1
mov eax, 0
jmp 0x402df6
mov eax, 1
add rsp, 0x20
pop rbp
ret

Function at 0x402dfc
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x402e7a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp rax, qword [rbp + 0x18]
ja 0x402e71
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp rax, qword [rbp + 0x18]
jbe 0x402e71
mov rax, qword [rbp - 8]
jmp 0x402e8f
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp eax, dword [rbp - 0xc]
ja 0x402e44
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x4034f6
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x0040e948]
test eax, eax
je 0x403584
lea rcx, [0x0040e920]
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x0040e950]
mov qword [rbp - 8], rax
jmp 0x40356b
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x40355f
cmp qword [rbp - 0x10], 0
je 0x40355f
mov rax, qword [rbp - 8]
mov rax, qword [rax + 8]
mov rdx, qword [rbp - 0x10]
mov rcx, rdx
call rax
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x403525
lea rcx, [0x0040e920]
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x403585
nop
add rsp, 0x30
pop rbp
ret

Function at 0x4037b0
Capabilities:
Query environment variable

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
lea rcx, str.PRINTF_EXPONENT_DIGITS
call sym.getenv
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
je 0x4037e1
mov rax, qword [rbp - 8]
movzx eax, byte [rax]
movsx eax, al
sub eax, 0x30
cmp eax, 2
jbe 0x4037ed
call sym.__mingw_get_output_format
and eax, 1
test eax, eax
je 0x4037f4
mov eax, 2
jmp 0x4037f9
mov eax, 3
add rsp, 0x30
pop rbp
ret