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

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
mov eax, 0x70
call fcn.140005800
sub rsp, rax
movaps xmmword [rsp + 0x60], xmm6
mov rax, qword [0x14002fdc0]
xor rax, rsp
mov qword [rsp + 0x58], rax
xor ebp, ebp
movaps xmm6, xmm2
mov dword [rsp + 0x40], ebp
mov esi, edx
mov edi, ecx
call fcn.140004480
mov rdx, rax
lea r8, str..pipeNeuroData
lea rcx, str._s___Wait_for_pipe__s_..._n
call fcn.140003d90
mov edx, 0xffffffff
lea rcx, str..pipeNeuroData
call qword [sym.imp.KERNEL32.dll_WaitNamedPipeA]
call fcn.140004480
mov rdx, rax
lea r8, str..pipeNeuroData
lea rcx, str._s___Open_pipe__s_..._n
call fcn.140003d90
mov qword [rsp + 0x30], rbp
lea r8d, [rbp + 2]
mov dword [rsp + 0x28], ebp
lea rcx, str..pipeNeuroData
xor r9d, r9d
mov dword [rsp + 0x20], 3
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x140002a28
lea r8d, [rbp + 1]
lea rdx, str.No_pipe_found
lea rcx, str.CreatePipe
call fcn.140004b20
lea r9, [rsp + 0x40]
movsd qword [rsp + 0x50], xmm6
mov r8d, 0x10
mov dword [rsp + 0x48], edi
lea rdx, [rsp + 0x48]
mov dword [rsp + 0x4c], esi
mov rcx, rbx
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [rsp + 0x40], 0x10
je 0x140002a74
mov r8d, 1
lea rdx, str.Pipe_closed
lea rcx, str.WritePipe
call fcn.140004b20
cmp edi, 1
jne 0x140002a81
mov rcx, rbx
call fcn.140002ab0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140005860
mov rbx, qword [rsp + 0xa8]
movaps xmm6, xmmword [rsp + 0x60]
add rsp, 0x70
pop rdi
pop rsi
pop rbp
ret
Function at 0x140004b20
Capabilities:
Accept command line arguments

