joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14025f034
Capabilities:
Clear file content

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.140239920
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.140239920
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x14025f184
cmp rax, 0xffffffffffffffff
je 0x14025f184
xor edi, edi
test rbp, rbp
jle 0x14025f12f
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.14024b5b4
mov rbx, rax
test rax, rax
jne 0x14025f0bc
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x14025f125
mov edx, 0x8000
mov ecx, r14d
call fcn.140244a30
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.1402486c8
cmp eax, 0xffffffff
je 0x14025f105
cdqe
sub rbp, rax
test rbp, rbp
jg 0x14025f0cc
mov edx, r15d
mov ecx, r14d
call fcn.140244a30
jmp 0x14025f125
cmp byte [rsi + 0x38], dil
je 0x14025f11c
cmp dword [rsi + 0x34], 5
jne 0x14025f11c
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], reloc.WS2_32.dll_listen
cmp byte [rsi + 0x30], dil
je 0x14025f125
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.14024b634
jmp 0x14025f198
jns 0x14025f198
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.140239920
cmp rax, 0xffffffffffffffff
jne 0x14025f150
cmp byte [rsi + 0x30], dil
je 0x14025f198
mov edi, dword [rsi + 0x2c]
jmp 0x14025f198
mov ecx, r14d
call fcn.140253794
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x14025f198
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, reloc.WS2_32.dll_listen
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], reloc.WS2_32.dll_listen
jmp 0x14025f198
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x14025f191
mov eax, dword [rsi + 0x2c]
jmp 0x14025f196
mov eax, reloc.WLDAP32.dll_Ordinal_22
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.140239920
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret

Function at 0x140263458
Capabilities:
Get disk information

Disassembly:
push rbx
sub rsp, 0x30
mov rax, qword [0x1402ea100]
xor rax, rsp
mov qword [rsp + 0x28], rax
cmp ecx, 0x1a
jbe 0x1402634a2
call fcn.1402363cc
mov dword [rax], reloc.WS2_32.dll_ntohs
call fcn.1402363ec
mov dword [rax], reloc.WS2_32.dll_listen
call fcn.140230014
xor eax, eax
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.1401e3750
add rsp, 0x30
pop rbx
ret
xor ebx, ebx
test ecx, ecx
jne 0x1402634ad
lea eax, [rbx + 1]
jmp 0x14026348f
add cx, 0x40
mov dword [rsp + 0x22], 0x5c003a
mov word [rsp + 0x20], cx
lea rcx, [rsp + 0x20]
mov word [rsp + 0x26], bx
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
test eax, eax
je 0x14026348d
cmp eax, 1
setne bl
mov eax, ebx
jmp 0x14026348f
Function at 0x14026409c
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.1401f6728
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x140264126
cmp byte [rbp - 0x21], r15b
je 0x140264121
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x14026415c
call fcn.14024c368
test eax, eax
jne 0x140264148
cmp byte [rbp - 0x21], r15b
je 0x140264140
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x14026415c
cmp byte [rbp - 0x21], r15b
je 0x140264159
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.140233590
test eax, eax
jne 0x1402641fc
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.1401f6728
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x14026419b
cmp byte [rbp - 0x21], r15b
je 0x1402641d0
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x1402641d0
call fcn.14024c368
test eax, eax
jne 0x1402641bc
cmp byte [rbp - 0x21], r15b
je 0x1402641b5
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x1402641d0
cmp byte [rbp - 0x21], r15b
je 0x1402641cd
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.140233590
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x1402641fc
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x1402641ff
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x14026420d
mov rcx, rdi
call fcn.14024b634
cmp byte [rbp + 0x3f], r15b
je 0x14026421c
mov rcx, qword [rbp + 0x27]
call fcn.14024b634
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret

Function at 0x140266820
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140266848
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140266848
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x13fd653ac
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x13fd6519c
Function at 0x13fd67db4
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 0x13fd67e3b
mov rsi, rbx
cmp word [rax], bp
je 0x13fd67dfa
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x13fd67de4
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x13fd67de0
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.13fd687ac
mov rdi, rax
test rax, rax
je 0x13fd67e28
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.13fd62b40
mov rbp, rdi
xor ecx, ecx
call fcn.13fd66adc
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 0x1400010f0
Capabilities:
Enumerate files on windows
Get common file path

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x4a0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x490], rax
xor ebx, ebx
lea r9, [rsp + 0x20]
xor r8d, r8d
mov qword [rsp + 0x20], rbx
xor edx, edx
lea rcx, [0x140017480]
call qword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
xor edx, edx
mov word [rsp + 0x280], bx
mov r8d, 0x208
lea rcx, [rsp + 0x282]
call fcn.140015940
mov edx, 0x82
lea rax, [rsp + 0x280]
mov ecx, edx
nop dword [rax]
cmp word [rax], bx
je 0x14000116f
add rax, 2
sub rcx, 1
jne 0x140001160
mov rax, rdx
mov r9d, 0x7ffffffe
sub rax, rcx
test rcx, rcx
cmove rax, rbx
je 0x1400011d2
mov r8, rdx
lea rcx, [rsp + 0x280]
lea rcx, [rcx + rax*2]
sub r8, rax
je 0x1400011c4
mov r11, qword [rsp + 0x20]
mov eax, r9d
sub r11, rcx
test rax, rax
je 0x1400011c4
movzx r10d, word [r11 + rcx]
test r10w, r10w
je 0x1400011c4
mov word [rcx], r10w
dec rax
add rcx, 2
sub r8, 1
jne 0x1400011a3
test r8, r8
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], bx
mov rcx, rdx
lea rax, [rsp + 0x280]
nop dword [rax]
cmp word [rax], bx
je 0x1400011ef
add rax, 2
sub rcx, 1
jne 0x1400011e0
mov rax, rdx
sub rax, rcx
test rcx, rcx
cmove rax, rbx
je 0x14000124d
lea rcx, [rsp + 0x280]
lea rcx, [rcx + rax*2]
sub rdx, rax
je 0x14000123f
lea r8, [0x14001f9fc]
sub r8, rcx
nop dword [rax]
test r9, r9
je 0x14000123f
movzx eax, word [r8 + rcx]
test ax, ax
je 0x14000123f
mov word [rcx], ax
dec r9
add rcx, 2
sub rdx, 1
jne 0x140001220
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], bx
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x280]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x14000128d
nop dword [rax]
lea rdx, [rsp + 0x30]
mov rcx, rdi
inc ebx
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x140001270
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.ole32.dll_CoTaskMemFree]
cmp ebx, 2
lea eax, [rbx - 2]
cmovl eax, ebx
cmp eax, 0x14
setge al
mov rcx, qword [rsp + 0x490]
xor rcx, rsp
call fcn.140001d40
mov rbx, qword [rsp + 0x4b0]
add rsp, 0x4a0
pop rdi
ret
Function at 0x140001c40
Capabilities:
Allocate or change rwx memory
Read file on windows

Disassembly:
sub rsp, 0x78
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x60], rax
call fcn.1400013c0
test al, al
jne 0x140001c73
mov eax, 1
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140001d40
add rsp, 0x78
ret
mov qword [rsp + 0x30], 0
lea rcx, str.C:Windowswin.ini
mov dword [rsp + 0x28], 0x40000000
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
mov qword [rsp + 0x70], rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov edx, 0x40
mov r9d, 4
mov r8d, 0x3000
xor ecx, ecx
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
xorps xmm0, xmm0
lea rcx, [0x140001c30]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x40]
mov rcx, rbx
mov r8d, 0x20
mov rdx, rax
movups xmmword [rsp + 0x40], xmm0
movups xmmword [rsp + 0x50], xmm0
call qword [sym.imp.KERNEL32.dll_ReadFileEx]
mov edx, 0xffffffff
mov r8d, 1
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
mov rbx, qword [rsp + 0x70]
xor eax, eax
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140001d40
add rsp, 0x78
ret

Function at 0x140002720
Capabilities:
Parse pe header

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

Function at 0x140008578
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 0x1400085e7
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400085e7
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400085e7
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400085e7
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400085e7
cmp dword [rcx + 0x84], 0xe
jbe 0x1400085e7
cmp dword [rcx + 0xf8], 0
je 0x1400085e7
mov ecx, ebx
call fcn.140008698
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.140008474
nop
cmp dword [rbp + 0x20], 0
je 0x140008635
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140008640
int3
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
jmp 0x140008578

Function at 0x14000877c
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140008578
Function at 0x14000d94c
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x14000d97c
xor eax, eax
jmp 0x14000da3f
mov rbp, rbx
cmp word [rax], si
je 0x14000d9a1
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14000d988
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14000d984
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.14000d86c
movsxd r14, eax
test eax, eax
jne 0x14000d9df
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14000d975
mov rcx, r14
call fcn.14000a26c
mov rdi, rax
test rax, rax
jne 0x14000d9f8
xor ecx, ecx
call fcn.1400095f4
jmp 0x14000d9d4
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.14000d86c
test eax, eax
jne 0x14000da29
mov rcx, rdi
call fcn.1400095f4
jmp 0x14000da33
xor ecx, ecx
call fcn.1400095f4
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
Function at 0x140011d5c
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x140011d72
mov al, 1
jmp 0x140011dd2
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x140011d83
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x140011dd0
mov ecx, dword [rcx + 0x18]
nop
call fcn.14000e26c
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140011dd0
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140011dd0
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140011dd0
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x140011dd2
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x140012e10
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.1400078c0
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x140012e9a
cmp byte [rbp - 0x21], r15b
je 0x140012e95
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x140012ed0
call fcn.140009844
test eax, eax
jne 0x140012ebc
cmp byte [rbp - 0x21], r15b
je 0x140012eb4
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x140012ed0
cmp byte [rbp - 0x21], r15b
je 0x140012ecd
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.140007744
test eax, eax
jne 0x140012f70
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.1400078c0
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x140012f0f
cmp byte [rbp - 0x21], r15b
je 0x140012f44
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x140012f44
call fcn.140009844
test eax, eax
jne 0x140012f30
cmp byte [rbp - 0x21], r15b
je 0x140012f29
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x140012f44
cmp byte [rbp - 0x21], r15b
je 0x140012f41
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.140007744
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x140012f70
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x140012f73
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x140012f81
mov rcx, rdi
call fcn.1400095f4
cmp byte [rbp + 0x3f], r15b
je 0x140012f90
mov rcx, qword [rbp + 0x27]
call fcn.1400095f4
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret

Function at 0x140015500
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140015528
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140015528
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140004600
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.14000a2c0
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.14000a2c0
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 0x140004670
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140011284]
mov rbx, rcx
test esi, esi
jle 0x1400047a0
mov rax, qword [0x140011288]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400046bb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140004745
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x1400046a0
mov rcx, rbx
call fcn.1400050c0
mov rdi, rax
test rax, rax
je 0x1400047c2
mov rax, qword [0x140011288]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.140005200
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140011288]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1400047a7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14000473e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140004750
add dword [0x140011284], 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 [0x140011288]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000473e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140004600
nop dword [rax]
xor esi, esi
jmp 0x1400046c8
mov rax, qword [0x140011288]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140004600
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.140004600
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140004d30
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x1400112e0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400112c0]
test rbx, rbx
je 0x140004d8c
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 0x140004d83
test rsi, rsi
je 0x140004d83
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140004d68
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 0x1400050c0
Capabilities:
Enumerate pe sections
Parse pe header

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

Function at 0x140005140
Capabilities:
Parse pe header

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

Function at 0x140005200
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14000cac0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14000521f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140005228
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x140001108
Capabilities:
Create thread

Disassembly:
push rbx
sub rsp, 0x50
mov rbx, rdx
lea rcx, [rsp + 0x40]
lea rdx, [0x140001880]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea rcx, [rsp + 0x40]
call qword [sym.imp.ntoskrnl.exe_MmGetSystemRoutineAddress]
test rax, rax
jne 0x14000113a
mov eax, 0xc0000001
jmp 0x140001171
mov qword [rsp + 0x30], rbx
lea rcx, [rsp + 0x70]
mov qword [rsp + 0x28], rax
xor r9d, r9d
and qword [rsp + 0x20], 0
xor r8d, r8d
mov edx, 0x1fffff
call qword [sym.imp.ntoskrnl.exe_PsCreateSystemThread]
test eax, eax
js 0x140001171
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
xor eax, eax
add rsp, 0x50
pop rbx
ret

Function at 0x140001694
Capabilities:
Find process by pid

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x50
mov rdi, r9
mov rbx, r8
mov rsi, rdx
test ecx, ecx
jne 0x1400016b7
mov eax, 0xc000000d
jmp 0x14000172c
and qword [rsp + 0x40], 0
lea rdx, [rsp + 0x40]
movsxd rcx, ecx
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
test eax, eax
js 0x140001727
and qword [rsp + 0x48], 0
call qword [sym.imp.ntoskrnl.exe_IoGetCurrentProcess]
mov rcx, qword [rsp + 0x40]
mov r9, rbx
mov r8, rax
mov rdx, rsi
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x28], 1
mov qword [rsp + 0x20], rdi
call sub.ntoskrnl.exe_MmCopyVirtualMemory
mov rcx, qword [rsp + 0x40]
mov ebx, eax
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
test ebx, ebx
js 0x140001727
mov rax, qword [rsp + 0x48]
sub rax, rdi
neg rax
sbb eax, eax
and eax, 0xc0000001
jmp 0x14000172c
mov eax, 0xc0000001
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x50
pop rdi
ret

Function at 0x14000173c
Capabilities:
Find process by pid

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
push rdi
sub rsp, 0x50
and qword [rax - 0x18], 0
mov rsi, rdx
lea rdx, [rax - 0x18]
movsxd rcx, ecx
mov rdi, r9
mov rbx, r8
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
test eax, eax
js 0x1400017c3
and qword [rsp + 0x48], 0
call qword [sym.imp.ntoskrnl.exe_IoGetCurrentProcess]
mov r8, qword [rsp + 0x40]
mov r9, rsi
mov rcx, rax
mov rdx, rbx
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x28], 1
mov qword [rsp + 0x20], rdi
call sub.ntoskrnl.exe_MmCopyVirtualMemory
mov rcx, qword [rsp + 0x40]
mov ebx, eax
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
test ebx, ebx
js 0x1400017c3
mov rax, qword [rsp + 0x48]
sub rax, rdi
neg rax
sbb eax, eax
and eax, 0xc0000001
jmp 0x1400017c8
mov eax, 0xc0000001
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x50
pop rdi
ret