joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1401138b0
Capabilities:
Check for time delay via queryperformancecounter
Execute anti-debugging instructions

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x50
movapd xmmword [rsp + 0x40], xmm6
mov rsi, rcx
mov rax, qword [0x14022f038]
xor rax, rsp
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x20]
call fcn.140112e50
mov qword [rsp + 0x28], 0
mov rcx, qword [rsp + 0x20]
lea rdx, [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_QueryThreadCycleTime]
movsd xmm0, qword [0x140243e70]
xorpd xmm6, xmm6
ucomisd xmm0, xmm6
jne 0x14011390e
jnp 0x140113974
ucomisd xmm0, xmm6
jne 0x14011391a
jnp 0x140113a89
movsd xmm1, qword [rsp + 0x28]
unpcklps xmm1, xmmword [0x14020c270]
subpd xmm1, xmmword [0x14020c280]
movapd xmm2, xmm1
unpckhpd xmm2, xmm1
addsd xmm2, xmm1
divsd xmm2, xmm0
mulsd xmm2, qword [0x14020bd00]
cvttsd2si rax, xmm2
mov qword [rsi], rax
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.14014ced0
mov rax, rsi
movaps xmm6, xmmword [rsp + 0x40]
add rsp, 0x50
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rbx, qword [sym.imp.KERNEL32.dll_GetCurrentThread]
call rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov edi, eax
call rbx
mov rcx, rax
mov edx, 2
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov eax, dword [0x140243e80]
mov ecx, dword [0x14023ece4]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140113a90
mov eax, dword [0x140243e90]
mov ecx, dword [0x14023ece4]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140113aca
rdtsc
mov rbx, rax
mov r14, rdx
xor r12d, r12d
lea r15, [rsp + 0x30]
mov qword [r15], r12
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov r13, qword [r15]
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rcx, rax
mov edx, edi
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov qword [r15], r12
lea rdi, [rsp + 0x30]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
sub r13, qword [0x140243e88]
cvtsi2sd xmm1, r13
xorps xmm0, xmm0
cvtsi2sd xmm0, qword [rdi]
divsd xmm1, xmm0
xorpd xmm0, xmm0
movsd xmm2, qword [0x140216c18]
ucomisd xmm2, xmm1
ja 0x14011390e
shl r14, 0x20
or rbx, r14
sub rbx, qword [0x140243e78]
movq xmm0, rbx
punpckldq xmm0, xmmword [0x14020c270]
subpd xmm0, xmmword [0x14020c280]
haddpd xmm0, xmm0
divsd xmm0, xmm1
movsd qword [0x140243e70], xmm0
jmp 0x14011390e
xor eax, eax
jmp 0x14011394c
lea rcx, [0x140243e80]
call fcn.14014c510
cmp dword [0x140243e80], 0xffffffff
jne 0x1401139bd
rdtsc
shl rdx, 0x20
or rdx, rax
mov qword [0x140243e78], rdx
lea rcx, [0x140243e80]
call fcn.14014c5a8
jmp 0x1401139bd
lea rcx, [0x140243e90]
call fcn.14014c510
cmp dword [0x140243e90], 0xffffffff
jne 0x1401139e2
lea rbx, [rsp + 0x30]
mov qword [rbx], 0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rbx]
mov qword [0x140243e88], rax
lea rcx, [0x140243e90]
call fcn.14014c5a8
jmp 0x1401139e2
Function at 0x140116380
Capabilities:
Check if file exists

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x28
mov rsi, rcx
xor eax, eax
mov dword [rcx], eax
mov qword [rcx + 8], rax
mov ecx, dword [rdx]
mov dword [rsi], ecx
mov dword [rdx], eax
mov rbx, qword [rdx + 8]
mov qword [rdx + 8], rax
lea r14, [rbx + 1]
cmp r14, 2
jb 0x1401163b1
call fcn.140100430
cmp qword [rsi + 8], rbx
je 0x1401163e3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rax, qword [rsi + 8]
inc rax
cmp rax, 2
jae 0x1401163f0
cmp r14, 2
jb 0x1401163db
mov qword [rsi + 8], rbx
call fcn.140100430
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, rsi
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
ret
call fcn.140100430
mov rcx, qword [rsi + 8]
call fcn.140112e70
mov qword [rsi + 8], 0
jmp 0x1401163cc

Function at 0x140116410
Capabilities:
Check if file exists

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x28
mov rsi, rcx
mov eax, dword [rdx]
mov dword [rcx], eax
mov dword [rdx], 0
mov rbx, qword [rdx + 8]
mov qword [rdx + 8], 0
lea r14, [rbx + 1]
cmp r14, 2
jb 0x140116441
call fcn.140100430
cmp qword [rsi + 8], rbx
je 0x140116473
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rax, qword [rsi + 8]
inc rax
cmp rax, 2
jae 0x140116480
cmp r14, 2
jb 0x14011646b
mov qword [rsi + 8], rbx
call fcn.140100430
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, rsi
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
ret
call fcn.140100430
mov rcx, qword [rsi + 8]
call fcn.140112e70
mov qword [rsi + 8], 0
jmp 0x14011645c
Function at 0x140121420
Capabilities:
Encode data using base64

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x28
mov rdi, rdx
mov rsi, rcx
mov rcx, qword [rcx]
mov rbx, qword [rsi + 8]
sub rbx, rcx
sar rbx, 3
lea rdx, [rbx + 1]
mov rax, rdx
shr rax, 0x3d
jne 0x140121566
movabs rax, 0x1fffffffffffffff
mov r8, qword [rsi + 0x10]
sub r8, rcx
mov r14, r8
sar r14, 2
cmp r14, rdx
cmovbe r14, rdx
movabs rcx, 0x7ffffffffffffff8
cmp r8, rcx
cmovae r14, rax
test r14, r14
je 0x14012155f
cmp r14, rax
ja 0x14012156b
lea rcx, [r14*8]
call fcn.14014c3b0
shl rbx, 3
add rbx, rax
je 0x140121570
lea rax, [rax + r14*8]
mov rcx, qword [rdi]
mov qword [rdi], 0
mov qword [rbx], rcx
lea rcx, [rbx + 8]
mov rdi, qword [rsi]
mov rdx, qword [rsi + 8]
cmp rdx, rdi
jne 0x1401214e5
mov qword [rsi], rbx
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rax
test rdi, rdi
jne 0x140121542
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
ret
mov r8, qword [rdx - 8]
mov qword [rdx - 8], 0
lea r9, [rdx - 8]
mov qword [rbx - 8], r8
add rbx, 0xfffffffffffffff8
mov rdx, r9
cmp r9, rdi
jne 0x1401214e5
mov rdi, qword [rsi]
mov r14, qword [rsi + 8]
mov qword [rsi], rbx
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rax
cmp r14, rdi
je 0x1401214d6
add r14, 0xfffffffffffffff8
test r14, r14
je 0x14012159c
mov rcx, qword [r14]
mov qword [r14], 0
test rcx, rcx
jne 0x140121553
lea rax, [r14 - 8]
cmp r14, rdi
mov r14, rax
je 0x1401214d6
jmp 0x140121520
mov rcx, rdi
add rsp, 0x28
pop rbx
pop rdi
pop rsi
pop r14
jmp fcn.14014c3ec
mov edx, 1
call fcn.1401171c0
jmp 0x140121534
xor eax, eax
jmp 0x14012149d
call fcn.1401663e0
call fcn.140189a80
lea rax, str.null_pointer_given_to_construct_at
mov qword [rsp + 0x20], rax
lea rcx, str._s:_d:_assertion__s_failed:__s
lea rdx, str....._buildtools_third_partylibc_trunkinclude__memoryconstruct_at.h
lea r9, str.__location___nullptr
mov r8d, 0x23
call fcn.14018a2b0
lea rax, str.null_pointer_given_to_destroy_at
mov qword [rsp + 0x20], rax
lea rcx, str._s:_d:_assertion__s_failed:__s
lea rdx, str....._buildtools_third_partylibc_trunkinclude__memoryconstruct_at.h
lea r9, str.__loc___nullptr
mov r8d, 0x3f
call fcn.14018a2b0
int3
Function at 0x14012cdb0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov eax, ecx
test r8, r8
je 0x14012cddb
xor ecx, ecx
lea r9, [0x140218a00]
movzx r10d, al
movzx r11d, byte [rdx + rcx]
xor r11d, r10d
shr eax, 8
xor eax, dword [r9 + r11*4]
inc rcx
cmp r8, rcx
jne 0x14012cdc0
ret

Function at 0x14012db20
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
mov eax, dword [0x14024a3a0]
mov ecx, dword [0x14023ece4]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14012db55
lea rcx, [0x14024a390]
add rsp, 0x28
jmp fcn.1400a7360
lea rcx, [0x14024a3a0]
call fcn.14014c510
cmp dword [0x14024a3a0], 0xffffffff
jne 0x14012db45
xorps xmm0, xmm0
movups xmmword [0x14024a390], xmm0
lea rcx, [0x14024a390]
xor edx, edx
call fcn.1400a7400
lea rcx, [0x14024a3a0]
call fcn.14014c5a8
jmp 0x14012db45
Function at 0x1401349d0
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov rsi, qword [0x14024b240]
cmp rsi, 1
jbe 0x1401349f3
mov rcx, rsi
xor edx, edx
add rsp, 0x28
pop rdi
pop rsi
jmp fcn.14010cc90
lea rcx, [0x14024b240]
call fcn.14009b320
test al, al
je 0x140134a38
xorps xmm0, xmm0
movups xmmword [0x14024b248], xmm0
lea rdi, [0x14024b240]
lea rsi, [0x14024b248]
mov rcx, rsi
xor edx, edx
call fcn.1400a7400
mov rcx, rdi
mov rdx, rsi
xor r8d, r8d
mov r9, rdi
call fcn.14009b3e0
jmp 0x1401349e3
mov rsi, qword [0x14024b240]
jmp 0x1401349e3

Function at 0x140146ae0
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov rsi, qword [0x14024b358]
cmp rsi, 1
jbe 0x140146b03
mov rcx, rsi
xor edx, edx
add rsp, 0x28
pop rdi
pop rsi
jmp fcn.14010cc90
lea rcx, [0x14024b358]
call fcn.14009b320
test al, al
je 0x140146b48
xorps xmm0, xmm0
movups xmmword [0x14024b360], xmm0
lea rdi, [0x14024b358]
lea rsi, [0x14024b360]
mov rcx, rsi
xor edx, edx
call fcn.1400a7400
mov rcx, rdi
mov rdx, rsi
xor r8d, r8d
mov r9, rdi
call fcn.14009b3e0
jmp 0x140146af3
mov rsi, qword [0x14024b358]
jmp 0x140146af3

Function at 0x140146c30
Capabilities:
Get thread local storage value

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x30
mov esi, ecx
mov rax, qword [0x14022f038]
xor rax, rsp
mov qword [rsp + 0x28], rax
lea rax, [0x1400e4980]
mov qword [rsp + 0x20], rax
lea rcx, [0x14024b3d0]
lea rdx, [0x1400e4800]
lea r8, [rsp + 0x20]
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_InitOnceExecuteOnce]
test eax, eax
je 0x140146cc4
cmp dword [0x14024b3d8], 0
jne 0x140146cc0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov ecx, dword [0x14024b3dc]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rdi, rdi
je 0x140146cc0
movsxd rax, esi
mov rsi, qword [rdi + rax*8]
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.14014ced0
mov rax, rsi
add rsp, 0x30
pop rbx
pop rdi
pop rsi
ret
xor esi, esi
jmp 0x140146ca8
call fcn.1401663e0
int3

Function at 0x14014b570
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
mov eax, dword [0x14024c238]
mov ecx, dword [0x14023ece4]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14014b5d6
lea rcx, [0x14024c228]
xor edx, edx
call fcn.14010cc90
mov eax, dword [0x14024c250]
mov ecx, dword [0x14023ece4]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14014b611
lea rcx, [0x14024c240]
xor edx, edx
add rsp, 0x28
jmp fcn.14010cc90
lea rcx, [0x14024c238]
call fcn.14014c510
cmp dword [0x14024c238], 0xffffffff
jne 0x14014b595
xorps xmm0, xmm0
movups xmmword [0x14024c228], xmm0
lea rcx, [0x14024c228]
xor edx, edx
call fcn.1400a7400
lea rcx, [0x14024c238]
call fcn.14014c5a8
jmp 0x14014b595
lea rcx, [0x14024c250]
call fcn.14014c510
cmp dword [0x14024c250], 0xffffffff
jne 0x14014b5c4
xorps xmm0, xmm0
movups xmmword [0x14024c240], xmm0
lea rcx, [0x14024c240]
xor edx, edx
call fcn.1400a7400
lea rcx, [0x14024c250]
call fcn.14014c5a8
jmp 0x14014b5c4
Function at 0x140160224
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140160378

Function at 0x140160654
Capabilities:
Clear file content

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.1401653ac
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.1401653ac
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x1401607a4
cmp rax, 0xffffffffffffffff
je 0x1401607a4
xor edi, edi
test rbp, rbp
jle 0x14016074f
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.1401132c0
mov rbx, rax
test rax, rax
jne 0x1401606dc
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140160745
mov edx, 0x8000
mov ecx, r14d
call fcn.1401664b8
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.140169cec
cmp eax, 0xffffffff
je 0x140160725
cdqe
sub rbp, rax
test rbp, rbp
jg 0x1401606ec
mov edx, r15d
mov ecx, r14d
call fcn.1401664b8
jmp 0x140160745
cmp byte [rsi + 0x38], dil
je 0x14016073c
cmp dword [rsi + 0x34], 5
jne 0x14016073c
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], SafeArrayDestroy
cmp byte [rsi + 0x30], dil
je 0x140160745
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.140113220
jmp 0x1401607b8
jns 0x1401607b8
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.1401653ac
cmp rax, 0xffffffffffffffff
jne 0x140160770
cmp byte [rsi + 0x30], dil
je 0x1401607b8
mov edi, dword [rsi + 0x2c]
jmp 0x1401607b8
mov ecx, r14d
call fcn.1401638fc
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1401607b8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, SafeArrayDestroy
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], SafeArrayDestroy
jmp 0x1401607b8
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x1401607b1
mov eax, dword [rsi + 0x2c]
jmp 0x1401607b6
mov eax, reloc.WS2_32.dll_shutdown
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.1401653ac
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret
Function at 0x140166084
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, [0x14023fc20]
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 0x1401660e2
cmp word [rdx], r12w
jne 0x1401660e2
or byte [rax + r8*8 + 0x38], cl
jmp 0x1401660e8
and byte [rax + r8*8 + 0x38], 0xfb
lea rdx, [rdx + r9*2]
mov rcx, rsi
mov rbx, rsi
cmp rsi, rdx
jae 0x140166243
mov r9d, reloc.OLEAUT32.dll_SafeArrayCopy
lea r13d, [r9 - 0xd]
movzx eax, word [rcx]
cmp ax, r9w
je 0x14016621e
lea r9, [rcx + 2]
cmp ax, r13w
je 0x140166121
mov rcx, r9
jmp 0x140166144
cmp r9, rdx
jae 0x14016615b
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, reloc.OLEAUT32.dll_SafeArrayCopy
add rbx, 2
cmp rcx, rdx
jb 0x140166105
jmp 0x140166243
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 0x140166218
cmp dword [rsp + 0x80], edi
je 0x140166218
mov rdx, r14
lea r11, [0x14023fc20]
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 0x1401661f1
movzx eax, word [rsp + 0x70]
cmp ax, r12w
jne 0x1401661c4
mov word [rbx], r12w
jmp 0x14016623f
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 0x1401661cd
mov rax, qword [r11 + rdx*8]
mov byte [rax + r8*8 + 0x3c], r12b
jmp 0x14016623f
cmp word [rsp + 0x70], r12w
jne 0x1401661fe
cmp rbx, rsi
je 0x1401661be
mov rdx, 0xfffffffffffffffe
mov ecx, ebp
lea r8d, [rdx + 3]
call fcn.1401653ac
cmp word [rsp + 0x70], r12w
je 0x140166243
mov word [rbx], r13w
jmp 0x14016623f
lea r11, [0x14023fc20]
mov rcx, qword [r11 + r10*8]
mov al, byte [rcx + r8*8 + 0x38]
test al, 0x40
jne 0x14016623b
or al, 2
mov byte [rcx + r8*8 + 0x38], al
jmp 0x140166243
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
Function at 0x14016decc
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1050
call fcn.14014ce70
sub rsp, rax
mov rax, qword [0x14022f038]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.1401638a4
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x14016df1b
mov rax, rbp
jmp 0x14016e023
mov rax, qword [rbx]
mov rcx, r14
sub rax, qword [rbx + 8]
and ecx, 0x3f
cqo
mov rbx, r14
sub rax, rdx
sar rbx, 6
sar rax, 1
mov r9, r15
lea r12, [rcx + rcx*8]
mov rsi, rax
lea rax, [0x140000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0x23fc20]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.140165450
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0x23fc20]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x14016e01f
mov rcx, qword [rcx + r12*8 + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 0x1000
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14016e01f
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.140165450
test rax, rax
js 0x14016e01f
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x14016e01f
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x14016e011
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x14016e011
cmp byte [rcx], 0xd
jne 0x14016dff7
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x14016e006
cmp byte [rcx + 1], 0xa
jne 0x14016e006
inc rcx
jmp 0x14016e006
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x22f350]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x14016dfd9
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x14016e023
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.14014ced0
mov rbx, qword [rsp + 0x1090]
add rsp, 0x1050
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x140180948
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 0x140180978
xor eax, eax
jmp 0x140180a3b
mov rbp, rbx
cmp word [rax], si
je 0x14018099d
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x140180984
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x140180980
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.140180898
movsxd r14, eax
test eax, eax
jne 0x1401809db
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x140180971
mov rcx, r14
call fcn.1400b1f10
mov rdi, rax
test rax, rax
jne 0x1401809f4
xor ecx, ecx
call fcn.140113220
jmp 0x1401809d0
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.140180898
test eax, eax
jne 0x140180a25
mov rcx, rdi
call fcn.140113220
jmp 0x140180a2f
xor ecx, ecx
call fcn.140113220
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 0x140180a58
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 0x140180adf
mov rsi, rbx
cmp word [rax], bp
je 0x140180a9e
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x140180a88
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x140180a84
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.1400b1f10
mov rdi, rax
test rax, rax
je 0x140180acc
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.14014f780
mov rbp, rdi
xor ecx, ecx
call fcn.140113220
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 0x140183084
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.14015a8ac
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x14018310e
cmp byte [rbp - 0x21], r15b
je 0x140183109
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x140183144
call fcn.14017a144
test eax, eax
jne 0x140183130
cmp byte [rbp - 0x21], r15b
je 0x140183128
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x140183144
cmp byte [rbp - 0x21], r15b
je 0x140183141
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.14015fe88
test eax, eax
jne 0x1401831e4
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.14015a8ac
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x140183183
cmp byte [rbp - 0x21], r15b
je 0x1401831b8
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x1401831b8
call fcn.14017a144
test eax, eax
jne 0x1401831a4
cmp byte [rbp - 0x21], r15b
je 0x14018319d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x1401831b8
cmp byte [rbp - 0x21], r15b
je 0x1401831b5
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.14015fe88
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x1401831e4
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x1401831e7
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x1401831f5
mov rcx, rdi
call fcn.140113220
cmp byte [rbp + 0x3f], r15b
je 0x140183204
mov rcx, qword [rbp + 0x27]
call fcn.140113220
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