Disassembly:
push rbp
push rsi
push rdi
mov eax, 0xc0
call fcn.140005800
sub rsp, rax
mov rax, qword [0x14002fdc0]
xor rax, rsp
mov qword [rsp + 0xb0], rax
cmp dword [0x14002f520], 0
mov ebp, r8d
mov rdi, rdx
mov rsi, rcx
je 0x140004d31
mov qword [rsp + 0xf0], rbx
lea rcx, [rsp + 0x60]
mov qword [rsp + 0xf8], r14
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx ecx, word [rsp + 0x6c]
movzx edx, word [rsp + 0x6a]
movzx r8d, word [rsp + 0x68]
movzx eax, word [rsp + 0x6e]
movzx r10d, word [rsp + 0x66]
movzx r11d, word [rsp + 0x62]
movzx r9d, word [rsp + 0x60]
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x40], ecx
lea rcx, [rsp + 0x70]
mov dword [rsp + 0x38], edx
mov edx, 0x40
mov dword [rsp + 0x30], r8d
lea r8, str._4.4d._2.2d._2.2d__2.2d:_2.2d:_2.2d._3.3d
mov dword [rsp + 0x28], r10d
mov dword [rsp + 0x20], r11d
call fcn.140004d70
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jne 0x140004be2
test ebp, ebp
mov eax, 1
cmovne ebx, eax
call fcn.140005380
lea rcx, [0x140022cc4]
call fcn.140004380
mov r8d, ebx
lea rcx, [0x140022cc8]
mov edx, ebx
call fcn.140004380
lea rdx, [rsp + 0x70]
lea rcx, str._Date:_______s_n
call fcn.140004380
call fcn.1400052f0
mov rdx, rax
lea rcx, str._Imagename:___s__n
call fcn.140004380
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov rdx, rax
lea rcx, str._Command:_____s__n
call fcn.140004380
lea rax, [rsp + 0x50]
mov dword [rsp + 0x58], 0xff
xor r14d, r14d
lea rdx, [rsp + 0x58]
mov qword [rsp + 0x30], r14
mov r9d, 0x400
mov dword [rsp + 0x28], 0x100
mov r8d, ebx
mov ecx, 0x1100
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
test eax, eax
jle 0x140004cee
mov rdx, qword [rsp + 0x50]
test rdx, rdx
je 0x140004cee
movzx ecx, word [rdx]
mov rax, rdx
test cx, cx
je 0x140004cb5
cmp cx, 0xa
je 0x140004c9e
cmp cx, 0xd
jne 0x140004ca3
mov word [rax], 0x20
movzx ecx, word [rax + 2]
add rax, 2
test cx, cx
jne 0x140004c92
mov rdx, qword [rsp + 0x50]
cmp word [rax - 2], 0x20
jne 0x140004cc6
mov word [rax - 2], r14w
mov rdx, qword [rsp + 0x50]
cmp word [rax - 4], 0x20
jne 0x140004cd7
mov word [rax - 4], r14w
mov rdx, qword [rsp + 0x50]
lea rcx, str._Message:_____s__n
call fcn.140004380
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_LocalFree]
cmp word [rsi], 0
mov r14, qword [rsp + 0xf8]
je 0x140004d0b
mov rdx, rsi
lea rcx, str._Function:____s__n
call fcn.140004380
cmp word [rdi], 0
je 0x140004d20
mov rdx, rdi
lea rcx, str._Parameter:___s__n
call fcn.140004380
test ebp, ebp
jne 0x140004d4e
call fcn.140005440
mov rbx, qword [rsp + 0xf0]
xor eax, eax
mov rcx, qword [rsp + 0xb0]
xor rcx, rsp
call fcn.140005860
add rsp, 0xc0
pop rdi
pop rsi
pop rbp
ret
lea rcx, str._Status:_____Program_aborted___n
call fcn.140004380
mov ecx, ebx
call fcn.1400130d8
int3
Function at 0x140004dd0
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov edx, dword [0x14002f530]
lea r11, [0x1400320a0]
cmp edx, 0x270
jb 0x140004ed5
jbe 0x140004e22
mov edx, 0x1571
lea r9, [0x140032a60]
xor r8d, r8d
mov rcx, r11
nop dword [rax]
mov eax, edx
mov dword [rcx], edx
shr eax, 0x1e
add rcx, 4
xor eax, edx
lea edx, [r8 + 1]
imul eax, eax, 0x6c078965
lea r8d, [r8 + 1]
add edx, eax
cmp rcx, r9
jl 0x140004e00
mov r8, r11
lea r10, [0x14003242c]
lea r9, [0x14002f528]
mov edx, dword [r8 + 4]
mov ecx, edx
xor edx, dword [r8]
and ecx, 1
and edx, 0x7ffffffe
xor edx, dword [r8]
shr edx, 1
xor edx, dword [r9 + rcx*4]
xor edx, dword [r8 + 0x634]
mov dword [r8], edx
add r8, 4
cmp r8, r10
jl 0x140004e33
lea r8, [0x14003242c]
lea r10, [0x140032a5c]
nop
mov edx, dword [r8 + 4]
mov ecx, edx
xor edx, dword [r8]
and ecx, 1
and edx, 0x7ffffffe
xor edx, dword [r8]
shr edx, 1
xor edx, dword [r9 + rcx*4]
xor edx, dword [r8 - 0x38c]
mov dword [r8], edx
add r8, 4
cmp r8, r10
jl 0x140004e70
mov ecx, dword [0x140032a5c]
mov eax, dword [0x1400320a0]
and ecx, 0x80000001
and eax, 0x7ffffffe
or ecx, eax
mov rax, qword [0x1400320a0]
shr ecx, 1
and eax, 1
xor ecx, dword [r9 + rax*4]
xor ecx, dword [0x1400326d0]
mov dword [0x140032a5c], ecx
xor edx, edx
mov eax, edx
inc edx
mov dword [0x14002f530], edx
mov ecx, dword [r11 + rax*4]
mov eax, ecx
shr eax, 0xb
xor ecx, eax
mov eax, ecx
and eax, 0xff3a58ad
shl eax, 7
xor ecx, eax
mov eax, ecx
and eax, 0xffffdf8c
shl eax, 0xf
xor ecx, eax
mov eax, ecx
shr eax, 0x12
xor eax, ecx
ret
Function at 0x140004f10
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
mov eax, 0x20
call fcn.140005800
sub rsp, rax
mov rbx, rcx
test rcx, rcx
jne 0x140004f6e
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
call fcn.1400054c0
mov rbx, rax
call fcn.140005480
imul ebx, eax
imul ebx, dword [rsp + 0x30]
imul edi, ebx, 0x28105417
call fcn.1400054c0
mov rbx, rax
call fcn.140005480
imul ebx, eax
imul ebx, dword [rsp + 0x34]
imul ecx, ebx, 0x3105317
jmp 0x140004f8f
call fcn.1400054b0
imul edi, eax, 0x28105417
mov rcx, rbx
btc edi, 0x1f
call fcn.1400054a0
imul ecx, eax, 0x3105317
btc ecx, 0x1f
xor edx, edx
lea r10, [0x1400320a0]
nop dword [rax + rax]
mov dword [r10 + rdx*4], edi
lea rax, [rdx + 4]
mov dword [r10 + rdx*4 + 4], ecx
imul edi, edi, 0x11
imul ecx, ecx, 0x13
mov dword [r10 + rdx*4 + 8], edi
mov dword [r10 + rdx*4 + 0xc], ecx
mov rdx, rax
cmp rax, 0x270
jl 0x140004fa0
mov eax, 0x270
lea rbx, [0x140032a60]
mov edx, eax
lea r11, [0x14002f528]
mov ecx, eax
lea rdi, [0x140032a5c]
mov r9d, 0x26f5
nop dword [rax]
cmp eax, 0x270
jb 0x1400050e7
cmp edx, 0x270
jbe 0x140005032
mov edx, 0x1571
xor r8d, r8d
mov rcx, r10
nop
mov eax, edx
mov dword [rcx], edx
shr eax, 0x1e
add rcx, 4
xor eax, edx
lea edx, [r8 + 1]
imul eax, eax, 0x6c078965
lea r8d, [r8 + 1]
add edx, eax
cmp rcx, rbx
jl 0x140005010
xor r8d, r8d
nop word [rax + rax]
mov edx, dword [r10 + r8*4 + 4]
mov ecx, dword [r10 + r8*4]
xor ecx, edx
and edx, 1
and ecx, 0x7ffffffe
xor ecx, dword [r10 + r8*4]
shr ecx, 1
xor ecx, dword [r11 + rdx*4]
xor ecx, dword [r10 + r8*4 + 0x634]
mov dword [r10 + r8*4], ecx
inc r8
cmp r8, 0xe3
jl 0x140005040
lea rax, [r10 + r8*4]
nop word [rax + rax]
mov edx, dword [rax + 4]
mov r8d, edx
xor r8d, dword [rax]
and edx, 1
and r8d, 0x7ffffffe
xor r8d, dword [rax]
shr r8d, 1
xor r8d, dword [r11 + rdx*4]
xor r8d, dword [rax - 0x38c]
mov dword [rax], r8d
add rax, 4
cmp rax, rdi
jl 0x140005080
mov ecx, dword [0x140032a5c]
mov eax, dword [0x1400320a0]
and ecx, 0x80000001
and eax, 0x7ffffffe
or ecx, eax
mov rax, qword [0x1400320a0]
shr ecx, 1
and eax, 1
xor ecx, dword [r11 + rax*4]
xor ecx, dword [0x1400326d0]
mov dword [0x140032a5c], ecx
xor ecx, ecx
lea eax, [rcx + 1]
mov edx, eax
mov ecx, eax
sub r9, 1
jne 0x140004ff0
mov rbx, qword [rsp + 0x38]
mov dword [0x14002f530], eax
xor eax, eax
add rsp, 0x20
pop rdi
ret
Function at 0x140005380
Capabilities:
Check mutex on windows

