joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400bda60
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rbx, rcx
mov rcx, qword [rcx]
mov rdi, r8
cmp dword [rcx + 8], 2
mov rsi, rdx
jne 0x1400bdaaa
mov rax, qword [rbx + 0x18]
test rax, rax
jne 0x1400bda9a
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
mov r9, qword [rcx + 0x10]
mov edx, 1
mov rcx, rsi
call rax
jmp 0x1400bdaf4
cmp qword [rbx + 0x10], 0
jne 0x1400bdadf
mov rcx, qword [rcx + 0x10]
lea rdx, [0x1400da7b4]
call qword [sym.imp.msvcrt.dll_fopen]
mov qword [rbx + 0x10], rax
test rax, rax
jne 0x1400bdadf
or rax, 0xffffffffffffffff
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
mov r9, qword [rbx + 0x10]
mov r8, rdi
mov edx, 1
mov rcx, rsi
call qword [sym.imp.msvcrt.dll_fread]
mov rdi, rax
test rax, rax
jne 0x1400bdb18
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x1400bdb0f
call qword [sym.imp.msvcrt.dll_fclose]
mov qword [rbx + 0x10], rdi
mov rax, qword [rbx]
mov rcx, qword [rax]
mov qword [rbx], rcx
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
mov rax, rdi
add rsp, 0x20
pop rdi
ret

Function at 0x1400bfd20
Capabilities:
Get hostname

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
movsxd rbx, edx
mov rdi, rcx
mov byte [rcx], 0
mov edx, ebx
call qword [sym.imp.WSOCK32.DLL_gethostname]
mov byte [rbx + rdi - 1], 0
test eax, eax
jne 0x1400bfd5a
lea edx, [rax + 0x2e]
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_strchr]
test rax, rax
je 0x1400bfd58
mov byte [rax], 0
xor eax, eax
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x1400c20a0
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rdi
push r14
sub rsp, 0x20
mov eax, dword [rcx + 0x18]
mov rbx, rcx
mov ebp, r8d
lea ecx, [rax + rax]
mov eax, dword [rbx + 0x20]
mov r14, rdx
add rax, 0x18
add rcx, rax
call qword [sub.msvcrt.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x1400c20e2
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
lea rcx, [rax + 0x18]
mov qword [rax], rbx
mov qword [rsp + 0x48], rsi
mov qword [rax + 8], rcx
mov eax, dword [rbx + 0x18]
add rax, rcx
mov qword [rdi + 0x10], rax
cmp ebp, dword [rbx + 0x1c]
jbe 0x1400c2125
call qword [rbx]
mov rcx, qword [rdi + 8]
mov r8d, ebp
mov rdx, r14
call qword [rbx + 8]
mov r14d, dword [rbx + 0x18]
mov rdx, qword [rdi + 8]
add r14, qword [rdi + 0x10]
mov rcx, r14
call qword [rbx + 0x10]
mov ebp, dword [rbx + 0x20]
mov rcx, qword [rdi + 8]
call qword [rbx]
mov rcx, qword [rdi + 0x10]
call qword [rbx]
xor esi, esi
test rbp, rbp
je 0x1400c2181
mov rsi, rbp
nop dword [rax + rax]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
mov r8d, 1
xor al, 0x36
mov byte [rsp + 0x40], al
mov rcx, qword [rdi + 8]
call qword [rbx + 8]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x5c
mov r8d, 1
lea r14, [r14 + 1]
mov byte [rsp + 0x40], al
mov rcx, qword [rdi + 0x10]
call qword [rbx + 8]
dec rbp
jne 0x1400c2140
mov eax, dword [rbx + 0x1c]
cmp rsi, rax
jae 0x1400c21c3
nop dword [rax]
mov rcx, qword [rdi + 8]
lea rdx, [0x1400e7702]
mov r8d, 1
call qword [rbx + 8]
mov rcx, qword [rdi + 0x10]
lea rdx, [0x1400e7703]
mov r8d, 1
call qword [rbx + 8]
mov eax, dword [rbx + 0x1c]
inc rsi
cmp rsi, rax
jb 0x1400c2190
mov rsi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x50]
mov rax, rdi
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
Function at 0x140210020
Capabilities:
Terminate process

Disassembly:
cld
pop r11
jmp 0x14021002d
inc rsi
mov byte [rdi], dl
inc rdi
mov dl, byte [rsi]
add ebx, ebx
jne 0x14021003d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jb 0x140210025
lea eax, [rcx + 1]
jmp 0x14021004b
dec eax
call r11
adc eax, eax
call r11
adc eax, eax
add ebx, ebx
jne 0x14021005e
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jae 0x140210044
sub eax, 3
jb 0x14021007e
shl eax, 8
movzx edx, dl
or eax, edx
inc rsi
xor eax, 0xffffffff
je 0x1402100cd
sar eax, 1
movsxd rbp, eax
jb 0x1402100b4
jmp 0x14021008c
add ebx, ebx
jne 0x14021008a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x1402100b4
inc ecx
add ebx, ebx
jne 0x14021009a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x1402100b4
call r11
adc ecx, ecx
add ebx, ebx
jne 0x1402100ad
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jae 0x14021009c
add ecx, 2
jmp 0x1402100b9
call r11
adc ecx, ecx
cmp rbp, 0xfffffffffffffb00
adc ecx, 2
call fcn.14020ffe2
jmp 0x14021002d
pop rsi
mov rdi, rsi
push rsi
mov rdi, rsi
mov rsi, 0xbca00
mov dl, 0x11
push rbx
push rdi
lea rcx, [rdi + rsi - 3]
pop rsi
push rsi
pop rbx
jmp 0x140210119
cmp rsi, rcx
jae 0x140210121
push rsi
pop rsi
lodsb al, byte [rsi]
cmp al, 0x80
jb 0x140210100
cmp al, 0x8f
ja 0x140210100
cmp byte [rsi - 2], 0xf
je 0x140210106
sub al, 0xe8
cmp al, 1
ja 0x1402100ea
cmp rsi, rcx
jae 0x140210121
push rsi
lodsd eax, dword [rsi]
sub al, dl
jne 0x1402100f0
pop rdi
bswap eax
sub eax, edi
add eax, ebx
stosd dword [rdi], eax
cmp rsi, rcx
jae 0x140210121
lodsb al, byte [rsi]
jmp 0x140210100
pop rbx
pop rsi
sub rsp, 0x28
lea rdi, [rsi + 0x20b000]
mov eax, dword [rdi]
or eax, eax
je 0x14021017e
mov ebx, dword [rdi + 4]
lea rcx, [rax + rsi + 0x2101dc]
add rbx, rsi
add rdi, 8
call qword [sym.imp.KERNEL32.DLL_LoadLibraryA]
xchg rbp, rax
mov al, byte [rdi]
inc rdi
or al, al
je 0x14021012e
mov rcx, rdi
mov rdx, rdi
dec eax
repne scasb al, byte [rdi]
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
or rax, rax
je 0x140210178
mov qword [rbx], rax
add rbx, 8
jmp 0x14021014e
jmp qword [sym.imp.KERNEL32.DLL_ExitProcess]
add rsp, 0x28
add rdi, 4
lea rbx, [rsi - 4]
xor eax, eax
mov al, byte [rdi]
inc rdi
or eax, eax
je 0x1402101c2
cmp al, 0xef
ja 0x1402101aa
add rbx, rax
mov rax, qword [rbx]
bswap rax
add rax, rsi
mov qword [rbx], rax
jmp 0x14021018a
and al, 0xf
shl eax, 0x10
mov ax, word [rdi]
add rdi, 2
or eax, eax
jne 0x140210199
mov eax, dword [rdi]
add rdi, 4
jmp 0x140210199
mov rbp, qword [sym.imp.KERNEL32.DLL_VirtualProtect]
lea rdi, [rsi - 0x1000]
mov ebx, 0x1000
push rax
mov r9, rsp
mov r8d, 4
mov rdx, rbx
mov rcx, rdi
sub rsp, 0x20
call rbp
lea rax, [rdi + 0x22f]
and byte [rax], 0x7f
and byte [rax + 0x28], 0x7f
lea r9, [rsp + 0x20]
mov r8, qword [r9]
mov rdx, rbx
mov rcx, rdi
call rbp
add rsp, 0x28
pop rbp
pop rdi
pop rsi
pop rbx
lea rax, [rsp - 0x80]
push 0
cmp rsp, rax
jne 0x140210216
sub rsp, 0xffffffffffffff80
jmp 0x140089fa8
Function at 0x14161f058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x14161f1df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x14161f089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14161f06f
add dl, dl
jne 0x14161f096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14161f0f6
xor eax, eax
add dl, dl
jne 0x14161f0a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14161f1ad
add dl, dl
jne 0x14161f0b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14161f0c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14161f0d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14161f0dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x14161f0ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x14161f07e
mov eax, 1
add dl, dl
jne 0x14161f106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14161f113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14161f0fb
sub eax, ebx
mov ebx, 1
jne 0x14161f14c
mov ecx, 1
add dl, dl
jne 0x14161f12e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14161f13b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14161f123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14161f07e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x14161f168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14161f175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14161f15d
cmp eax, 0x7d00
jae 0x14161f19b
cmp eax, 0x500
jb 0x14161f196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14161f07e
cmp eax, 0x7f
ja 0x14161f19e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14161f07e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x14161f1d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x14161f07e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20

Function at 0x14001196c
Capabilities:
Parse pe header

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

Function at 0x1400150d0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1400150f8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x1400150f8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x14007aa3c
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x40
cmp dword [0x140098220], 0
mov r14, rdx
mov r15, rcx
lea rbx, [0x140098230]
jne 0x14007aa89
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov rcx, rbx
mov dword [0x140098258], eax
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x140098220], 1
mov ecx, dword [0x140098258]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbp, rax
test rax, rax
jne 0x14007ab5e
mov rcx, qword [0x140096d1c]
lea edx, [rax + 8]
lea r8d, [rax + 0x28]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x14007ab89
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [0x140098228]
test rax, rax
je 0x14007aad9
mov qword [rax], rbp
mov rcx, rbx
mov qword [rbp + 8], rax
mov qword [0x140098228], rbp
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
and dword [rsp + 0x30], 0
and dword [rsp + 0x28], 0
lea r9, [rbp + 0x20]
mov r8, rdi
mov rcx, rax
mov rdx, rbx
mov dword [rsp + 0x20], 0x100000
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov rdx, qword [rbp + 0x20]
lea rcx, [rbp + 0x18]
lea r8, [0x14007aba4]
mov r9, rbp
mov dword [rsp + 0x28], 8
or dword [rsp + 0x20], 0xffffffff
call qword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
mov ecx, dword [0x140098258]
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rcx, qword [0x140096d1c]
xor edx, edx
lea r8d, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
je 0x14007ab89
mov qword [rax + 8], r15
mov qword [rax + 0x10], r14
mov rcx, qword [rbp + 0x10]
mov qword [rax], rcx
mov qword [rbp + 0x10], rax
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x40
pop r15
pop r14
pop rdi
ret

Function at 0x18106a4d4
Capabilities:
Encode data using xor

Disassembly:
jmp 0x18106a4de
push rax
push rcx
push rdx
push rbx
push rbp
push rsi
push rdi
push r8
push r9
push r10
push r11
push r12
push r13
push r14
push r15
pushfq
sub rsp, 8
stmxcsr dword [rsp]
call 0x18106a507
pop rbp
sub rbp, 0x33
sub rbp, 0x106a4d4
cmp edx, 1
je 0x18106a54a
ldmxcsr dword [rsp]
add rsp, 8
popfq
pop r15
pop r14
pop r13
pop r12
pop r11
pop r10
pop r9
pop r8
pop rdi
pop rsi
pop rbp
pop rbx
pop rdx
pop rcx
pop rax
xor rax, rax
ret
sub rsp, 0x20
jmp 0x18106a55a
mov rax, 0x106a4d4
add rax, rbp
add rax, 0xb8
mov rcx, 0x60b
mov rdx, 0xa1ed2c7
xor byte [rax], dl
inc rax
dec rcx
jne 0x18106a579
jmp 0x18106a590
invalid
Function at 0x180001450
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x48
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x180001483
xor eax, eax
jmp 0x18000154c
mov rax, qword [rsp + 0x38]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x50]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x1800014b0
xor eax, eax
jmp 0x18000154c
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x14]
mov rcx, qword [rsp + 0x28]
lea rax, [rcx + rax + 0x18]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x20], 0
jmp 0x1800014dc
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 6]
cmp dword [rsp + 0x20], eax
jge 0x18000154a
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0x30]
add rcx, rax
mov rax, rcx
mov rdx, rax
mov rcx, qword [rsp + 0x60]
call fcn.18001a5c0
test eax, eax
jne 0x180001548
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x30]
mov eax, dword [rdx + rax + 8]
mov dword [rcx], eax
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0x30]
mov eax, dword [rcx + rax + 0xc]
mov rcx, qword [rsp + 0x50]
add rcx, rax
mov rax, rcx
jmp 0x18000154c
jmp 0x1800014d2
xor eax, eax
add rsp, 0x48
ret
Function at 0x18001abe8
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 0x18001ac57
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x18001ac57
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x18001ac57
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x18001ac57
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x18001ac57
cmp dword [rcx + 0x84], 0xe
jbe 0x18001ac57
cmp dword [rcx + 0xf8], 0
je 0x18001ac57
mov ecx, ebx
call fcn.18001ad74
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.18001a9c4
nop
cmp dword [rbp + 0x20], 0
je 0x18001aca5
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.18001acb0
int3
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
jmp 0x18001abe8
Function at 0x180048a94
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 0x180048ac4
xor eax, eax
jmp 0x180048b87
mov rbp, rbx
cmp word [rax], si
je 0x180048ae9
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x180048ad0
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x180048acc
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.180048944
movsxd r14, eax
test eax, eax
jne 0x180048b27
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x180048abd
mov rcx, r14
call fcn.18001cef0
mov rdi, rax
test rax, rax
jne 0x180048b40
xor ecx, ecx
call fcn.18001ceb4
jmp 0x180048b1c
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.180048944
test eax, eax
jne 0x180048b71
mov rcx, rdi
call fcn.18001ceb4
jmp 0x180048b7b
xor ecx, ecx
call fcn.18001ceb4
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 0x180048ba4
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 0x180048c2b
mov rsi, rbx
cmp word [rax], bp
je 0x180048bea
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x180048bd4
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x180048bd0
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.18001cef0
mov rdi, rax
test rax, rax
je 0x180048c18
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.18000e990
mov rbp, rdi
xor ecx, ecx
call fcn.18001ceb4
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 0x180054524
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.180046810
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x1800545ae
cmp byte [rbp - 0x21], r15b
je 0x1800545a9
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x1800545e4
call fcn.18004a4b8
test eax, eax
jne 0x1800545d0
cmp byte [rbp - 0x21], r15b
je 0x1800545c8
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x1800545e4
cmp byte [rbp - 0x21], r15b
je 0x1800545e1
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.1800455a8
test eax, eax
jne 0x180054684
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.180046810
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x180054623
cmp byte [rbp - 0x21], r15b
je 0x180054658
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x180054658
call fcn.18004a4b8
test eax, eax
jne 0x180054644
cmp byte [rbp - 0x21], r15b
je 0x18005463d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x180054658
cmp byte [rbp - 0x21], r15b
je 0x180054655
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.1800455a8
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x180054684
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x180054687
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x180054695
mov rcx, rdi
call fcn.18001ceb4
cmp byte [rbp + 0x3f], r15b
je 0x1800546a4
mov rcx, qword [rbp + 0x27]
call fcn.18001ceb4
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 0x18005cfac
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x30
movsxd rbp, ecx
mov r9, r8
mov rax, rbp
lea rcx, [0x180077d40]
and eax, 0x3f
mov r10, rbp
sar r10, 6
xor edi, edi
mov rsi, rdx
mov r14, rbp
lea r8, [rax + rax*8]
mov rax, qword [rcx + r10*8]
mov ecx, 4
mov qword [rsp + 0x78], rcx
mov r11, qword [rax + r8*8 + 0x28]
lea r12d, [rcx + 6]
test r9, r9
je 0x18005d00a
cmp word [rdx], r12w
jne 0x18005d00a
or byte [rax + r8*8 + 0x38], cl
jmp 0x18005d010
and byte [rax + r8*8 + 0x38], 0xfb
lea rdx, [rdx + r9*2]
mov rcx, rsi
mov rbx, rsi
cmp rsi, rdx
jae 0x18005d16b
mov r9d, 0x1a
lea r13d, [r9 - 0xd]
movzx eax, word [rcx]
cmp ax, r9w
je 0x18005d146
lea r9, [rcx + 2]
cmp ax, r13w
je 0x18005d049
mov rcx, r9
jmp 0x18005d06c
cmp r9, rdx
jae 0x18005d083
cmp word [r9], r12w
mov eax, 2
cmove rax, qword [rsp + 0x78]
add rcx, rax
mov eax, r12d
cmp word [r9], r12w
cmovne ax, r13w
mov word [rbx], ax
mov r9d, 0x1a
add rbx, 2
cmp rcx, rdx
jb 0x18005d02d
jmp 0x18005d16b
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rdi
mov r8d, 2
lea rdx, [rsp + 0x70]
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18005d140
cmp dword [rsp + 0x80], edi
je 0x18005d140
mov rdx, r14
lea r11, [0x180077d40]
sar rdx, 6
and r14d, 0x3f
mov rax, qword [r11 + rdx*8]
lea r8, [r14 + r14*8]
test byte [rax + r8*8 + 0x38], 0x48
je 0x18005d119
movzx eax, word [rsp + 0x70]
cmp ax, r12w
jne 0x18005d0ec
mov word [rbx], r12w
jmp 0x18005d167
mov word [rbx], r13w
mov word [rsp + 0x78], ax
mov rax, qword [r11 + rdx*8]
lea rcx, [rax + r8*8]
mov al, byte [rsp + rdi + 0x78]
mov byte [rcx + rdi + 0x3a], al
inc rdi
cmp rdi, 2
jl 0x18005d0f5
mov rax, qword [r11 + rdx*8]
mov byte [rax + r8*8 + 0x3c], r12b
jmp 0x18005d167
cmp word [rsp + 0x70], r12w
jne 0x18005d126
cmp rbx, rsi
je 0x18005d0e6
mov rdx, 0xfffffffffffffffe
mov ecx, ebp
lea r8d, [rdx + 3]
call fcn.18005cc78
cmp word [rsp + 0x70], r12w
je 0x18005d16b
mov word [rbx], r13w
jmp 0x18005d167
lea r11, [0x180077d40]
mov rcx, qword [r11 + r10*8]
mov al, byte [rcx + r8*8 + 0x38]
test al, 0x40
jne 0x18005d163
or al, 2
mov byte [rcx + r8*8 + 0x38], al
jmp 0x18005d16b
mov word [rbx], r9w
add rbx, 2
sub rbx, rsi
sar rbx, 1
lea eax, [rbx + rbx]
add rsp, 0x30
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret