joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402a10
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push rbp
sub rsp, 0x230
lea rbp, [rsp + 0x80]
call sym.getIPAddress
lea rax, [rbp - 0x60]
mov r8d, 0x200
mov edx, 0
mov rcx, rax
call sym.memset
mov eax, dword [0x00410040]
test eax, eax
je 0x402a5d
mov eax, dword [0x00410040]
mov ecx, eax
call sym.close
mov dword [0x00410040], 0
mov eax, dword [0x0040a8f8]
test eax, eax
jne 0x402a73
mov dword [0x0040a8f8], 0
jmp 0x402a82
mov eax, dword [0x0040a8f8]
add eax, 1
mov dword [0x0040a8f8], eax
mov eax, dword [0x0040a8f8]
cdqe
lea rdx, [rax*8]
lea rax, [0x0040a8f0]
mov rdx, qword [rdx + rax]
lea rax, [rbp - 0x60]
mov rcx, rax
call sym.strcpy
mov dword [rbp + 0x1ac], 0x1b46
lea rax, [rbp - 0x60]
mov edx, 0x3a
mov rcx, rax
call sym.strchr
test rax, rax
je 0x402b00
lea rax, [rbp - 0x60]
mov edx, 0x3a
mov rcx, rax
call sym.strchr
add rax, 1
mov rcx, rax
call sym.atoi
mov dword [rbp + 0x1ac], eax
lea rax, [rbp - 0x60]
mov edx, 0x3a
mov rcx, rax
call sym.strchr
mov byte [rax], 0
mov r8d, 0
mov edx, 1
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_socket]
call rax
mov dword [0x00410040], eax
mov eax, dword [0x00410040]
mov ecx, dword [rbp + 0x1ac]
lea rdx, [rbp - 0x60]
mov r9d, 0x1e
mov r8d, ecx
mov ecx, eax
call sym.connectTimeout
test eax, eax
jne 0x402b4a
mov eax, 1
jmp 0x402b4f
mov eax, 0
add rsp, 0x230
pop rbp
ret

Function at 0x402b58
Capabilities:
Get hostname
Resolve dns

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x90
lea rax, [rbp - 0x60]
mov edx, 0x50
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_gethostname]
call rax
cmp eax, 0xffffffff
jne 0x402b84
mov eax, 0
jmp 0x402bc4
lea rax, [rbp - 0x60]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_gethostbyname]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x402ba6
mov eax, 0
jmp 0x402bc4
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x18]
mov rax, qword [rax]
mov eax, dword [rax]
mov dword [rbp - 0x64], eax
mov eax, dword [rbp - 0x64]
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_inet_ntoa]
call rax
add rsp, 0x90
pop rbp
ret

Function at 0x402bed
Capabilities:
Check for debugger via api

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call rax
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CheckRemoteDebuggerPresent]
call rax
test eax, eax
setne al
movzx eax, al
add rsp, 0x20
pop rbp
ret
Function at 0x4033f0
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 dword [rax]

Function at 0x403460
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x004140f4]
test esi, esi
mov rbx, rcx
jle 0x403590
mov rax, qword [0x004140f8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x4034ab
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x403535
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x403490
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov rdi, rax
je 0x4035b2
mov rax, qword [0x004140f8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call sym._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x004140f8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x403597
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40352e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x403540
add dword [0x004140f4], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov r8d, 0x40
mov eax, 4
mov rcx, qword [rsp + 0x20]
cmove r8d, eax
mov rdx, qword [rsp + 0x38]
add rbx, qword [0x004140f8]
mov r9, rbx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40352e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
nop dword [rax]
xor esi, esi
jmp 0x4034b8
mov rax, qword [0x004140f8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [rdi + 8]
mov r8, qword [rax + rbx + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x403b50
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x00414160]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x00414140]
test rbx, rbx
je 0x403bac
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 0x403ba3
test eax, eax
jne 0x403ba3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x403b88
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 0x403dc0
Capabilities:
Parse pe header

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

Function at 0x403df0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx r8d, word [rcx + 6]
movzx eax, word [rcx + 0x14]
test r8w, r8w
lea rax, [rcx + rax + 0x18]
je 0x403e3d
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
cmp rdx, r8
mov rcx, r8
jb 0x403e34
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x403e3f
add rax, 0x28
cmp rax, r9
jne 0x403e20
xor eax, eax
ret

Function at 0x403e40
Capabilities:
Parse pe header

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

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

Function at 0x403f60
Capabilities:
Parse pe header

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

Function at 0x403fa0
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x0040c8c0]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x403fc0
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x403fc8
ret
cmp word [rdx + 0x18], 0x20b
jne 0x403fc0
movzx r8d, word [rdx + 6]
movzx eax, word [rdx + 0x14]
test r8w, r8w
lea rax, [rdx + rax + 0x18]
je 0x404010
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x404007
test rcx, rcx
je 0x403fc0
sub rcx, 1
add rax, 0x28
cmp rdx, rax
jne 0x403ff8
xor eax, eax
ret
Function at 0x404020
Capabilities:
Parse pe header

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

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

Disassembly:
mov rdx, qword [0x0040c8c0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x404080
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x404088
ret
cmp word [r8 + 0x18], 0x20b
jne 0x404080
movzx r9d, word [r8 + 6]
sub rcx, rdx
movzx edx, word [r8 + 0x14]
test r9w, r9w
lea rdx, [r8 + rdx + 0x18]
je 0x404080
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]
cmp rcx, r8
mov rax, r8
jb 0x4040d4
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x4040e0
add rdx, 0x28
cmp rdx, r9
jne 0x4040c0
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

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

Disassembly:
mov r11, qword [0x0040c8c0]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x404112
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x404120
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x404112
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x404112
movzx r10d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
test r10w, r10w
lea rdx, [r8 + rdx + 0x18]
je 0x404112
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]
cmp rax, r9
mov r8, r9
jb 0x404175
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x404188
add rdx, 0x28
cmp r10, rdx
jne 0x404160
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x404197
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x4041a7
mov edx, dword [rax + 0xc]
test edx, edx
je 0x40417e
test ecx, ecx
jg 0x404190
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x1800157d0
Capabilities:
Execute syscall

Disassembly:
mov r10, rcx
mov eax, 0x23
syscall
ret
Function at 0x2fc4dcb40
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call fcn.2fc4ddc20
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop

Function at 0x2fc4dd542
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x2fc500108]
test eax, eax
je 0x2fc4dd5da
lea rax, [0x2fc5000e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x2fc500110]
mov qword [rbp - 8], rax
jmp 0x2fc4dd5be
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 0x2fc4dd5b2
cmp qword [rbp - 0x10], 0
je 0x2fc4dd5b2
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x2fc4dd578
lea rax, [0x2fc5000e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x2fc4dd5db
nop
add rsp, 0x30
pop rbp
ret

Function at 0x2fc4dd6e0
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 0x2fc4dd708
mov eax, 0
jmp 0x2fc4dd756
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 0x2fc4dd731
mov eax, 0
jmp 0x2fc4dd756
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 0x2fc4dd751
mov eax, 0
jmp 0x2fc4dd756
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x2fc4dd75c
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 0x2fc4dd7da
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x2fc4dd7d1
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 qword [rbp + 0x18], rax
jae 0x2fc4dd7d1
mov rax, qword [rbp - 8]
jmp 0x2fc4dd7ef
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x2fc4dd7a4
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x401911
Capabilities:
Enumerate processes

Disassembly:
push rbp
sub rsp, 0x1b0
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x140], rcx
mov qword [rbp + 0x120], 0
mov dword [rbp - 0x10], 0x130
mov edx, 0
mov ecx, 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov qword [rbp + 0x128], rax
lea rdx, [rbp - 0x10]
mov rax, qword [rbp + 0x128]
mov rcx, rax
call sub.KERNEL32.dll_Process32First
cmp eax, 1
sete al
test al, al
je 0x401a9f
lea rdx, [rbp - 0x10]
mov rax, qword [rbp + 0x128]
mov rcx, rax
call sub.KERNEL32.dll_Process32Next
cmp eax, 1
sete al
test al, al
je 0x401a9f
lea rax, [rbp - 0x10]
add rax, 0x2c
mov rdx, qword [rbp + 0x140]
mov rcx, rax
call sub.msvcrt.dll__stricmp
test eax, eax
sete al
test al, al
je 0x401971
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
call rax
mov ecx, eax
lea rax, [rbp - 0x14]
mov rdx, rax
mov rax, qword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
call rax
mov eax, dword [rbp - 8]
mov ecx, eax
call fcn.004017ed
mov edx, dword [rbp - 0x14]
cmp eax, edx
sete al
test al, al
je 0x401971
mov qword [rbp - 0x28], 0
mov eax, dword [rbp - 8]
mov ecx, eax
call fcn.00401594
mov qword [rbp - 0x30], rax
mov dword [rbp - 0x60], 0x30
mov qword [rbp - 0x58], 0
mov dword [rbp - 0x48], 0
mov qword [rbp - 0x50], 0
mov qword [rbp - 0x40], 0
mov qword [rbp - 0x38], 0
mov r10, qword [0x0517c090]
lea rcx, [rbp - 0x30]
lea rdx, [rbp - 0x60]
lea rax, [rbp + 0x120]
mov r9, rcx
mov r8, rdx
mov edx, 0x1fffff
mov rcx, rax
call r10
mov rax, qword [rbp + 0x120]
test rax, rax
je 0x401a83
mov rax, qword [rbp + 0x120]
cmp rax, 0xffffffffffffffff
je 0x401a83
mov rdx, qword [0x0517c088]
mov rax, qword [rbp + 0x128]
mov rcx, rax
call rdx
mov rax, qword [rbp + 0x120]
jmp 0x401ab9
mov rdx, qword [0x0517c088]
mov rax, qword [rbp + 0x128]
mov rcx, rax
call rdx
mov rax, 0xffffffffffffffff
jmp 0x401ab9
mov rdx, qword [0x0517c088]
mov rax, qword [rbp + 0x128]
mov rcx, rax
call rdx
mov rax, 0xffffffffffffffff
add rsp, 0x1b0
pop rbp
ret
Function at 0x401ac2
Capabilities:
Create process on windows
Create process suspended
Protect spawned processes with mitigation policies
Spoof parent pid

Disassembly:
push rbp
push rdi
push rbx
mov rbp, rsp
sub rsp, 0xd0
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
lea rdx, [rbp - 0x70]
mov eax, 0
mov ecx, 0xe
mov rdi, rdx
rep stosq qword [rdi], rax
mov rax, qword [rbp + 0x20]
mov qword [rax], 0
mov qword [rax + 8], 0
mov qword [rax + 0x10], 0
lea rax, [rbp - 0x78]
mov r9, rax
mov r8d, 0
mov edx, 2
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_InitializeProcThreadAttributeList]
call rax
mov rbx, qword [rbp - 0x78]
mov rax, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
call rax
mov r8, rbx
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_HeapAlloc]
call rax
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
lea rdx, [rbp - 0x78]
mov r9, rdx
mov r8d, 0
mov edx, 2
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_InitializeProcThreadAttributeList]
call rax
movabs rax, 0x100000000000
mov qword [rbp - 0x80], rax
mov rax, qword [rbp - 8]
lea rdx, [rbp - 0x80]
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 8
mov r9, rdx
mov r8d, 0x20007
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_UpdateProcThreadAttribute]
call rax
mov rax, qword [rbp - 8]
lea rdx, [rbp + 0x30]
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 8
mov r9, rdx
mov r8d, 0x20000
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_UpdateProcThreadAttribute]
call rax
mov dword [rbp - 0x70], 0x70
mov dword [rbp - 0x34], 0x80001
mov word [rbp - 0x30], 0
mov rax, qword [rbp + 0x28]
mov rdx, qword [rbp + 0x20]
mov qword [rsp + 0x48], rdx
lea rdx, [rbp - 0x70]
mov qword [rsp + 0x40], rdx
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x808000c
mov dword [rsp + 0x20], 1
mov r9d, 0
mov r8d, 0
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateProcessA]
call rax
test eax, eax
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_DeleteProcThreadAttributeList]
call rax
nop
mov rax, qword [rbp + 0x20]
add rsp, 0xd0
pop rbx
pop rdi
pop rbp
ret
Function at 0x415150
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 fcn.004214d0
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call fcn.004214d0
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]

Function at 0x4151c0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x0517c164]
mov r12, rcx
test ebx, ebx
jle 0x4152f0
mov rax, qword [0x0517c168]
xor ecx, ecx
add rax, 0x18
nop word [rax + rax]
mov rdx, qword [rax]
cmp rdx, r12
ja 0x41520c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x415293
add ecx, 1
add rax, 0x28
cmp ecx, ebx
jne 0x4151f0
mov rcx, r12
call fcn.00415b70
mov rsi, rax
test rax, rax
je 0x415312
mov rax, qword [0x0517c168]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call fcn.00415ca0
mov ecx, dword [rsi + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x0517c168]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x4152f7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x41528c
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x4152a0
add dword [0x0517c164], 1
add rsp, 0x50
pop rbx
pop rsi
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 rbx, qword [0x0517c168]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x41528c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.00415150
nop dword [rax]
xor ebx, ebx
jmp 0x415217
mov rax, qword [0x0517c168]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.00415150
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.00415150
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x4157e0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x0517c1c0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x0517c1a0]
test rbx, rbx
je 0x415834
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x41582b
test r12, r12
je 0x41582b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x415810
lea rcx, [0x0517c1c0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x415b70
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x05156540]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x415b90
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x415b98
ret
cmp word [r8 + 0x18], 0x20b
jne 0x415b90
movzx eax, word [r8 + 0x14]
sub rcx, rdx
movzx edx, word [r8 + 6]
lea rax, [r8 + rax + 0x18]
test edx, edx
je 0x415be5
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x415bdc
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x415b90
add rax, 0x28
cmp rax, r9
jne 0x415bc8
xor eax, eax
ret

Function at 0x415bf0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x05156540]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x415c10
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x415c18
mov eax, r8d
ret
cmp word [rax + 0x18], 0x20b
jne 0x415c10
movzx r8d, word [rax + 6]
mov eax, r8d
ret

Function at 0x415ca0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x05156540]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x415cc0
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x415cc8
mov rax, r8
ret
cmp word [rdx + 0x18], 0x20b
cmove r8, rax
mov rax, r8
ret

Function at 0x415ef0
Capabilities:
Allocate thread local storage

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov eax, dword [0x0517c1a8]
mov edi, ecx
mov rsi, rdx
test eax, eax
jne 0x415870
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
mov edx, 0x18
mov ecx, 1
call sub.msvcrt.dll_calloc
mov rbx, rax
test rax, rax
je 0x4158c3
mov dword [rax], edi
lea rcx, [0x0517c1c0]
mov qword [rax + 8], rsi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [0x0517c1a0]
lea rcx, [0x0517c1c0]
mov qword [0x0517c1a0], rbx
mov qword [rbx + 0x10], rax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
or eax, 0xffffffff
jmp 0x415866
push r12
push rbx
sub rsp, 0x28
mov rbx, rcx
mov r12, rdx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov ecx, eax
cmp eax, 0xffffffff
je 0x415f20
mov rdx, r12
mov dword [rbx], eax
add rsp, 0x28
pop rbx
pop r12
jmp 0x4218b0
add rsp, 0x28
pop rbx
pop r12
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
test rdx, rdx
jne 0x4218c0
xor eax, eax
ret
jmp 0x415850

Function at 0x415f60
Capabilities:
Get thread local storage value

Disassembly:
push r13
push r12
sub rsp, 0x28
mov r12d, ecx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, r12d
mov r13d, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, r13d
mov r12, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, r12
add rsp, 0x28
pop r12
pop r13
ret

Function at 0x415fa0
Capabilities:
Set thread local storage value

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x415fb8
xor eax, eax
add rsp, 0x28
ret
add rsp, 0x28
jmp qword [sym.imp.KERNEL32.dll_GetLastError]