Disassembly:
mov eax, 0x78
call fcn.140005800
sub rsp, rax
mov rax, qword [0x14002fdc0]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov rax, qword [0x140030918]
test rax, rax
jne 0x1400053ff
call fcn.140005480
mov r9d, eax
lea r8, str._8.8x_ss_lock_pr
mov edx, 0x40
lea rcx, [rsp + 0x20]
call fcn.140004d70
lea r8, [rsp + 0x20]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [0x140030918], rax
test rax, rax
jne 0x1400053ff
lea r8d, [rax + 1]
lea rdx, str.CreateMutex
lea rcx, str.ss_lock_pr
call fcn.140004b20
mov rax, qword [0x140030918]
mov edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x14000542b
mov r8d, 1
lea rdx, [0x140022f18]
lea rcx, str.ss_lock_pr
call fcn.140004b20
xor eax, eax
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140005860
add rsp, 0x78
ret

Function at 0x140005fa4
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140005fee
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140005fee
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140005fee
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140005fee
cmp dword [rcx + 0x84], 0xe
jbe 0x140005fee
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140005ff0
xor al, al
add rsp, 0x28
ret

Function at 0x1400130d8
Capabilities:
Parse pe header

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x140012f43
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140012f43
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140012f43
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140012f43
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140012f43
cmp dword [rcx + 0x84], 0xe
jbe 0x140012f43
cmp dword [rcx + 0xf8], 0
je 0x140012f43
mov ecx, ebx
call fcn.140012ff4
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.140012dd0
nop
cmp dword [rbp + 0x20], 0
je 0x140012f91
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140012f9c
int3
xor r8d, r8d
xor edx, edx
jmp 0x140012ed4
Function at 0x140018da4
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x140018e2b
mov rsi, rbx
cmp word [rax], bp
je 0x140018dea
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x140018dd4
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x140018dd0
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.1400155a8
mov rdi, rax
test rax, rax
je 0x140018e18
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140020c30
mov rbp, rdi
xor ecx, ecx
call fcn.140014974
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14001cc30
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x14001cc46
mov al, 1
jmp 0x14001cca6
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x14001cc57
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x14001cca4
mov ecx, dword [rcx + 0x18]
nop
call fcn.140019548
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14001cca4
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14001cca4
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x14001cca4
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x14001cca6
xor al, al
add rsp, 0x20
pop rbx
ret

