joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001100
Capabilities:
Encrypt data using aes via x86 extensions

Disassembly:
sub rsp, 0x58
movaps xmmword [rsp + 0x40], xmm10
movaps xmmword [rsp + 0x30], xmm9
movaps xmmword [rsp + 0x20], xmm8
movaps xmmword [rsp + 0x10], xmm7
movaps xmmword [rsp], xmm6
aesimc xmm0, xmmword [rdx + 0x10]
aesimc xmm1, xmmword [rdx + 0x20]
aesimc xmm2, xmmword [rdx + 0x30]
aesimc xmm3, xmmword [rdx + 0x40]
aesimc xmm4, xmmword [rdx + 0x50]
aesimc xmm5, xmmword [rdx + 0x60]
aesimc xmm6, xmmword [rdx + 0x70]
aesimc xmm7, xmmword [rdx + 0x80]
aesimc xmm8, xmmword [rdx + 0x90]
mov rax, rcx
movaps xmm9, xmmword [rdx]
movaps xmm10, xmmword [rdx + 0xa0]
movaps xmmword [rcx], xmm9
movdqa xmmword [rcx + 0x10], xmm0
movdqa xmmword [rcx + 0x20], xmm1
movdqa xmmword [rcx + 0x30], xmm2
movdqa xmmword [rcx + 0x40], xmm3
movdqa xmmword [rcx + 0x50], xmm4
movdqa xmmword [rcx + 0x60], xmm5
movdqa xmmword [rcx + 0x70], xmm6
movdqa xmmword [rcx + 0x80], xmm7
movdqa xmmword [rcx + 0x90], xmm8
movaps xmmword [rcx + 0xa0], xmm10
movaps xmm6, xmmword [rsp]
movaps xmm7, xmmword [rsp + 0x10]
movaps xmm8, xmmword [rsp + 0x20]
movaps xmm9, xmmword [rsp + 0x30]
movaps xmm10, xmmword [rsp + 0x40]
add rsp, 0x58
ret
Function at 0x140002dae
Capabilities:
Delete file

Disassembly:
mov rax, qword [rcx]
mov rdx, qword [rcx + 8]
mov rcx, rax
jmp 0x1400176c0
push rsi
push rdi
push rbx
sub rsp, 0x50
mov r8, rdx
mov rdx, rcx
lea rcx, [rsp + 0x20]
call fcn.140020650
mov rax, qword [rsp + 0x20]
mov rsi, qword [rsp + 0x28]
test rax, rax
je 0x140017775
mov rcx, qword [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x30], rcx
lea rcx, [rsp + 0x38]
lea rdx, [rsp + 0x20]
mov r8b, 1
call fcn.140018cf0
mov rdi, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
test rdi, rdi
je 0x140017775
mov rcx, rdi
call qword [sym.imp.kernel32.dll_DeleteFileW]
test eax, eax
je 0x140017749
test rsi, rsi
je 0x140017745
add rsi, rsi
mov r8d, 2
mov rcx, rdi
mov rdx, rsi
call fcn.140002d20
xor esi, esi
jmp 0x140017775
call qword [sym.imp.kernel32.dll_GetLastError]
mov ebx, eax
shl rbx, 0x20
or rbx, 2
test rsi, rsi
je 0x140017772
add rsi, rsi
mov r8d, 2
mov rcx, rdi
mov rdx, rsi
call fcn.140002d20
mov rsi, rbx
mov rax, rsi
add rsp, 0x50
pop rbx
pop rdi
pop rsi
ret
Function at 0x14000d5a0
Capabilities:
Get common file path

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x478
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x3f0], 0xfffffffffffffffe
mov qword [rbp + 0x3e0], rcx
mov qword [rbp + 0x3c8], 2
xorps xmm0, xmm0
movups xmmword [rbp + 0x3d0], xmm0
mov r8d, 0x200
mov eax, 2
mov qword [rbp + 0x3e8], rax
xor edi, edi
xor ebx, ebx
xor r12d, r12d
cmp r8, 0x201
jae 0x14000d630
jmp 0x14000d61f
jae 0x14000d6f0
cmp r8, 0x201
jae 0x14000d630
mov esi, 0x200
lea r13, [rbp - 0x58]
mov r15, r8
jmp 0x14000d688
sub r8, r12
sub rbx, r12
cmp rbx, r8
jae 0x14000d65f
lea rcx, [rbp + 0x3c8]
mov rdx, r12
call fcn.14003d1a0
mov rax, qword [rbp + 0x3c8]
mov qword [rbp + 0x3e8], rax
mov rdi, qword [rbp + 0x3d0]
mov eax, 0xffffffff
cmp rdi, rax
mov r12d, 0xffffffff
cmovb r12, rdi
mov qword [rbp + 0x3d8], r12
mov rbx, rdi
mov rsi, r12
mov r13, qword [rbp + 0x3e8]
mov r15, r12
xor ecx, ecx
call qword [sym.imp.kernel32.dll_SetLastError]
mov ecx, r15d
mov rdx, r13
call qword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
mov r14d, eax
test eax, eax
jne 0x14000d6b1
call qword [sym.imp.kernel32.dll_GetLastError]
test eax, eax
jne 0x14000d758
mov r8d, r14d
cmp r15, r8
jne 0x14000d610
call qword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0x7a
jne 0x14000d77b
add r15, r15
mov eax, 0xffffffff
cmp r15, rax
cmovae r15, rax
mov r8, r15
cmp r8, 0x201
jb 0x14000d61f
jmp 0x14000d630
cmp rsi, r8
jb 0x14000d795
lea rcx, [rbp + 0x3a8]
mov rdx, r13
call fcn.140010350
movups xmm0, xmmword [rbp + 0x3a8]
movups xmm1, xmmword [rbp + 0x3b8]
mov rsi, qword [rbp + 0x3e0]
movups xmmword [rsi + 0x10], xmm1
movups xmmword [rsi], xmm0
test rdi, rdi
je 0x14000d741
add rdi, rdi
mov r8d, 2
mov rcx, qword [rbp + 0x3e8]
mov rdx, rdi
call fcn.140002d20
mov rax, rsi
add rsp, 0x478
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
call qword [sym.imp.kernel32.dll_GetLastError]
shl rax, 0x20
or rax, 2
mov rsi, qword [rbp + 0x3e0]
mov qword [rsi], rax
mov byte [rsi + 0x18], 2
test rdi, rdi
jne 0x14000d729
jmp 0x14000d741
lea rcx, str.internal_error:_entered_unreachable_code_
lea r8, str.library_std_src_syswindowsmod.rs
mov edx, 0x28
call fcn.14003deb0
jmp 0x14000d7aa
lea rax, str.library_std_src_syswindowsmod.rs
mov rcx, r8
mov rdx, rsi
mov r8, rax
call fcn.14003e300
ud2
Function at 0x140013c60
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
mov eax, 0x1098
call fcn.14002eb20
sub rsp, rax
lea rbp, [rsp + 0x80]
movaps xmmword [rbp + 0x1000], xmm6
mov qword [rbp + 0xff8], 0xfffffffffffffffe
mov qword [rbp + 0xfd8], rdx
mov rbx, rcx
lea rsi, [rbp - 0x50]
mov r8d, 0x1000
mov rcx, rsi
xor edx, edx
call fcn.14002fa40
mov dword [rbp + 0xfec], 0
xorps xmm6, xmm6
movaps xmmword [rbp + 0xfb0], xmm6
mov qword [rbp + 0xfc0], 0
lea r14, [rbp + 0xfec]
mov qword [rbp + 0xfc8], r14
lea r15, [0x140019cf0]
mov qword [rsp + 0x20], r15
lea r9, [rbp + 0xfb0]
mov rcx, rbx
mov rdx, rsi
mov r8d, 0x1000
call qword [sym.imp.kernel32.dll_ReadFileEx]
test eax, eax
je 0x140013e51
mov r12, qword [sym.imp.kernel32.dll_SleepEx]
lea rsi, [rbp + 0xfb0]
mov r13, qword [sym.imp.kernel32.dll_WriteFileEx]
mov qword [rbp + 0xfe0], rbx
mov ecx, 0xffffffff
mov edx, 1
call r12
cmp dword [rbp + 0xfec], 0
je 0x140013d27
cmp dword [rbp + 0xff0], 0
jne 0x140013e66
mov eax, dword [rbp + 0xff4]
test rax, rax
je 0x140013e66
cmp eax, 0x1000
ja 0x140013eb1
xor ebx, ebx
nop word cs:[rax + rax]
cmp rbx, rax
ja 0x140013e96
lea rdx, [rbx + rbp]
add rdx, 0xffffffffffffffb0
mov rdi, rax
mov r8d, eax
sub r8d, ebx
mov dword [rbp + 0xfec], 0
movaps xmmword [rbp + 0xfb0], xmm6
mov qword [rbp + 0xfc0], 0
mov qword [rbp + 0xfc8], r14
mov qword [rsp + 0x20], r15
mov rcx, qword [rbp + 0xfd8]
mov r9, rsi
call r13
test eax, eax
je 0x140013e59
nop word [rax + rax]
mov ecx, 0xffffffff
mov edx, 1
call r12
cmp dword [rbp + 0xfec], 0
je 0x140013dd0
cmp dword [rbp + 0xff0], 0
jne 0x140013e5f
mov eax, dword [rbp + 0xff4]
add rbx, rax
mov rax, rdi
cmp rbx, rdi
jne 0x140013d70
mov dword [rbp + 0xfec], 0
movaps xmmword [rbp + 0xfb0], xmm6
mov qword [rbp + 0xfc0], 0
mov qword [rbp + 0xfc8], r14
mov qword [rsp + 0x20], r15
mov rbx, qword [rbp + 0xfe0]
mov rcx, rbx
lea rdx, [rbp - 0x50]
mov r8d, 0x1000
mov r9, rsi
call qword [sym.imp.kernel32.dll_ReadFileEx]
test eax, eax
jne 0x140013d27
call qword [sym.imp.kernel32.dll_GetLastError]
jmp 0x140013e66
call qword [sym.imp.kernel32.dll_GetLastError]
mov rbx, qword [rbp + 0xfe0]
mov rsi, qword [sym.imp.kernel32.dll_CloseHandle]
mov rcx, rbx
call rsi
mov rcx, qword [rbp + 0xfd8]
call rsi
movaps xmm6, xmmword [rbp + 0x1000]
add rsp, 0x1098
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea r8, str.library_std_src_syswindowspipe.rs
mov rcx, rbx
mov qword [rbp + 0xfd0], rax
mov rdx, rax
call fcn.14003e380
jmp 0x140013ecc
lea r8, str.library_std_src_syswindowspipe.rs
mov edx, 0x1000
mov qword [rbp + 0xfd0], rax
mov rcx, rax
call fcn.14003e300
ud2
Function at 0x1400176c0
Capabilities:
Delete file

Disassembly:
mov rax, qword [rcx]
mov rdx, qword [rcx + 8]
mov rcx, rax
jmp 0x1400176c0
push rsi
push rdi
push rbx
sub rsp, 0x50
mov r8, rdx
mov rdx, rcx
lea rcx, [rsp + 0x20]
call fcn.140020650
mov rax, qword [rsp + 0x20]
mov rsi, qword [rsp + 0x28]
test rax, rax
je 0x140017775
mov rcx, qword [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x30], rcx
lea rcx, [rsp + 0x38]
lea rdx, [rsp + 0x20]
mov r8b, 1
call fcn.140018cf0
mov rdi, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
test rdi, rdi
je 0x140017775
mov rcx, rdi
call qword [sym.imp.kernel32.dll_DeleteFileW]
test eax, eax
je 0x140017749
test rsi, rsi
je 0x140017745
add rsi, rsi
mov r8d, 2
mov rcx, rdi
mov rdx, rsi
call fcn.140002d20
xor esi, esi
jmp 0x140017775
call qword [sym.imp.kernel32.dll_GetLastError]
mov ebx, eax
shl rbx, 0x20
or rbx, 2
test rsi, rsi
je 0x140017772
add rsi, rsi
mov r8d, 2
mov rcx, rdi
mov rdx, rsi
call fcn.140002d20
mov rsi, rbx
mov rax, rsi
add rsp, 0x50
pop rbx
pop rdi
pop rsi
ret

Function at 0x140017780
Capabilities:
Move file

Disassembly:
push rbp
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x68
lea rbp, [rsp + 0x60]
mov qword [rbp], 0xfffffffffffffffe
mov rdi, r9
mov rbx, r8
mov r8, rdx
mov rdx, rcx
lea rcx, [rbp - 0x18]
call fcn.140020650
mov rax, qword [rbp - 0x18]
mov rsi, qword [rbp - 0x10]
test rax, rax
je 0x1400178ba
mov rcx, qword [rbp - 8]
mov qword [rbp - 0x18], rax
mov qword [rbp - 0x10], rsi
mov qword [rbp - 8], rcx
lea rcx, [rbp - 0x40]
lea rdx, [rbp - 0x18]
mov r8b, 1
call fcn.140018cf0
mov rax, qword [rbp - 0x40]
mov rsi, qword [rbp - 0x38]
test rax, rax
je 0x1400178ba
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x28], rsi
lea rcx, [rbp - 0x18]
mov rdx, rbx
mov r8, rdi
call fcn.140020650
mov rax, qword [rbp - 0x18]
mov rsi, qword [rbp - 0x10]
test rax, rax
je 0x140017899
mov rcx, qword [rbp - 8]
mov qword [rbp - 0x18], rax
mov qword [rbp - 0x10], rsi
mov qword [rbp - 8], rcx
lea rcx, [rbp - 0x40]
lea rdx, [rbp - 0x18]
mov r8b, 1
call fcn.140018cf0
mov rdi, qword [rbp - 0x40]
mov rsi, qword [rbp - 0x38]
test rdi, rdi
je 0x140017899
mov r15, qword [rbp - 0x20]
mov rcx, r15
mov rdx, rdi
mov r8d, 1
call qword [sym.imp.kernel32.dll_MoveFileExW]
test eax, eax
mov r14, qword [rbp - 0x28]
je 0x1400178ca
test rsi, rsi
je 0x14001787c
add rsi, rsi
mov r8d, 2
mov rcx, rdi
mov rdx, rsi
call fcn.140002d20
test r14, r14
je 0x140017895
add r14, r14
mov r8d, 2
mov rcx, r15
mov rdx, r14
call fcn.140002d20
xor esi, esi
jmp 0x1400178ba
mov r14, qword [rbp - 0x28]
mov r15, qword [rbp - 0x20]
test r14, r14
je 0x1400178ba
add r14, r14
mov r8d, 2
mov rcx, r15
mov rdx, r14
call fcn.140002d20
mov rax, rsi
add rsp, 0x68
pop rbx
pop rdi
pop rsi
pop r14
pop r15
pop rbp
ret
call qword [sym.imp.kernel32.dll_GetLastError]
mov ebx, eax
shl rbx, 0x20
or rbx, 2
test rsi, rsi
je 0x1400178f3
add rsi, rsi
mov r8d, 2
mov rcx, rdi
mov rdx, rsi
call fcn.140002d20
mov rsi, rbx
test r14, r14
jne 0x1400178a6
jmp 0x1400178ba
Function at 0x140017930
Capabilities:
Write file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0xa8
mov rdi, rdx
mov rsi, rcx
mov rcx, qword [rsp + 0xe0]
movups xmm0, xmmword [0x14009a1a8]
movaps xmmword [rsp + 0x60], xmm0
mov eax, 0xffffffff
cmp r9, rax
cmovb rax, r9
test rcx, rcx
je 0x140017974
mov rdx, qword [rsp + 0xe8]
mov qword [rsp + 0x80], rdx
test rcx, rcx
mov qword [rsp + 0x78], rcx
lea rdx, [rsp + 0x80]
cmove rdx, rcx
mov qword [rsp + 0x38], rdx
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r8
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x40], 0
mov rcx, rdi
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.ntdll.dll_NtWriteFile]
cmp eax, 0x103
jne 0x1400179da
mov rcx, rdi
mov edx, 0xffffffff
call qword [sym.imp.kernel32.dll_WaitForSingleObject]
mov eax, dword [rsp + 0x60]
cmp eax, 0x103
je 0x140017a11
test eax, eax
js 0x1400179eb
mov rax, qword [rsp + 0x68]
mov qword [rsi + 8], rax
xor eax, eax
jmp 0x140017a04
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov eax, 1
mov qword [rsi], rax
add rsp, 0xa8
pop rdi
pop rsi
ret
mov byte [rsp + 0x5c], 0
mov dword [rsp + 0x58], 0
lea rax, str.fatal_runtime_error:_I_O_error:_operation_failed_to_complete_synchronously_n
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x80], 1
lea rax, [rsp + 0x50]
mov qword [rsp + 0x88], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x90], xmm0
lea rcx, [rsp + 0x58]
lea rdx, [rsp + 0x78]
call fcn.140010000
mov rcx, rax
call fcn.140007d20
mov ecx, 7
int 0x29
ud2
Function at 0x14001e680
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rsi
push rdi
sub rsp, 0x88
sub esp, 0x88

Function at 0x14001f7e0
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push rbp
sub rsp, 0x80
lea rbp, [rsp + 0x80]
mov qword [rbp - 8], 0xfffffffffffffffe
xorps xmm0, xmm0
movaps xmmword [rbp - 0x20], xmm0
lea rcx, [rbp - 0x20]
mov edx, 0x10
call qword [sym.imp.advapi32.dll_SystemFunction036]
test al, al
je 0x14001f823
mov rax, qword [rbp - 0x20]
mov rdx, qword [rbp - 0x18]
add rsp, 0x80
pop rbp
ret
call qword [sym.imp.kernel32.dll_GetLastError]
shl rax, 0x20
or rax, 2
mov qword [rbp - 0x10], rax
lea rax, [rbp - 0x10]
mov qword [rbp - 0x30], rax
lea rax, [0x14000e780]
mov qword [rbp - 0x28], rax
lea rax, str.fallback_RNG_broken:
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x58], 1
mov qword [rbp - 0x40], 0
lea rax, [rbp - 0x30]
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], 1
lea rdx, str.library_std_src_syswindows_rand.rs
lea rcx, [rbp - 0x60]
call fcn.14003de00
ud2
Function at 0x14002d3f0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x28
test r8, r8
je 0x14002d46a
mov rax, rdx
mov rdx, qword [rsp + 0x70]
mov esi, ecx
shr esi, 8
lea r8, [rax + r8*2]
xor r11d, r11d
mov rbx, rax
movzx edi, byte [rax + 1]
add rax, 2
lea r10, [r11 + rdi]
cmp byte [rbx], sil
jne 0x14002d460
cmp r11, r10
ja 0x14002d503
cmp r10, rdx
ja 0x14002d517
add r11, r9
xor ebx, ebx
nop dword [rax]
cmp rdi, rbx
je 0x14002d462
lea r14, [rbx + 1]
cmp byte [r11 + rbx], cl
mov rbx, r14
jne 0x14002d440
jmp 0x14002d4d7
ja 0x14002d46a
mov r11, r10
cmp rax, r8
jne 0x14002d412
mov rdx, qword [rsp + 0x80]
test rdx, rdx
je 0x14002d4db
mov r8, qword [rsp + 0x78]
add rdx, r8
movzx ecx, cx
mov al, 1
nop word cs:[rax + rax]
lea r10, [r8 + 1]
movzx r9d, byte [r8]
test r9b, r9b
js 0x14002d4b0
mov r8, r10
sub ecx, r9d
jns 0x14002d4ce
jmp 0x14002d4dd
cmp r10, rdx
je 0x14002d4e9
movzx r10d, byte [r8 + 1]
add r8, 2
and r9d, 0x7f
shl r9d, 8
or r9d, r10d
sub ecx, r9d
js 0x14002d4dd
xor al, 1
cmp r8, rdx
jne 0x14002d490
jmp 0x14002d4dd
xor eax, eax
jmp 0x14002d4dd
mov al, 1
and al, 1
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
ret
lea rcx, str.called__Option::unwrap____on_a__None__valuefrom_str_radix_int:_must_lie_in_the_range___2__36_____found
lea r8, str.librarycore_srcunicodeprintable.rs
mov edx, 0x2b
call fcn.14003deb0
ud2
lea r8, str.librarycore_srcunicodeprintable.rs
mov rcx, r11
mov rdx, r10
call fcn.14003e380
ud2
lea r8, str.librarycore_srcunicodeprintable.rs
mov rcx, r10
call fcn.14003e300
ud2

Function at 0x14002f064
Capabilities:
Parse pe header

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

Function at 0x140033404
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140033200
Function at 0x1400364cc
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 0x1400364fc
xor eax, eax
jmp 0x1400365bf
mov rbp, rbx
cmp word [rax], si
je 0x140036521
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x140036508
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x140036504
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.1400363ec
movsxd r14, eax
test eax, eax
jne 0x14003655f
mov rcx, rbx
call qword [sym.imp.kernel32.dll_FreeEnvironmentStringsW]
jmp 0x1400364f5
mov rcx, r14
call fcn.1400373a8
mov rdi, rax
test rax, rax
jne 0x140036578
xor ecx, ecx
call fcn.140034a4c
jmp 0x140036554
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.1400363ec
test eax, eax
jne 0x1400365a9
mov rcx, rdi
call fcn.140034a4c
jmp 0x1400365b3
xor ecx, ecx
call fcn.140034a4c
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 0x140039ab0
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.1400354bc
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x140039b3a
cmp byte [rbp - 0x21], r15b
je 0x140039b35
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x140039b70
call fcn.140037bb8
test eax, eax
jne 0x140039b5c
cmp byte [rbp - 0x21], r15b
je 0x140039b54
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x140039b70
cmp byte [rbp - 0x21], r15b
je 0x140039b6d
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.140034a9c
test eax, eax
jne 0x140039c10
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.1400354bc
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x140039baf
cmp byte [rbp - 0x21], r15b
je 0x140039be4
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x140039be4
call fcn.140037bb8
test eax, eax
jne 0x140039bd0
cmp byte [rbp - 0x21], r15b
je 0x140039bc9
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x140039be4
cmp byte [rbp - 0x21], r15b
je 0x140039be1
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.140034a9c
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x140039c10
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.kernel32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x140039c13
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x140039c21
mov rcx, rdi
call fcn.140034a4c
cmp byte [rbp + 0x3f], r15b
je 0x140039c30
mov rcx, qword [rbp + 0x27]
call fcn.140034a4c
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 0x1400066f0
Capabilities:
Parse pe header

Disassembly:
test rcx, rcx
je 0x140006720
mov eax, 0
cmp word [rcx], 0x5a4d
jne 0x14000671f
mov eax, dword [rcx + 0x3c]
cmp eax, 0x400
jg 0x140006725
cdqe
add rax, rcx
cmp dword [rax], 0x4550
mov edx, 0
cmovne rax, rdx
ret
mov rax, rcx
jmp 0x14000671f
mov eax, 0
jmp 0x14000671f

Function at 0x140006da0
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.140006d50
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 0x1400103b0
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 fcn.140018ef0
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.140018ef0
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 0x140010420
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1404797d4]
test esi, esi
mov rdi, rcx
mov rbp, rdx
mov rbx, r8
jle 0x1400105b0
mov rax, qword [0x1404797d8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rdi, rdx
jb 0x14001046c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rdi, rdx
jb 0x1400104f5
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x140010450
mov rcx, rdi
call fcn.140010f80
test rax, rax
mov r12, rax
je 0x140010602
mov rax, qword [0x1404797d8]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call fcn.1400110c0
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x1404797d8]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1400105e5
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400104ee
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140010560
add dword [0x1404797d4], 1
cmp ebx, 8
jae 0x140010521
test bl, 4
jne 0x1400105c0
test ebx, ebx
je 0x140010516
movzx eax, byte [rbp]
test bl, 2
mov byte [rdi], al
jne 0x1400105d4
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, ebx
sub ebx, 1
mov rdx, qword [rbp + rax - 8]
cmp ebx, 8
mov qword [rdi + rax - 8], rdx
jb 0x140010516
and ebx, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, ebx
mov qword [rdi + rdx], rcx
jb 0x14001053a
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp eax, 2
mov r8d, 4
mov eax, 0x40
mov rcx, qword [rsp + 0x20]
cmovne r8d, eax
mov rdx, qword [rsp + 0x38]
add rsi, qword [0x1404797d8]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400104ee
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.1400103b0
xor esi, esi
jmp 0x140010477
mov eax, dword [rbp]
mov ebx, ebx
mov dword [rdi], eax
mov eax, dword [rbp + rbx - 4]
mov dword [rdi + rbx - 4], eax
jmp 0x140010516
mov ebx, ebx
movzx eax, word [rbp + rbx - 2]
mov word [rdi + rbx - 2], ax
jmp 0x140010516
mov rax, qword [0x1404797d8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call fcn.1400103b0
lea rcx, str.Address__p_has_no_image_section
mov rdx, rdi
call fcn.1400103b0
nop
nop dword [rax]
nop word cs:[rax + rax]
Function at 0x140010bd0
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x140479840]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140479820]
test rbx, rbx
je 0x140010c24
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x140010c1b
test rsi, rsi
je 0x140010c1b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140010c00
lea rcx, [0x140479840]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x140010f80
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x140474450]
xor edx, edx
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x140010fef
mov rcx, r9
call fcn.140010e50
test eax, eax
je 0x140010fef
movsxd rax, dword [r9 + 0x3c]
mov rcx, r8
sub rcx, r9
add r9, rax
movzx eax, word [r9 + 0x14]
lea rdx, [r9 + rax + 0x18]
movzx eax, word [r9 + 6]
test eax, eax
je 0x140010fed
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
mov r8d, dword [rdx + 0xc]
cmp rcx, r8
mov rax, r8
jb 0x140010fe4
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x140010fef
add rdx, 0x28
cmp rdx, r9
jne 0x140010fd0
xor edx, edx
mov rax, rdx
add rsp, 0x28
ret