joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400b02e0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x40
mov rsi, qword [rcx + 0xa0]
mov rbx, rcx
mov rax, qword [rcx]
mov rdi, qword [rcx + 0x10]
mov qword [rsp + 0x60], rax
test rsi, rsi
je 0x1400b04ff
mov qword [rsp + 0x68], rbp
xor r9d, r9d
mov qword [rsp + 0x78], r13
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x38], r14
nop dword [rax]
nop word [rax + rax]
movsxd rbp, dword [rsi + 0x10]
lea r12, [rdi + 0x88]
mov r15d, dword [rsi + 0x14]
shl rbp, 5
add rbp, qword [rax + 0x20]
movzx eax, byte [rbx + 0x1f]
test al, al
jne 0x1400b0358
inc dword [rbx + 0x38]
mov r14d, dword [rbx + 0x38]
jmp 0x1400b0368
dec al
movzx eax, al
mov byte [rbx + 0x1f], al
mov r14d, dword [rbx + rax*4 + 0xe0]
movsxd rcx, dword [rdi + 0x90]
lea r8d, [r15 + 2]
lea edx, [rcx + 7]
cmp dword [rdi + 0x94], ecx
jg 0x1400b0395
mov r9d, edx
mov dword [rsp + 0x20], r15d
mov edx, 0x37
mov rcx, rdi
call fcn.1400ca310
jmp 0x1400b03c0
lea eax, [rcx + 1]
mov dword [rdi + 0x90], eax
lea rcx, [rcx + rcx*2]
mov rax, qword [r12]
mov dword [rax + rcx*8], 0x37
mov dword [rax + rcx*8 + 4], r8d
mov dword [rax + rcx*8 + 8], edx
mov dword [rax + rcx*8 + 0xc], r15d
mov qword [rax + rcx*8 + 0x10], r9
mov r9, qword [rbp + 0x18]
xor edx, edx
mov r8d, dword [rsi + 0x10]
mov rcx, rbx
mov dword [rsp + 0x20], WSAStartup
mov r9, qword [r9 + 0x68]
call fcn.140109370
mov eax, dword [rdi + 0x90]
add eax, 5
cmp eax, dword [rdi + 0x94]
jle 0x1400b0404
mov edx, 5
mov rcx, rdi
call fcn.1400ca380
test eax, eax
jne 0x1400b04e6
movsxd rax, dword [rdi + 0x90]
xor r9d, r9d
lea rcx, [rax + rax*2]
mov rax, qword [r12]
mov dword [rax + rcx*8 + 8], 2
mov byte [rax + rcx*8], 0x33
mov dword [rax + rcx*8 + 4], r9d
lea rdx, [rax + rcx*8]
mov eax, dword [rdi + 0x90]
mov dword [rdx + 0xc], r9d
add eax, 2
mov dword [rdx + 8], eax
mov byte [rdx + 1], r9b
mov qword [rdx + 0x10], r9
mov word [rdx + 2], r9w
mov qword [rdx + 0x18], 0x7f
mov qword [rdx + 0x20], r9
mov qword [rdx + 0x28], r9
mov qword [rdx + 0x30], 0x61
mov qword [rdx + 0x38], 2
mov qword [rdx + 0x40], r9
mov qword [rdx + 0x48], 0x80
mov qword [rdx + 0x50], r9
mov qword [rdx + 0x58], r9
mov qword [rdx + 0x60], 0x7a
mov qword [rdx + 0x68], r9
mov qword [rdx + 0x70], r9
add dword [rdi + 0x90], 5
test rdx, rdx
je 0x1400b04e6
mov dword [rdx + 0x3c], r14d
lea ecx, [r15 + 1]
mov dword [rdx + 4], ecx
lea eax, [r15 - 1]
mov dword [rdx + 0x20], ecx
mov dword [rdx + 0x54], ecx
mov ecx, 8
mov word [rdx + 0x4a], cx
mov dword [rdx + 0x34], eax
mov dword [rdx + 0x50], r14d
test r14d, r14d
je 0x1400b04d5
movzx eax, byte [rbx + 0x1f]
cmp al, cl
jae 0x1400b04d5
mov dword [rbx + rax*4 + 0xe0], r14d
inc byte [rbx + 0x1f]
mov rsi, qword [rsi]
mov rax, qword [rsp + 0x60]
test rsi, rsi
jne 0x1400b0330
mov r14, qword [rsp + 0x38]
mov r12, qword [rsp + 0x70]
mov r13, qword [rsp + 0x78]
mov rbp, qword [rsp + 0x68]
mov r15, qword [rsp + 0x30]
add rsp, 0x40
pop rdi
pop rsi
pop rbx
ret
Function at 0x1400c08a0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push rdi
push r14
sub rsp, 0x68
movzx eax, byte [rdx]
mov r14, rdx
mov rdi, rcx
cmp al, 0xb0
jne 0x1400c08b9
movzx eax, byte [rdx + 2]
cmp al, 0xb1
jne 0x1400c08c3
mov rax, qword [rdx + 0x20]
jmp 0x1400c08d3
cmp al, 0x8a
jne 0x1400c0a57
mov rax, qword [rdx + 0x20]
mov rax, qword [rax + 0x20]
movsxd rcx, dword [rax]
cmp ecx, 1
je 0x1400c0a57
mov dword [r8], 0
cmp byte [rdx], 0x8a
jne 0x1400c08fa
mov rcx, rdi
add rsp, 0x68
pop r14
pop rdi
jmp fcn.1400ee5b0
mov eax, dword [rdi + 0x38]
mov qword [rsp + 0x60], r12
mov r12, rcx
mov qword [rsp + 0x58], r13
lea r13d, [rax + 1]
add eax, ecx
mov dword [rsp + 0x88], r13d
mov dword [rdi + 0x38], eax
test ecx, ecx
jle 0x1400c0a42
mov qword [rsp + 0x80], rbx
lea rcx, [0x14011a3e0]
mov qword [rsp + 0x90], rbp
mov ebp, r13d
mov qword [rsp + 0x50], r15
lea r13, [fcn.1400c18d0]
xor r15d, r15d
mov qword [rsp + 0x98], rsi
lea edx, [r15 + 2]
nop dword [rax + rax]
cmp byte [rdi + 0x23], 0
mov rax, qword [r14 + 0x20]
mov rbx, qword [rax + r15 + 8]
je 0x1400c09b0
mov word [rsp + 0x44], dx
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x48], 0
test rbx, rbx
je 0x1400c09a0
mov rdx, rbx
lea rcx, [rsp + 0x20]
call fcn.1401480d0
cmp word [rsp + 0x44], 0
je 0x1400c09b0
mov r8d, ebp
mov rdx, rbx
mov rcx, rdi
call fcn.1400f8010
jmp 0x1400c09f0
mov rsi, qword [rdi]
test rbx, rbx
je 0x1400c09cc
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, rsi
call fcn.1400c0d30
mov rbx, rax
cmp byte [rsi + 0x67], 0
jne 0x1400c09e0
mov r8d, ebp
mov rdx, rbx
mov rcx, rdi
call fcn.1400f6570
test rbx, rbx
je 0x1400c09f0
mov rdx, rbx
mov rcx, rsi
call fcn.1400fa200
inc ebp
lea rcx, [0x14011a3e0]
add r15, 0x20
mov edx, 2
sub r12, 1
jne 0x1400c0960
mov eax, dword [rsp + 0x88]
mov r15, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x98]
mov rbp, qword [rsp + 0x90]
mov rbx, qword [rsp + 0x80]
mov r12, qword [rsp + 0x60]
mov r13, qword [rsp + 0x58]
add rsp, 0x68
pop r14
pop rdi
ret
mov r12, qword [rsp + 0x60]
mov eax, r13d
mov r13, qword [rsp + 0x58]
add rsp, 0x68
pop r14
pop rdi
ret
mov rcx, rdi
add rsp, 0x68
pop r14
pop rdi
jmp fcn.1400f9ab0
Function at 0x1400dd5b0
Capabilities:
Reference sql statements

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
mov r14d, dword [rsp + 0x70]
mov ebx, r8d
mov dword [rax - 0x18], r14d
mov rbp, r9
mov qword [rax - 0x20], r9
mov rdi, rdx
mov r9, rdx
mov byte [rcx + 0x1c], 1
mov r8, rdx
mov dword [rax - 0x28], ebx
lea rdx, str.SELECT_1_FROM___w_.sqlite_master_WHERE_name_NOT_LIKE_sqliteX____ESCAPE_X_AND_sql_NOT_LIKE_create_virtual___AND_sqlite_rename_test__Q__sql__type__name___d___Q___d_NULL
mov rsi, rcx
call fcn.140108fb0
test ebx, ebx
jne 0x1400dd619
mov r9, rbp
mov dword [rsp + 0x20], r14d
mov r8, rdi
lea rdx, str.SELECT_1_FROM_temp.sqlite_master_WHERE_name_NOT_LIKE_sqliteX____ESCAPE_X_AND_sql_NOT_LIKE_create_virtual___AND_sqlite_rename_test__Q__sql__type__name__1___Q___d_NULL
mov rcx, rsi
call fcn.140108fb0
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 0x1400fcb90
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbx
push rsi
push rdi
push r14
sub rsp, 0x28
xor r11d, r11d
mov rdi, r8
mov ebx, r11d
mov r14, rdx
mov rsi, rcx
cmp dword [rcx + 0x28], ebx
jle 0x1400fcc99
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x60], r12
lea r12, str.main
mov qword [rsp + 0x20], r15
lea r15, [0x1401c61b0]
nop
mov rax, qword [rsi + 0x20]
mov r10d, ebx
xor r10d, 1
cmp ebx, 2
cmovge r10d, ebx
movsxd rcx, r10d
shl rcx, 5
mov rbp, qword [rcx + rax + 0x18]
test rdi, rdi
je 0x1400fcc11
mov r8, qword [rcx + rax]
mov r9, rdi
sub r9, r8
nop dword [rax]
movzx ecx, byte [r8]
movzx eax, byte [r9 + r8]
cmp ecx, eax
jne 0x1400fcc4c
test ecx, ecx
jne 0x1400fcc5a
lea rcx, [rbp + 0x20]
xor r8d, r8d
mov rdx, r14
call fcn.1400c2df0
mov r11, qword [rax + 0x10]
test r11, r11
jne 0x1400fcc30
inc ebx
cmp ebx, dword [rsi + 0x28]
jl 0x1400fcbd0
mov r12, qword [rsp + 0x60]
mov rax, r11
mov rbp, qword [rsp + 0x58]
mov r15, qword [rsp + 0x20]
add rsp, 0x28
pop r14
pop rdi
pop rsi
pop rbx
ret
movzx edx, byte [rax + r15]
movzx ecx, byte [rcx + r15]
cmp ecx, edx
jne 0x1400fcc5f
inc r8
jmp 0x1400fcc00
test r10d, r10d
jne 0x1400fcc29
mov r9, rdi
mov rax, r12
sub r9, r12
nop dword [rax]
movzx edx, byte [rax]
movzx ecx, byte [r9 + rax]
cmp edx, ecx
jne 0x1400fcc85
test edx, edx
je 0x1400fcc11
inc rax
jmp 0x1400fcc70
movzx r8d, byte [rcx + r15]
movzx edx, byte [rdx + r15]
cmp edx, r8d
jne 0x1400fcc29
inc rax
jmp 0x1400fcc70
mov rax, r11
add rsp, 0x28
pop r14
pop rdi
pop rsi
pop rbx
ret
Function at 0x140143800
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push r14
push r15
sub rsp, 0x30
mov r14, rcx
mov qword [rcx], 0
mov ecx, 0x28
mov rbp, r8
mov r15, rdx
call fcn.140108690
mov rbx, rax
test rax, rax
jne 0x140143842
lea eax, [rbx + 7]
mov rbx, qword [rsp + 0x60]
add rsp, 0x30
pop r15
pop r14
pop rbp
ret
cmp byte [0x1401fa1c4], 0
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], rdi
je 0x1401438a6
mov rax, qword [0x1401fa350]
test rax, rax
je 0x14014386c
mov ecx, 0xc8
call rax
test eax, eax
jne 0x1401438a6
lea rsi, [rbx + 8]
mov qword [rbx + 0x10], r15
lea rdi, [rbx + 0x10]
mov qword [rsp + 0x28], rsi
mov r9, rbx
mov dword [rsp + 0x20], 0
lea r8, [0x14011c330]
mov qword [rbx + 0x18], rbp
xor edx, edx
xor ecx, ecx
call fcn.14016a540
mov qword [rbx], rax
test rax, rax
jne 0x1401438be
jmp 0x1401438ae
lea rdi, [rbx + 0x10]
lea rsi, [rbx + 8]
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbx], xmm0
movups xmmword [rbx + 0x10], xmm0
mov qword [rbx + 0x20], rax
cmp qword [rdi], 0
mov rdi, qword [rsp + 0x58]
jne 0x1401438db
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov rcx, rbp
mov dword [rsi], eax
call r15
mov qword [rbx + 0x20], rax
mov rsi, qword [rsp + 0x50]
xor eax, eax
mov qword [r14], rbx
mov rbx, qword [rsp + 0x60]
add rsp, 0x30
pop r15
pop r14
pop rbp
ret
Function at 0x1401584a8
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rdi, rdx
lea r8, [rsp + 0x60]
mov ebx, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
mov r8d, ebx
mov ecx, 0x1300
neg eax
sbb r9d, r9d
and qword [rsp + 0x30], 0
and r9d, dword [rsp + 0x60]
xor edx, edx
and dword [rsp + 0x28], 0
mov dword [rsp + 0x60], r9d
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x14015852c
mov r8, qword [rdi]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x1401cdb20]
cmp byte [rcx + rax], 0
je 0x14015852c
dec r8
sub rdx, 1
jne 0x140158512
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret

Function at 0x14015c380
Capabilities:
Parse pe header

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

Function at 0x14016a934
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 0x14016a793
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14016a793
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14016a793
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14016a793
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14016a793
cmp dword [rcx + 0x84], 0xe
jbe 0x14016a793
cmp dword [rcx + 0xf8], 0
je 0x14016a793
mov ecx, ebx
call fcn.14016a850
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.14016a620
nop
cmp dword [rbp + 0x20], 0
je 0x14016a7e1
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.14016a7ec
int3
xor r8d, r8d
xor edx, edx
jmp 0x14016a724
Function at 0x1401748b8
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r14
sub rsp, 0x20
mov rsi, rcx
test rcx, rcx
jne 0x1401748ea
call fcn.1401676a0
mov dword [rax], socket
call fcn.1401620f8
jmp 0x140174a09
mov eax, dword [rcx + 0x14]
shr eax, 0xd
test al, 1
je 0x140174a09
mov eax, dword [rcx + 0x14]
shr eax, 0xc
test al, 1
jne 0x140174a09
mov eax, dword [rcx + 0x14]
shr eax, 1
test al, 1
je 0x140174919
lock or dword [rcx + 0x14], 0x10
jmp 0x140174a09
lock or dword [rcx + 0x14], 1
mov eax, dword [rcx + 0x14]
test eax, 0x4c0
jne 0x14017492d
call fcn.140176fc8
mov rdi, qword [rsi + 8]
mov rcx, rsi
mov ebx, dword [rsi + 0x20]
mov qword [rsi], rdi
call fcn.14016d570
mov r8d, ebx
mov rdx, rdi
mov ecx, eax
call fcn.1401774e0
mov dword [rsi + 0x10], eax
lea ecx, [rax + 1]
cmp ecx, 1
jbe 0x1401749f7
mov eax, dword [rsi + 0x14]
or edi, 0xffffffff
test al, 6
jne 0x1401749c2
mov rcx, rsi
call fcn.14016d570
cmp eax, edi
je 0x1401749ad
mov rcx, rsi
call fcn.14016d570
cmp eax, 0xfffffffe
je 0x1401749ad
mov rcx, rsi
call fcn.14016d570
movsxd rbx, eax
lea r14, [0x1402026b0]
mov rcx, rsi
sar rbx, 6
call fcn.14016d570
and eax, 0x3f
lea rcx, [rax + rax*8]
mov rax, qword [r14 + rbx*8]
lea rdx, [rax + rcx*8]
jmp 0x1401749b4
lea rdx, [0x1401fd980]
mov al, byte [rdx + 0x38]
and al, 0x82
cmp al, 0x82
jne 0x1401749c2
lock or dword [rsi + 0x14], 0x20
cmp dword [rsi + 0x20], 0x200
jne 0x1401749e6
mov eax, dword [rsi + 0x14]
shr eax, 6
test al, 1
je 0x1401749e6
mov eax, dword [rsi + 0x14]
shr eax, 8
test al, 1
jne 0x1401749e6
mov dword [rsi + 0x20], 0x1000
mov rax, qword [rsi]
add dword [rsi + 0x10], edi
movzx edi, byte [rax]
inc rax
mov qword [rsi], rax
jmp 0x140174a0c
neg eax
sbb eax, eax
and eax, 8
add eax, 8
lock or dword [rsi + 0x14], eax
and dword [rsi + 0x10], 0
or edi, 0xffffffff
mov rbx, qword [rsp + 0x30]
mov eax, edi
mov rdi, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop r14
ret
Function at 0x140176d48
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.14015bc10
sub rsp, rax
mov rax, qword [0x1401fd600]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.14016d570
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x140176d97
mov rax, rbp
jmp 0x140176e9f
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 + 0x2026b0]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.140177cb8
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0x2026b0]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x140176e9b
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 0x140176e9b
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.140177cb8
test rax, rax
js 0x140176e9b
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x140176e9b
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x140176e8d
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x140176e8d
cmp byte [rcx], 0xd
jne 0x140176e73
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x140176e82
cmp byte [rcx + 1], 0xa
jne 0x140176e82
inc rcx
jmp 0x140176e82
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x1fd9d0]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x140176e55
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x140176e9f
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.14015b500
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 0x140177034
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, [0x1402026b0]
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 0x140177092
cmp word [rdx], r12w
jne 0x140177092
or byte [rax + r8*8 + 0x38], cl
jmp 0x140177098
and byte [rax + r8*8 + 0x38], 0xfb
lea rdx, [rdx + r9*2]
mov rcx, rsi
mov rbx, rsi
cmp rsi, rdx
jae 0x1401771f3
mov r9d, 0x1a
lea r13d, [r9 - 0xd]
movzx eax, word [rcx]
cmp ax, r9w
je 0x1401771ce
lea r9, [rcx + 2]
cmp ax, r13w
je 0x1401770d1
mov rcx, r9
jmp 0x1401770f4
cmp r9, rdx
jae 0x14017710b
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 0x1401770b5
jmp 0x1401771f3
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 0x1401771c8
cmp dword [rsp + 0x80], edi
je 0x1401771c8
mov rdx, r14
lea r11, [0x1402026b0]
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 0x1401771a1
movzx eax, word [rsp + 0x70]
cmp ax, r12w
jne 0x140177174
mov word [rbx], r12w
jmp 0x1401771ef
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 0x14017717d
mov rax, qword [r11 + rdx*8]
mov byte [rax + r8*8 + 0x3c], r12b
jmp 0x1401771ef
cmp word [rsp + 0x70], r12w
jne 0x1401771ae
cmp rbx, rsi
je 0x14017716e
mov rdx, 0xfffffffffffffffe
mov ecx, ebp
lea r8d, [rdx + 3]
call fcn.140177cc0
cmp word [rsp + 0x70], r12w
je 0x1401771f3
mov word [rbx], r13w
jmp 0x1401771ef
lea r11, [0x1402026b0]
mov rcx, qword [r11 + r10*8]
mov al, byte [rcx + r8*8 + 0x38]
test al, 0x40
jne 0x1401771eb
or al, 2
mov byte [rcx + r8*8 + 0x38], al
jmp 0x1401771f3
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 0x14017cc1c
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 0x14017cc4c
xor eax, eax
jmp 0x14017cd0f
mov rbp, rbx
cmp word [rax], si
je 0x14017cc71
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14017cc58
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14017cc54
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.14017b298
movsxd r14, eax
test eax, eax
jne 0x14017ccaf
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14017cc45
mov rcx, r14
call fcn.1401757dc
mov rdi, rax
test rax, rax
jne 0x14017ccc8
xor ecx, ecx
call fcn.140174438
jmp 0x14017cca4
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.14017b298
test eax, eax
jne 0x14017ccf9
mov rcx, rdi
call fcn.140174438
jmp 0x14017cd03
xor ecx, ecx
call fcn.140174438
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 0x14017cd2c
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 0x14017cdb3
mov rsi, rbx
cmp word [rax], bp
je 0x14017cd72
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x14017cd5c
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14017cd58
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.1401757dc
mov rdi, rax
test rax, rax
je 0x14017cda0
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.14015d720
mov rbp, rdi
xor ecx, ecx
call fcn.140174438
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 0x1401837bc
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.1401634b8
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x140183846
cmp byte [rbp - 0x21], r15b
je 0x140183841
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x14018387c
call fcn.140174dbc
test eax, eax
jne 0x140183868
cmp byte [rbp - 0x21], r15b
je 0x140183860
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x14018387c
cmp byte [rbp - 0x21], r15b
je 0x140183879
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.14016f3a4
test eax, eax
jne 0x14018391c
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.1401634b8
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x1401838bb
cmp byte [rbp - 0x21], r15b
je 0x1401838f0
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x1401838f0
call fcn.140174dbc
test eax, eax
jne 0x1401838dc
cmp byte [rbp - 0x21], r15b
je 0x1401838d5
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x1401838f0
cmp byte [rbp - 0x21], r15b
je 0x1401838ed
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.14016f3a4
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x14018391c
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x14018391f
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x14018392d
mov rcx, rdi
call fcn.140174438
cmp byte [rbp + 0x3f], r15b
je 0x14018393c
mov rcx, qword [rbp + 0x27]
call fcn.140174438
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