Function at 0x14001e39c
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x1400315a0]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x14001e3f3
cmp word [rdx], r13w
jne 0x14001e3f3
or byte [rax + rdi*8 + 0x38], cl
jmp 0x14001e3f8
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x14001e51d
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x14001e53e
lea r9, [rdx + 2]
cmp cx, r11w
je 0x14001e431
mov rdx, r9
mov word [rbx], cx
jmp 0x14001e458
cmp r9, r8
jae 0x14001e468
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x14001e412
jmp 0x14001e51d
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14001e512
cmp dword [rsp + 0x80], esi
je 0x14001e512
lea r8, [0x1400315a0]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x14001e4ea
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x14001e4ba
mov word [rbx], r13w
jmp 0x14001e51a
mov ecx, 0xd
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x14001e4c7
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x14001e51a
cmp word [rsp + 0x70], r13w
jne 0x14001e4f7
cmp rbx, r14
je 0x14001e4b4
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.14001e2f8
cmp word [rsp + 0x70], r13w
je 0x14001e51d
mov ecx, 0xd
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x1400315a0]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x14001e517
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x14001e51d
Function at 0x140020450
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140020478
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140020478
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140001450
Capabilities:
Execute syscall

Disassembly:
pop rax
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x28
mov rcx, r10
call fcn.140002ce0
add rsp, 0x28
mov rcx, qword [rsp + 8]
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x18]
mov r9, qword [rsp + 0x20]
mov r10, rcx
syscall
ret

Function at 0x140001ab0
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 sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call fcn.140002900
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop
nop dword [rax]

Function at 0x140001b20
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140009094]
test esi, esi
mov rbx, rcx
jle 0x140001c50
mov rax, qword [0x140009098]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140001b6b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001bf5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140001b50
mov rcx, rbx
call fcn.140002590
test rax, rax
mov rdi, rax
je 0x140001c72
mov rax, qword [0x140009098]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.1400026d0
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140009098]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001c57
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140001bee
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001c00
add dword [0x140009094], 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 [0x140009098]
mov r9, rbx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001bee
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140001ab0
nop dword [rax]
xor esi, esi
jmp 0x140001b78
mov rax, qword [0x140009098]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [rdi + 8]
mov r8, qword [rax + rbx + 0x18]
call fcn.140001ab0
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.140001ab0
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x1400021e0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140009100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400090e0]
test rbx, rbx
je 0x14000223c
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x140002233
test rsi, rsi
je 0x140002233
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140002218
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 0x140002450
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call qword [rax]
nop
nop
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
call qword [rax]
nop
nop
nop
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140002488
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140002490
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x140002460
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call qword [rax]
nop
nop
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
call qword [rax]
nop
nop
nop
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140002488
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140002490
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x140002470
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
call qword [rax]
nop
nop
sub rsp, 0x28
mov rax, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
call qword [rax]
nop
nop
nop
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140002488
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140002490
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

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

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

Function at 0x140002610
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140006960]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x14000262f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140002638
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x14000262f
movzx ecx, word [rax + 6]
mov eax, ecx
ret
Function at 0x1400026d0
Capabilities:
Parse pe header

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

Function at 0x1400028b0
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x28
mov r8d, 0x2c
mov ecx, 2
lea rdx, str._stack_smashing_detected_:_terminated_n
call sub.api_ms_win_crt_stdio_l1_1_0.dll__write
mov ecx, 0x17
call sub.KERNEL32.dll_IsProcessorFeaturePresent
test eax, eax
je 0x1400028e0
mov ecx, 2
int 0x29
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop

Function at 0x140002d50
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp dword [0x140004200], 0
je 0x140002d6f
mov edx, 1
jmp 0x140002eae
mov rax, qword gs:[0x60]
mov rax, qword [rax + 0x18]
xor edx, edx
mov rcx, qword [rax + 0x10]
xor eax, eax
mov r11, qword [rcx + 0x30]
test r11, r11
je 0x140002dd3
movsxd rdx, dword [r11 + 0x3c]
mov edx, dword [r11 + rdx + 0x88]
test edx, edx
je 0x140002dcb
lea rax, [rdx + r11]
mov edx, dword [rax + 0xc]
add rdx, r11
mov r8d, dword [rdx]
or r8d, 0x20202020
cmp r8d, 0x6c64746e
jne 0x140002dcb
mov edx, dword [rdx + 4]
or edx, 0x20202020
cmp edx, 0x6c642e6c
je 0x140002dd6
mov rcx, qword [rcx]
mov rdx, r11
jmp 0x140002d84
mov r11, rdx
xor edx, edx
test rax, rax
je 0x140002eae
mov ebp, dword [rax + 0x1c]
lea r13, [0x140004204]
xor r10d, r10d
mov esi, dword [rax + 0x24]
mov edx, dword [rax + 0x18]
mov eax, dword [rax + 0x20]
add rbp, r11
add rsi, r11
lea ebx, [rdx - 1]
add rax, r11
lea rdi, [rax + rbx*4]
add rbx, rbx
add rbx, rsi
mov ecx, dword [rdi]
add rcx, r11
cmp word [rcx], 0x775a
jne 0x140002e42
mov eax, r10d
inc r10d
lea r12, [r13 + rax*8]
call fcn.140002d20
cmp r10d, 0x1f4
mov dword [r12], eax
movzx eax, word [rbx]
mov eax, dword [rbp + rax*4]
mov dword [r12 + 4], eax
je 0x140002e54
lea rax, [rbx - 2]
sub rdi, 4
cmp rsi, rbx
je 0x140002e54
mov rbx, rax
jmp 0x140002e0d
mov dword [0x140004200], r10d
lea r11, [0x140004204]
dec r10d
test r10d, r10d
je 0x140002d65
lea rax, [0x140004200]
xor edx, edx
lea ecx, [rdx + 1]
mov r8d, dword [rax + 8]
mov rdx, rcx
lea rcx, [r11 + rcx*8]
mov r9d, dword [rcx + 4]
cmp r9d, r8d
jae 0x140002ea0
mov ebx, dword [rax + 4]
mov esi, dword [rcx]
mov dword [rax + 8], r9d
mov dword [rax + 4], esi
mov dword [rcx], ebx
mov dword [rcx + 4], r8d
add rax, 8
cmp edx, r10d
jb 0x140002e77
dec r10d
jmp 0x140002e65
mov eax, edx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret