joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140002070
Capabilities:
Enumerate processes

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x298
xor edx, edx
mov rbx, rcx
mov ecx, 2
mov dword [rsp + 0x50], 0x238
call sym.CreateToolhelp32Snapshot
mov r12, rax
xor eax, eax
cmp r12, 0xffffffffffffffff
je 0x140002189
lea rsi, [rsp + 0x50]
mov rcx, r12
lea rbp, [rsp + 0x30]
mov rdx, rsi
call sym.Process32FirstW
lea rdi, [rsp + 0x7c]
mov rcx, rbp
mov rdx, rdi
call sym.ConvertWCharToString_abi:cxx11__wchar_t_const_
mov r8, qword [rbx + 8]
cmp r8, qword [rsp + 0x38]
mov rcx, qword [rbx]
mov r14, qword [rsp + 0x30]
je 0x140002210
lea rax, [rsp + 0x40]
cmp r14, rax
mov qword [rsp + 0x28], rax
je 0x140002108
mov rax, qword [rsp + 0x40]
mov rcx, r14
lea rdx, [rax + 1]
call sym.operator_delete_void__unsigned_long_long_
nop dword [rax]
mov rdx, rsi
mov rcx, r12
call sym.Process32NextW
test eax, eax
je 0x140002200
mov rcx, rbp
mov rdx, rdi
call sym.ConvertWCharToString_abi:cxx11__wchar_t_const_
mov r9, qword [rbx + 8]
mov r13, qword [rsp + 0x38]
mov rcx, qword [rbx]
mov r15, qword [rsp + 0x30]
cmp r9, r13
mov r8, r13
cmovbe r8, r9
test r8, r8
je 0x1400021a0
mov rdx, r15
mov qword [rsp + 0x20], r9
call sym.memcmp
mov r9, qword [rsp + 0x20]
test eax, eax
mov r14d, eax
je 0x1400021a0
cmp r15, qword [rsp + 0x28]
je 0x140002108
mov rax, qword [rsp + 0x40]
mov rcx, r15
lea rdx, [rax + 1]
call sym.operator_delete_void__unsigned_long_long_
test r14d, r14d
jne 0x140002108
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x58]
add rsp, 0x298
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
sub r9, r13
mov eax, 0x80000000
cmp r9, rax
jge 0x1400021d0
movabs rax, 0xffffffff7fffffff
cmp r9, rax
jle 0x1400021d0
cmp r15, qword [rsp + 0x28]
mov r14d, r9d
jne 0x140002166
jmp 0x140002177
cmp r15, qword [rsp + 0x28]
je 0x140002108
mov rax, qword [rsp + 0x40]
mov rcx, r15
lea rdx, [rax + 1]
call sym.operator_delete_void__unsigned_long_long_
mov rdx, rsi
mov rcx, r12
call sym.Process32NextW
test eax, eax
jne 0x14000211b
nop
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140002189
test r8, r8
je 0x140002225
mov rdx, r14
call sym.memcmp
test eax, eax
jne 0x1400020e5
lea rax, [rsp + 0x40]
cmp r14, rax
je 0x14000217c
mov rax, qword [rsp + 0x40]
mov rcx, r14
lea rdx, [rax + 1]
call sym.operator_delete_void__unsigned_long_long_
jmp 0x14000217c
Function at 0x140002f50
Capabilities:
Create process on windows
Encode data using xor

Disassembly:
sub rsp, 0x58
mov rax, qword [0x1400076c0]
mov ecx, 0x31
movdqa xmm0, xmmword [0x1400076b0]
lea r8, [rsp + 0x30]
mov qword [rsp + 0x40], rax
mov eax, 0x4e2b
mov word [rsp + 0x4c], ax
lea r9, [rsp + 0x4e]
mov rax, r8
sub ecx, r8d
movaps xmmword [rsp + 0x30], xmm0
mov dword [rsp + 0x48], 0x272f181a
nop dword [rax]
lea edx, [rcx + rax]
xor byte [rax], dl
add rax, 1
cmp r9, rax
jne 0x140002f98
mov dword [rsp + 0x28], 1
xor r9d, r9d
xor ecx, ecx
mov qword [rsp + 0x20], 0
lea rdx, str.open
call qword [sym.imp.SHELL32.dll_ShellExecuteA]
nop
add rsp, 0x58
ret

Function at 0x140002fd0
Capabilities:
Create process on windows
Encode data using xor

Disassembly:
sub rsp, 0x58
mov rax, qword [0x1400076e0]
mov ecx, 0x31
movdqa xmm0, xmmword [str.YFGDF_f]
lea r8, [rsp + 0x30]
mov qword [rsp + 0x40], rax
movaps xmmword [rsp + 0x30], xmm0
lea r9, [rsp + 0x48]
mov rax, r8
sub ecx, r8d
nop word [rax + rax]
lea edx, [rcx + rax]
xor byte [rax], dl
add rax, 1
cmp r9, rax
jne 0x140003008
mov dword [rsp + 0x28], 1
xor r9d, r9d
xor ecx, ecx
mov qword [rsp + 0x20], 0
lea rdx, str.open
call qword [sym.imp.SHELL32.dll_ShellExecuteA]
nop
add rsp, 0x58
ret

Function at 0x140003900
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 sym.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sym.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]
Function at 0x140003970
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x14000c094]
test esi, esi
mov rdi, rcx
mov rbp, rdx
mov rbx, r8
jle 0x140003b00
mov rax, qword [0x14000c098]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rdi, rdx
jb 0x1400039bc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rdi, rdx
jb 0x140003a45
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x1400039a0
mov rcx, rdi
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x140003b52
mov rax, qword [0x14000c098]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call sym._GetPEImageBase
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x14000c098]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140003b35
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140003a3e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140003ab0
add dword [0x14000c094], 1
cmp ebx, 8
jae 0x140003a71
test bl, 4
jne 0x140003b10
test ebx, ebx
je 0x140003a66
movzx eax, byte [rbp]
test bl, 2
mov byte [rdi], al
jne 0x140003b24
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 0x140003a66
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 0x140003a8a
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 [0x14000c098]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140003a3e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
xor esi, esi
jmp 0x1400039c7
mov eax, dword [rbp]
mov ebx, ebx
mov dword [rdi], eax
mov eax, dword [rbp + rbx - 4]
mov dword [rdi + rbx - 4], eax
jmp 0x140003a66
mov ebx, ebx
movzx eax, word [rbp + rbx - 2]
mov word [rdi + rbx - 2], ax
jmp 0x140003a66
mov rax, qword [0x14000c098]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rdi
call sym.__report_error
nop
nop dword [rax]
nop word cs:[rax + rax]
Function at 0x140004120
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x14000c100]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14000c0e0]
test rbx, rbx
je 0x140004174
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 0x14000416b
test rsi, rsi
je 0x14000416b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140004150
lea rcx, [0x14000c100]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x1400043c0
Capabilities:
Parse pe header

Disassembly:
cmp word [rcx], 0x5a4d
jne 0x1400043d0
jmp sym._ValidateImageBase.part.0
xor eax, eax
ret

Function at 0x1400043e0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x140004421
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
mov r8d, dword [rax + 0xc]
cmp r8, rdx
mov rcx, r8
ja 0x140004418
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x140004423
add rax, 0x28
cmp rax, r9
jne 0x140004404
xor eax, eax
ret

Function at 0x1400044d0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x140007ae0]
xor edx, edx
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x14000453f
mov rcx, r9
call sym._ValidateImageBase.part.0
test eax, eax
je 0x14000453f
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 0x14000453d
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 0x140004534
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x14000453f
add rdx, 0x28
cmp rdx, r9
jne 0x140004520
xor edx, edx
mov rax, rdx
add rsp, 0x28
ret

Function at 0x140004640
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x140007ae0]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x1400046af
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x1400046af
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x1400046ad
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x1400046a4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400046b4
add rax, 0x28
cmp rax, r9
jne 0x140004690
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret
Function at 0x1400046d0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x140007ae0]
xor r9d, r9d
cmp word [r11], 0x5a4d
mov r8d, ecx
jne 0x140004743
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x140004743
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x140004743
movzx edx, word [rcx + 0x14]
lea rdx, [rcx + rdx + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x140004743
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r10, [rdx + rcx*8 + 0x28]
mov r9d, dword [rdx + 0xc]
cmp rax, r9
mov rcx, r9
jb 0x140004737
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x140004750
add rdx, 0x28
cmp rdx, r10
jne 0x140004723
xor r9d, r9d
mov rax, r9
add rsp, 0x28
ret
add rax, r11
jne 0x140004768
jmp 0x140004740
sub r8d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x140004776
mov edx, dword [rax + 0xc]
test edx, edx
je 0x140004740
test r8d, r8d
jg 0x140004760
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
add rsp, 0x28
ret

Function at 0x140004790
Capabilities:
Accept command line arguments

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
mov dword [rsp + 0x4c], 0
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea rdx, [rsp + 0x4c]
mov rcx, rax
call qword [sym.imp.SHELL32.dll_CommandLineToArgvW]
test rax, rax
mov r13, rax
je 0x1400048e2
movabs rax, 0xfffffffffffffff
mov esi, dword [rsp + 0x4c]
lea ecx, [rsi + 1]
movsxd rcx, ecx
cmp rcx, rax
ja 0x1400048ea
shl rcx, 3
xor ebx, ebx
call sym.operator_new___unsigned_long_long_
test esi, esi
mov rbp, qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov r12, rax
je 0x140004880
mov r14, qword [r13 + rbx*8]
xor edx, edx
mov r9d, 0xffffffff
xor ecx, ecx
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r8, r14
call rbp
movsxd rcx, eax
mov rdi, rcx
call sym.operator_new___unsigned_long_long_
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], edi
mov rsi, rax
mov qword [rsp + 0x20], rax
mov r9d, 0xffffffff
mov r8, r14
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
call rbp
mov qword [r12 + rbx*8], rsi
lea esi, [rbx + 1]
add rbx, 1
cmp dword [rsp + 0x4c], ebx
jne 0x140004800
movsxd rsi, esi
mov rcx, r13
xor ebx, ebx
mov qword [r12 + rsi*8], 0
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [rsp + 0x4c]
mov rdx, r12
call sym.qMain_int__char_
mov r13d, eax
mov eax, dword [rsp + 0x4c]
test eax, eax
jne 0x1400048bf
jmp 0x1400048c8
call sym.operator_delete___void_
add rbx, 1
cmp dword [rsp + 0x4c], ebx
je 0x1400048c8
mov rcx, qword [r12 + rbx*8]
test rcx, rcx
jne 0x1400048b0
mov rcx, r12
call sym.operator_delete___void_
mov eax, r13d
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov r13d, 0xffffffff
jmp 0x1400048d0
call sym.__cxa_throw_bad_array_new_length
nop

Function at 0x140005af0
Capabilities:
Accept command line arguments

Disassembly:
sub rsp, 0x28
call sym.__main
mov rax, qword [0x140007ba0]
xor edx, edx
mov r9d, dword [rax]
mov rax, qword [0x140007b90]
mov r8, qword [rax]
mov rax, qword [0x140007b80]
mov rcx, qword [rax]
add rsp, 0x28
jmp sym.WinMain
Function at 0x1400069d0
Capabilities:
Set registry value

Disassembly:
push rbp
sub rsp, 0xe0
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x58], 0xfffffffffffffffe
mov qword [rbp - 8], r9
mov qword [rbp - 0x10], rcx
mov qword [rbp + 0x30], rcx
mov qword [rbp + 0x38], rdx
mov qword [rbp + 0x40], r8
mov qword [rbp + 0x48], r9
lea rcx, [rbp + 0x10]
call fcn.140006e00
mov rcx, qword [rbp - 8]
add rcx, 0x18
call fcn.1400020e0
mov byte [rbp + 7], al
jmp 0x140006a1b
mov rax, qword [rbp - 0x10]
mov cl, byte [rbp + 7]
mov byte [rbp + 0x2f], cl
movzx ecx, byte [rbp + 0x2f]
mov dword [rbp - 0x24], ecx
mov dword [rbp + 0x50], ecx
mov rax, qword [rax]
mov qword [rbp - 0x20], rax
lea rcx, [rbp + 0x10]
call fcn.140004360
mov qword [rbp - 0x18], rax
jmp 0x140006a45
mov rcx, qword [rbp - 8]
call fcn.140009d20
mov qword [rbp - 0x30], rax
jmp 0x140006a54
mov rcx, qword [rbp - 8]
call fcn.140009d10
mov qword [rbp - 0x38], rax
jmp 0x140006a63
mov r9d, dword [rbp - 0x24]
mov rdx, qword [rbp - 0x18]
mov rcx, qword [rbp - 0x20]
mov r8, qword [rbp - 0x30]
mov rax, qword [rbp - 0x38]
mov r10d, eax
mov rax, rsp
mov dword [rax + 0x28], r10d
mov qword [rax + 0x20], r8
mov rax, qword [sym.imp.advapi32.dll_RegSetValueExW]
xor r8d, r8d
call rax
mov dword [rbp - 0x3c], eax
jmp 0x140006a96
mov eax, dword [rbp - 0x3c]
mov dword [rbp + 0x54], eax
cmp eax, 0
jne 0x140006aab
mov qword [rbp + 8], 0
jmp 0x140006ab9
mov ecx, dword [rbp - 0x3c]
call fcn.140006050
mov qword [rbp - 0x48], rax
jmp 0x140006acf
lea rcx, [rbp + 0x10]
call fcn.140007d20
mov rax, qword [rbp + 8]
add rsp, 0xe0
pop rbp
ret
mov rax, qword [rbp - 0x48]
mov qword [rbp + 8], rax
jmp 0x140006ab9
Function at 0x140012cf0
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 0x140012d80
jmp 0x140012d6f
jae 0x140012e40
cmp r8, 0x201
jae 0x140012d80
mov esi, 0x200
lea r13, [rbp - 0x58]
mov r15, r8
jmp 0x140012dd8
sub r8, r12
sub rbx, r12
cmp rbx, r8
jae 0x140012daf
lea rcx, [rbp + 0x3c8]
mov rdx, r12
call fcn.140033dc0
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 0x140012e01
call qword [sym.imp.kernel32.dll_GetLastError]
test eax, eax
jne 0x140012ea8
mov r8d, r14d
cmp r15, r8
jne 0x140012d60
call qword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140012ecb
add r15, r15
mov eax, 0xffffffff
cmp r15, rax
cmovae r15, rax
mov r8, r15
cmp r8, 0x201
jb 0x140012d6f
jmp 0x140012d80
cmp rsi, r8
jb 0x140012ee5
lea rcx, [rbp + 0x3a8]
mov rdx, r13
call fcn.140015320
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 0x140012e91
add rdi, rdi
mov r8d, 2
mov rcx, qword [rbp + 0x3e8]
mov rdx, rdi
call fcn.140006f70
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 0x140012e79
jmp 0x140012e91
lea rcx, str.internal_error:_entered_unreachable_code_a
lea r8, str.library_std_src_syswindowsmod.rs
mov edx, 0x28
call fcn.1400348b0
jmp 0x140012efa
lea rax, str.library_std_src_syswindowsmod.rs
mov rcx, r8
mov rdx, rsi
mov r8, rax
call fcn.140034d00
ud2
Function at 0x140012f50
Capabilities:
Query environment variable

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x4a8
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x420], 0xfffffffffffffffe
mov rsi, rcx
lea rcx, [rbp - 0x60]
call fcn.140024bf0
mov rax, qword [rbp - 0x60]
mov qword [rbp + 0x408], rax
test rax, rax
je 0x1400130d6
mov qword [rbp + 0x400], rsi
mov rax, qword [rbp - 0x58]
mov qword [rbp + 0x418], rax
mov qword [rbp + 0x3e8], 2
xorps xmm0, xmm0
movups xmmword [rbp + 0x3f0], xmm0
mov r8d, 0x200
mov eax, 2
mov qword [rbp + 0x410], rax
xor edi, edi
xor ebx, ebx
xor r13d, r13d
cmp r8, 0x201
jae 0x140013010
jmp 0x140012fff
jae 0x1400130e8
cmp r8, 0x201
jae 0x140013010
mov r15d, 0x200
lea r14, [rbp - 0x60]
mov r12, r8
jmp 0x140013068
sub r8, r13
sub rbx, r13
cmp rbx, r8
jae 0x14001303f
lea rcx, [rbp + 0x3e8]
mov rdx, r13
call fcn.140033dc0
mov rax, qword [rbp + 0x3e8]
mov qword [rbp + 0x410], rax
mov rdi, qword [rbp + 0x3f0]
mov eax, 0xffffffff
cmp rdi, rax
mov r13d, 0xffffffff
cmovb r13, rdi
mov qword [rbp + 0x3f8], r13
mov rbx, rdi
mov r15, r13
mov r14, qword [rbp + 0x410]
mov r12, r13
xor ecx, ecx
call qword [sym.imp.kernel32.dll_SetLastError]
mov rcx, qword [rbp + 0x408]
mov rdx, r14
mov r8d, r12d
call qword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
mov esi, eax
test eax, eax
jne 0x140013097
call qword [sym.imp.kernel32.dll_GetLastError]
test eax, eax
jne 0x1400131bb
mov r8d, esi
cmp r12, r8
jne 0x140012ff0
call qword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1400131e5
add r12, r12
mov eax, 0xffffffff
cmp r12, rax
cmovae r12, rax
mov r8, r12
cmp r8, 0x201
jb 0x140012fff
jmp 0x140013010
lea rcx, [rbp - 0x58]
call fcn.14000d140
mov byte [rsi + 0x18], 2
jmp 0x14001317a
cmp r15, r8
jb 0x1400131ff
lea rcx, [rbp + 0x3a0]
mov rdx, r14
call fcn.140015320
movups xmm0, xmmword [rbp + 0x3a0]
movups xmm1, xmmword [rbp + 0x3b0]
movaps xmmword [rbp + 0x3d0], xmm1
movaps xmmword [rbp + 0x3c0], xmm0
test rdi, rdi
je 0x140013139
add rdi, rdi
mov r8d, 2
mov rcx, qword [rbp + 0x410]
mov rdx, rdi
call fcn.140006f70
cmp byte [rbp + 0x3d8], 2
jne 0x140013191
mov rsi, qword [rbp + 0x400]
mov byte [rsi + 0x18], 2
lea rcx, [rbp + 0x3c0]
call fcn.14000d140
mov rdx, qword [rbp + 0x418]
test rdx, rdx
je 0x14001317a
add rdx, rdx
mov r8d, 2
mov rcx, qword [rbp + 0x408]
call fcn.140006f70
mov rax, rsi
add rsp, 0x4a8
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
movaps xmm0, xmmword [rbp + 0x3c0]
movaps xmm1, xmmword [rbp + 0x3d0]
mov rsi, qword [rbp + 0x400]
movups xmmword [rsi + 0x10], xmm1
movups xmmword [rsi], xmm0
mov rdx, qword [rbp + 0x418]
test rdx, rdx
jne 0x140013165
jmp 0x14001317a
call qword [sym.imp.kernel32.dll_GetLastError]
shl rax, 0x20
or rax, 2
mov qword [rbp + 0x3c0], rax
mov byte [rbp + 0x3d8], 2
test rdi, rdi
jne 0x140013121
jmp 0x140013139
lea rcx, str.internal_error:_entered_unreachable_code_a
lea r8, str.library_std_src_syswindowsmod.rs
mov edx, 0x28
call fcn.1400348b0
jmp 0x140013214
lea rax, str.library_std_src_syswindowsmod.rs
mov rcx, r8
mov rdx, r15
mov r8, rax
call fcn.140034d00
ud2
Function at 0x140018520
Capabilities:
Write file on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
mov eax, 0x10b8
call fcn.1400332e0
sub rsp, rax
lea rbp, [rsp + 0x80]
movaps xmmword [rbp + 0x1020], xmm6
mov qword [rbp + 0x1018], 0xfffffffffffffffe
mov qword [rbp + 0x1008], rdx
mov r12, rcx
lea r13, [rbp - 0x50]
mov r8d, 0x1000
mov rcx, r13
xor edx, edx
call sub.VCRUNTIME140.dll_memset
lea rcx, [rbp + 0xfe8]
xorps xmm6, xmm6
lea rbx, [rbp + 0xffc]
lea rsi, [0x14001e340]
lea r15, [rbp + 0xfb0]
mov r14, qword [sym.imp.kernel32.dll_WriteFileEx]
mov rdi, qword [sym.imp.kernel32.dll_SleepEx]
mov qword [rbp + 0x1010], r12
mov r9d, 0x1000
mov rdx, r12
mov r8, r13
call fcn.14001e0e0
cmp qword [rbp + 0xfe8], 0
jne 0x1400186f7
mov r12, qword [rbp + 0xff0]
test r12, r12
je 0x1400186c3
cmp r12, 0x1000
ja 0x140018719
xor r13d, r13d
nop word cs:[rax + rax]
mov r8d, r12d
sub r8d, r13d
lea rdx, [r13 - 0x50]
add rdx, rbp
mov dword [rbp + 0xffc], 0
movaps xmmword [rbp + 0xfb0], xmm6
mov qword [rbp + 0xfc0], 0
mov qword [rbp + 0xfc8], rbx
mov qword [rsp + 0x20], rsi
mov rcx, qword [rbp + 0x1008]
mov r9, r15
call r14
test eax, eax
je 0x140018697
nop word [rax + rax]
mov ecx, 0xffffffff
mov edx, 1
call rdi
cmp dword [rbp + 0xffc], 0
je 0x140018640
movsxd rax, dword [rbp + 0x1000]
test rax, rax
jne 0x14001869d
mov eax, dword [rbp + 0x1004]
add r13, rax
cmp r13, r12
je 0x140018680
jbe 0x1400185f0
jmp 0x140018705
mov r12, qword [rbp + 0x1010]
lea r13, [rbp - 0x50]
lea rcx, [rbp + 0xfe8]
jmp 0x1400185a5
call qword [sym.imp.kernel32.dll_GetLastError]
shl rax, 0x20
or rax, 2
mov qword [rbp + 0xfe0], rax
mov qword [rbp + 0xfd8], 1
lea rcx, [rbp + 0xfe0]
call fcn.14000d140
mov rsi, qword [sym.imp.kernel32.dll_CloseHandle]
mov rcx, qword [rbp + 0x1010]
call rsi
mov rcx, qword [rbp + 0x1008]
call rsi
movaps xmm6, xmmword [rbp + 0x1020]
add rsp, 0x10b8
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea rcx, [rbp + 0xff0]
call fcn.14000d140
jmp 0x1400186c3
lea r8, str.library_std_src_syswindowspipe.rs
mov rcx, r13
mov rdx, r12
call fcn.140034d80
jmp 0x14001872d
lea r8, str.library_std_src_syswindowspipe.rs
mov edx, 0x1000
mov rcx, r12
call fcn.140034d00
ud2
Function at 0x14001bb90
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 [0x140038328]
movaps xmmword [rsp + 0x60], xmm0
mov eax, 0xffffffff
cmp r9, rax
cmovb rax, r9
test rcx, rcx
je 0x14001bbd4
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 0x14001bc3a
mov rcx, rdi
mov edx, 0xffffffff
call qword [sym.imp.kernel32.dll_WaitForSingleObject]
mov eax, dword [rsp + 0x60]
cmp eax, 0x103
je 0x14001bc71
test eax, eax
js 0x14001bc4b
mov rax, qword [rsp + 0x68]
mov qword [rsi + 8], rax
xor eax, eax
jmp 0x14001bc64
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 dword [rsp + 0x58], 0
mov byte [rsp + 0x5c], 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.140015060
mov qword [rsp + 0x70], rax
lea rcx, [rsp + 0x70]
call fcn.14000d6d0
mov ecx, 7
int 0x29
ud2