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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x80
mov rax, qword [0x140021228]
xor rax, rsp
mov qword [rsp + 0x70], rax
lea rdx, [0x140021668]
lea rcx, [rsp + 0x68]
call fcn.1400073a0
nop
cmp qword [0x140021168], 0
je 0x140007a79
lea rbx, [0x140021188]
mov rcx, rbx
call fcn.140007ab0
test al, al
jne 0x140007937
lea rbx, [0x140021158]
cmp qword [0x140021170], 8
cmovae rbx, qword [0x140021158]
xor edi, edi
jmp 0x140007a63
cmp byte [0x140021690], 0
je 0x140007948
mov rcx, rbx
call fcn.1400075e0
mov rcx, rbx
call fcn.140016970
cmp eax, 1
je 0x140007a79
cmp qword [0x1400211a0], 8
cmovae rbx, qword [0x140021188]
xor edi, edi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
xor r9d, r9d
xor r8d, r8d
lea edx, [rdi + 4]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
lea rbx, [0x140021158]
cmp rax, 0xffffffffffffffff
je 0x140007a53
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x1400079bb
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x140007a4a
mov ebp, dword [0x140021168]
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.1400081a0
cmp qword [rax + 0x18], 0x10
jb 0x1400079f1
mov rax, qword [rax]
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x60]
mov r8d, ebp
mov rdx, rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rdx, qword [rsp + 0x58]
cmp rdx, 0x10
jb 0x140007a4a
inc rdx
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140007a45
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140007a45
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14001726c
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp qword [0x140021170], 8
cmovae rbx, qword [0x140021158]
mov qword [0x140021168], rdi
mov word [rbx], di
call sub.MSVCP140.dll__Xtime_get_ticks
mov qword [0x1400216a0], rax
lea rcx, [rsp + 0x68]
call fcn.1400073e0
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.140017310
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
sub rsp, 0x28
call fcn.1400043f0
mov edx, 1
lea rcx, [0x140021710]
call fcn.14000b4c0
call fcn.140006fa0
call fcn.14000ad50
call fcn.140008ba0
mov rcx, qword [0x140021700]
test rcx, rcx
je 0x1400096f3
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
test eax, eax
jne 0x1400096e8
add rsp, 0x28
jmp fcn.140005e40
mov qword [0x140021700], 0
mov rcx, qword [0x1400233e0]
test rcx, rcx
je 0x140009710
mov rax, qword [rcx]
call qword [rax + 0x10]
mov qword [0x1400233e0], 0
call qword [sym.imp.ole32.dll_CoUninitialize]
add rsp, 0x28
jmp 0x1400078c0
Function at 0x14000dbf0
Capabilities:
Create thread

Disassembly:
sub rsp, 0x78
mov rax, qword [0x140021228]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x38], rdx
mov qword [rsp + 0x40], r8
mov ecx, 0x18
call fcn.140017230
test rax, rax
je 0x14000dc34
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rax], xmm0
movsd xmm1, qword [rsp + 0x40]
movsd qword [rax + 0x10], xmm1
mov qword [rsp + 0x30], rax
lea rcx, [rsp + 0x58]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], 0
mov r9, rax
lea r8, [0x14000d520]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov qword [rsp + 0x50], rax
test rax, rax
je 0x14000dca3
cmp dword [rsp + 0x58], 0
je 0x14000dcb6
movaps xmm0, xmmword [rsp + 0x50]
movdqa xmmword [rsp + 0x30], xmm0
lea rcx, [rsp + 0x30]
call sub.MSVCP140.dll__Thrd_detach
test eax, eax
jne 0x14000dc9b
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140017310
add rsp, 0x78
ret
mov ecx, eax
call sub.MSVCP140.dll_void___cdecl_std::_Throw_C_error_int_
nop
mov dword [rsp + 0x58], 0
mov ecx, 6
call sub.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_
nop
mov ecx, 1
call sub.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_
int3

Function at 0x14000f3e0
Capabilities:
Delete directory

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x40
mov r15, rdx
mov r14, rcx
mov rdi, qword [rcx + 0x478]
mov rbp, qword [rcx + 0x480]
cmp rdi, rbp
je 0x14000f4fb
lea rbx, [rdi + 0x20]
xor r12d, r12d
nop word [rax + rax]
mov esi, dword [rbx + 0x20]
mov rdx, rbx
cmp qword [rbx + 0x18], 8
jb 0x14000f430
mov rdx, qword [rbx]
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x38], r12
mov r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp word [rdx + r8*2], 0
jne 0x14000f450
lea rcx, [rsp + 0x20]
call fcn.140001230
nop
mov r8d, esi
lea rdx, [rsp + 0x20]
mov rcx, qword [r15]
call fcn.140004010
test eax, eax
sete sil
mov rdx, qword [rsp + 0x38]
cmp rdx, 8
jb 0x14000f4ba
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000f4b5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000f4e4
call fcn.14001726c
test sil, sil
jne 0x14000f4eb
mov rcx, rbx
cmp qword [rbx + 0x18], 8
jb 0x14000f4cc
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
add rdi, 0x48
add rbx, 0x48
cmp rdi, rbp
je 0x14000f4fb
jmp 0x14000f420
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140005e40
mov dword [r14 + 0x1d8], 1
lea r11, [rsp + 0x40]
mov rbx, qword [r11 + 0x40]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
Function at 0x14000f8b0
Capabilities:
Create thread

Disassembly:
push rbx
sub rsp, 0xfe0
mov rax, qword [0x140021228]
xor rax, rsp
mov qword [rsp + 0xfd0], rax
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x38], rdx
mov rdx, r8
lea rcx, [rsp + 0x40]
call fcn.14000e3e0
nop
mov ecx, 0xf78
call fcn.140017230
mov rbx, rax
mov qword [rsp + 0xfb0], rax
test rax, rax
je 0x14000f91e
mov rax, qword [rsp + 0x30]
mov qword [rbx], rax
mov rax, qword [rsp + 0x38]
mov qword [rbx + 8], rax
lea rcx, [rbx + 0x10]
lea rdx, [rsp + 0x40]
call fcn.14000e3e0
jmp 0x14000f920
xor ebx, ebx
mov qword [rsp + 0xfb0], rbx
lea rax, [rsp + 0xfc8]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
mov r9, rbx
lea r8, [0x14000e070]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov qword [rsp + 0xfc0], rax
test rax, rax
je 0x14000f9b5
lea rcx, [rsp + 0x40]
call fcn.1400084c0
cmp dword [rsp + 0xfc8], 0
je 0x14000f9cb
movaps xmm0, xmmword [rsp + 0xfc0]
movdqa xmmword [rsp + 0xfb0], xmm0
lea rcx, [rsp + 0xfb0]
call sub.MSVCP140.dll__Thrd_detach
test eax, eax
jne 0x14000f9ad
mov rcx, qword [rsp + 0xfd0]
xor rcx, rsp
call fcn.140017310
add rsp, 0xfe0
pop rbx
ret
mov ecx, eax
call sub.MSVCP140.dll_void___cdecl_std::_Throw_C_error_int_
nop
mov dword [rsp + 0xfc8], 0
mov ecx, 6
call sub.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_
nop
mov ecx, 1
call sub.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_
int3

Function at 0x140010610
Capabilities:
Create thread

Disassembly:
push rbx
sub rsp, 0xfe0
mov rax, qword [0x140021228]
xor rax, rsp
mov qword [rsp + 0xfd0], rax
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x38], rdx
mov qword [rsp + 0x40], r8
mov rdx, r9
lea rcx, [rsp + 0x48]
call fcn.14000e3e0
nop
mov ecx, 0xf80
call fcn.140017230
mov rbx, rax
mov qword [rsp + 0xfb0], rax
test rax, rax
je 0x14001068c
mov rax, qword [rsp + 0x30]
mov qword [rbx], rax
mov rax, qword [rsp + 0x38]
mov qword [rbx + 8], rax
mov rax, qword [rsp + 0x40]
mov qword [rbx + 0x10], rax
lea rcx, [rbx + 0x18]
lea rdx, [rsp + 0x48]
call fcn.14000e3e0
jmp 0x14001068e
xor ebx, ebx
mov qword [rsp + 0xfb0], rbx
lea rax, [rsp + 0xfc8]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
mov r9, rbx
lea r8, [0x14000e0d0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov qword [rsp + 0xfc0], rax
test rax, rax
je 0x140010723
lea rcx, [rsp + 0x48]
call fcn.1400084c0
cmp dword [rsp + 0xfc8], 0
je 0x140010739
movaps xmm0, xmmword [rsp + 0xfc0]
movdqa xmmword [rsp + 0xfb0], xmm0
lea rcx, [rsp + 0xfb0]
call sub.MSVCP140.dll__Thrd_detach
test eax, eax
jne 0x14001071b
mov rcx, qword [rsp + 0xfd0]
xor rcx, rsp
call fcn.140017310
add rsp, 0xfe0
pop rbx
ret
mov ecx, eax
call sub.MSVCP140.dll_void___cdecl_std::_Throw_C_error_int_
nop
mov dword [rsp + 0xfc8], 0
mov ecx, 6
call sub.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_
nop
mov ecx, 1
call sub.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_
int3
Function at 0x140012b90
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov rbx, rdx
mov rbp, rcx
movzx edx, r8w
mov rcx, rbx
lea r8, [0x14001a928]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rdi, rax
test rax, rax
je 0x140012c03
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov rdx, rdi
mov rcx, rbx
mov esi, eax
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x140012c03
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
test rax, rax
je 0x140012c03
mov r8d, esi
mov rdx, rax
mov rcx, rbp
call fcn.140012c20
jmp 0x140012c05
xor al, al
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x140012dd0
Capabilities:
Encode data using xor

Disassembly:
mov r9, rdx
test rdx, rdx
jne 0x140012ddb
xor eax, eax
ret
not ecx
test r8, r8
je 0x140012e20
lea r10, [0x14001b4c0]
nop dword [rax]
movzx edx, byte [r9]
lea r9, [r9 + 1]
mov eax, ecx
shr ecx, 4
xor rax, rdx
shr rdx, 4
and eax, 0xf
xor ecx, dword [r10 + rax*4]
mov eax, ecx
shr ecx, 4
and eax, 0xf
xor rax, rdx
xor ecx, dword [r10 + rax*4]
sub r8, 1
jne 0x140012df0
not ecx
mov eax, ecx
ret
Function at 0x140013440
Capabilities:
Enumerate pe sections

Disassembly:
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rsi, r8
test rcx, rcx
je 0x140013580
mov r9, qword [rcx + 0x58]
test r9, r9
je 0x140013580
cmp edx, dword [rcx + 0x10]
jae 0x140013580
cmp dword [rcx + 0x14], 1
jne 0x140013580
mov eax, edx
lea r8, [rax*4]
mov rax, qword [r9 + 0x20]
mov edi, dword [rax + r8]
add rdi, qword [r9]
je 0x140013580
test rsi, rsi
je 0x140013580
mov dword [rsi], edx
mov rax, qword [rcx + 0x58]
mov qword [rsp + 0x30], rbx
mov rcx, qword [rax + 0x20]
mov eax, dword [r8 + rcx]
mov dword [rsi + 4], eax
movzx eax, word [rdi + 4]
mov word [rsi + 8], ax
movzx eax, word [rdi + 6]
mov word [rsi + 0xa], ax
movzx eax, word [rdi + 8]
mov word [rsi + 0xc], ax
movzx eax, word [rdi + 0xa]
mov word [rsi + 0xe], ax
movzx edx, word [rdi + 0xe]
movzx ecx, word [rdi + 0xc]
call fcn.140012ed0
mov qword [rsi + 0x10], rax
lea rdx, [rdi + 0x2e]
mov eax, dword [rdi + 0x10]
mov ecx, 0x103
mov dword [rsi + 0x18], eax
mov eax, dword [rdi + 0x14]
mov qword [rsi + 0x20], rax
mov eax, dword [rdi + 0x18]
mov qword [rsi + 0x28], rax
movzx eax, word [rdi + 0x24]
mov word [rsi + 0x30], ax
mov eax, dword [rdi + 0x26]
mov dword [rsi + 0x34], eax
mov eax, dword [rdi + 0x2a]
mov qword [rsi + 0x38], rax
movzx eax, word [rdi + 0x1c]
cmp eax, ecx
cmovb ecx, eax
mov ebx, ecx
lea rcx, [rsi + 0x44]
mov r8d, ebx
call sub.VCRUNTIME140.dll_memcpy
mov byte [rbx + rsi + 0x44], 0
mov ecx, 0xff
movzx eax, word [rdi + 0x20]
cmp eax, ecx
cmovb ecx, eax
mov dword [rsi + 0x40], ecx
movzx edx, word [rdi + 0x1e]
mov ebx, ecx
add rdx, rdi
movzx ecx, word [rdi + 0x1c]
mov r8d, ebx
add rcx, 0x2e
add rdx, rcx
lea rcx, [rsi + 0x148]
call sub.VCRUNTIME140.dll_memcpy
mov byte [rbx + rsi + 0x148], 0
mov eax, 1
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
mov rsi, qword [rsp + 0x38]
xor eax, eax
add rsp, 0x20
pop rdi
ret
Function at 0x14001617c
Capabilities:
Enumerate pe sections

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
movsxd r8, dword [0x14000003c]
lea rsi, [0x140000000]
add r8, rsi
mov rbx, rdx
mov rdi, rcx
cmp dword [r8 + 0x84], 0xd
jbe 0x1400161f4
mov r10d, dword [r8 + 0xf0]
xor r9d, r9d
test r10d, r10d
je 0x1400161f4
movzx ecx, word [r8 + 0x14]
movzx r11d, word [r8 + 6]
add rcx, 0x18
mov r10d, dword [r10 + rsi + 0xc]
add rcx, r8
test r11d, r11d
je 0x1400161f4
mov eax, dword [rcx + 0xc]
cmp r10d, eax
jb 0x1400161e8
mov edx, dword [rcx + 8]
add eax, edx
cmp r10d, eax
jb 0x140016206
inc r9d
add rcx, 0x28
cmp r9d, r11d
jb 0x1400161d6
xor eax, eax
mov rbx, qword [rsp + 8]
mov rsi, qword [rsp + 0x10]
mov rdi, qword [rsp + 0x18]
ret
mov dword [rdi], edx
mov eax, dword [rcx + 0x24]
mov dword [rbx], eax
mov eax, dword [rcx + 0xc]
add rax, rsi
jmp 0x1400161f6

Function at 0x140017120
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp qword [rbx + 0x18], 8
jb 0x14001713b
mov rbx, qword [rbx]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
cmp eax, 0xffffffff
jne 0x140017153
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov dl, 1
xor ecx, ecx
call fcn.140017210
mov eax, ebx
add rsp, 0x20
pop rbx
ret

Function at 0x140017e10
Capabilities:
Parse pe header

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

Disassembly:
push rbx
sub rsp, 0x80
mov rax, qword [0x140054008]
xor rax, rsp
mov qword [rsp + 0x70], rax
xor r9d, r9d
mov r8d, 0x2328
xor ecx, ecx
lea edx, [r9 + 1]
call qword [sym.imp.USER32.dll_SetTimer]
lea r9, [rsp + 0x38]
mov qword [rsp + 0x28], 0
lea r8, section..text
mov qword [rsp + 0x38], rax
xor edx, edx
mov dword [rsp + 0x20], 0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
xor r9d, r9d
lea rcx, [rsp + 0x40]
xor r8d, r8d
xor edx, edx
mov rbx, rax
call qword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
je 0x140001126
nop word [rax + rax]
cmp dword [rsp + 0x48], 0x113
jne 0x1400010a6
mov rax, qword [rsp + 0x38]
cmp qword [rsp + 0x50], rax
je 0x1400010d5
lea rcx, [rsp + 0x40]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rsp + 0x40]
call qword [sym.imp.USER32.dll_DispatchMessageA]
xor r9d, r9d
lea rcx, [rsp + 0x40]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
jne 0x140001090
jmp 0x140001126
lea rdx, [rsp + 0x30]
mov dword [rsp + 0x30], 0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x140001119
xor r9d, r9d
lea r8, [0x140051370]
xor ecx, ecx
lea rdx, [0x140051370]
cmp dword [rsp + 0x30], 0x103
je 0x140001113
lea rdx, [0x140051374]
call qword [sym.imp.USER32.dll_MessageBoxA]
mov rdx, qword [rsp + 0x38]
xor ecx, ecx
call qword [sym.imp.USER32.dll_KillTimer]
xor eax, eax
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.140001150
add rsp, 0x80
pop rbx
ret

Function at 0x140003e70
Capabilities:
Get thread local storage value

Disassembly:
mov dword [rsp + 8], ecx
sub rsp, 0x48
call fcn.140003950
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
je 0x140003eaf
mov rax, qword [rsp + 0x20]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x30], rax
mov ecx, dword [rsp + 0x50]
mov rax, qword [rsp + 0x30]
call qword [0x1400402d0]
jmp 0x140003eb9
mov ecx, dword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
add rsp, 0x48
ret
Function at 0x140020550
Capabilities:
Print debug messages

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x28
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
add rsp, 0x28
ret
Function at 0x140023da0
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0xb8
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.140002e50
lea rcx, [rsp + 0x40]
call fcn.140023d60
movzx eax, al
test eax, eax
jne 0x140023de8
mov qword [rsp + 0x70], 0
lea rcx, [rsp + 0x40]
call fcn.140023c90
mov rax, qword [rsp + 0x70]
jmp 0x140023fb9
lea rcx, [rsp + 0x40]
call fcn.140002ed0
mov qword [rsp + 0x60], rax
mov rcx, qword [rsp + 0x60]
call fcn.140023d10
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x78]
sub rcx, rax
mov rax, rcx
sar rax, 1
mov qword [rsp + 0x68], rax
lea rcx, [rsp + 0x40]
call fcn.140002ed0
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, dword [rsp + 0x68]
mov r8, rax
xor edx, edx
xor ecx, ecx
call fcn.140023b60
cdqe
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
jne 0x140023e8e
mov qword [rsp + 0x80], 0
lea rcx, [rsp + 0x40]
call fcn.140023c90
mov rax, qword [rsp + 0x80]
jmp 0x140023fb9
mov r9d, 0x66
lea r8, str.minkernelcrtsucrt_srcdesktopcrtenvget_environment_from_os.cpp
mov edx, 2
mov rcx, qword [rsp + 0x58]
call fcn.14000ec40
mov rdx, rax
lea rcx, [rsp + 0x48]
call fcn.140002e50
lea rcx, [rsp + 0x48]
call fcn.140002e90
movzx eax, al
test eax, eax
jne 0x140023ef5
mov qword [rsp + 0x88], 0
lea rcx, [rsp + 0x48]
call fcn.140002e70
lea rcx, [rsp + 0x40]
call fcn.140023c90
mov rax, qword [rsp + 0x88]
jmp 0x140023fb9
lea rcx, [rsp + 0x48]
call fcn.140002ed0
mov qword [rsp + 0x90], rax
lea rcx, [rsp + 0x40]
call fcn.140002ed0
mov qword [rsp + 0x98], rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x68]
mov r8, qword [rsp + 0x98]
xor edx, edx
xor ecx, ecx
call fcn.140023b60
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jne 0x140023f8b
mov qword [rsp + 0xa0], 0
lea rcx, [rsp + 0x48]
call fcn.140002e70
lea rcx, [rsp + 0x40]
call fcn.140023c90
mov rax, qword [rsp + 0xa0]
jmp 0x140023fb9
lea rcx, [rsp + 0x48]
call fcn.140003400
mov qword [rsp + 0xa8], rax
lea rcx, [rsp + 0x48]
call fcn.140002e70
lea rcx, [rsp + 0x40]
call fcn.140023c90
mov rax, qword [rsp + 0xa8]
add rsp, 0xb8
ret
Function at 0x14002ffe0
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0xb8
lea rcx, [rsp + 0x78]
call fcn.1400215d0
lea rcx, [rsp + 0x48]
call fcn.1400215d0
call fcn.140021880
mov r8d, eax
lea rdx, [rsp + 0x78]
mov rcx, qword [rsp + 0xc0]
call fcn.140020ac0
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0
je 0x14003004f
mov dword [rsp + 0x24], 0
lea rcx, [rsp + 0x48]
call fcn.140021690
lea rcx, [rsp + 0x78]
call fcn.140021690
mov eax, dword [rsp + 0x24]
jmp 0x1400300e0
call fcn.140021880
mov r8d, eax
lea rdx, [rsp + 0x48]
mov rcx, qword [rsp + 0xc8]
call fcn.140020ac0
mov dword [rsp + 0x28], eax
cmp dword [rsp + 0x28], 0
je 0x140030096
mov dword [rsp + 0x2c], 0
lea rcx, [rsp + 0x48]
call fcn.140021690
lea rcx, [rsp + 0x78]
call fcn.140021690
mov eax, dword [rsp + 0x2c]
jmp 0x1400300e0
lea rcx, [rsp + 0x48]
call fcn.140021be0
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x78]
call fcn.140021be0
mov qword [rsp + 0x40], rax
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov dword [rsp + 0x30], eax
lea rcx, [rsp + 0x48]
call fcn.140021690
lea rcx, [rsp + 0x78]
call fcn.140021690
mov eax, dword [rsp + 0x30]
add rsp, 0xb8
ret
Function at 0x140038f00
Capabilities:
Write file on windows

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rsi
push rdi
mov eax, 0x1498
call fcn.14003e3d0
sub rsp, rax
mov rax, qword [0x140054008]
xor rax, rsp
mov qword [rsp + 0x1480], rax
mov eax, dword [rsp + 0x14b8]
sar eax, 6
cdqe
lea rcx, [0x140055cb0]
mov edx, dword [rsp + 0x14b8]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
mov rax, qword [rax + rdx + 0x28]
mov qword [rsp + 0x60], rax
mov eax, dword [rsp + 0x14c8]
mov rcx, qword [rsp + 0x14c0]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x68]
mov rdi, rax
xor eax, eax
mov ecx, 0xc
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x14c0]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x50]
cmp qword [rsp + 0x48], rax
jae 0x1400390f2
lea rax, [rsp + 0x147f]
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x58]
cmp qword [rsp + 0x38], rax
jae 0x140039046
mov rax, qword [rsp + 0x50]
cmp qword [rsp + 0x48], rax
jae 0x140039046
mov rax, qword [rsp + 0x48]
movzx eax, byte [rax]
mov byte [rsp + 0x31], al
mov rax, qword [rsp + 0x48]
inc rax
mov qword [rsp + 0x48], rax
movzx eax, byte [rsp + 0x31]
mov byte [rsp + 0x30], al
movsx eax, byte [rsp + 0x30]
cmp eax, 0xa
jne 0x14003902b
mov eax, dword [rsp + 0x70]
inc eax
mov dword [rsp + 0x70], eax
mov rax, qword [rsp + 0x38]
mov byte [rax], 0xd
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
movzx ecx, byte [rsp + 0x30]
mov byte [rax], cl
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
jmp 0x140038fc8
lea rax, [rsp + 0x80]
mov rcx, qword [rsp + 0x38]
sub rcx, rax
mov rax, rcx
mov dword [rsp + 0x40], eax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x44]
mov r8d, dword [rsp + 0x40]
lea rdx, [rsp + 0x80]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1400390b2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x68], eax
lea rax, [rsp + 0x68]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x140039111
mov eax, dword [rsp + 0x44]
mov ecx, dword [rsp + 0x6c]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x6c], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x44], eax
jae 0x1400390ed
lea rax, [rsp + 0x68]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x140039111
jmp 0x140038f9e
lea rax, [rsp + 0x68]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
mov rcx, qword [rsp + 0x1480]
xor rcx, rsp
call fcn.140001150
add rsp, 0x1498
pop rdi
pop rsi
ret