joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400107a0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1405b75b4]
test esi, esi
mov rdi, rcx
mov rbp, rdx
mov rbx, r8
jle 0x140010930
mov rax, qword [0x1405b75b8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rdi, rdx
jb 0x1400107ec
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rdi, rdx
jb 0x140010875
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x1400107d0
mov rcx, rdi
call fcn.140011300
test rax, rax
mov r12, rax
je 0x140010982
mov rax, qword [0x1405b75b8]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call fcn.140011440
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x1405b75b8]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140010965
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14001086e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x1400108e0
add dword [0x1405b75b4], 1
cmp ebx, 8
jae 0x1400108a1
test bl, 4
jne 0x140010940
test ebx, ebx
je 0x140010896
movzx eax, byte [rbp]
test bl, 2
mov byte [rdi], al
jne 0x140010954
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 0x140010896
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 0x1400108ba
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 [0x1405b75b8]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14001086e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140010730
xor esi, esi
jmp 0x1400107f7
mov eax, dword [rbp]
mov ebx, ebx
mov dword [rdi], eax
mov eax, dword [rbp + rbx - 4]
mov dword [rdi + rbx - 4], eax
jmp 0x140010896
mov ebx, ebx
movzx eax, word [rbp + rbx - 2]
mov word [rdi + rbx - 2], ax
jmp 0x140010896
mov rax, qword [0x1405b75b8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call fcn.140010730
lea rcx, str.Address__p_has_no_image_section
mov rdx, rdi
call fcn.140010730
nop
nop dword [rax]
nop word cs:[rax + rax]
Function at 0x140010f50
Capabilities:
Get thread local storage value

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

Function at 0x140011300
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r9, qword [0x1405b21d0]
xor edx, edx
cmp word [r9], 0x5a4d
mov r8, rcx
jne 0x14001136f
mov rcx, r9
call fcn.1400111d0
test eax, eax
je 0x14001136f
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 0x14001136d
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 0x140011364
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x14001136f
add rdx, 0x28
cmp rdx, r9
jne 0x140011350
xor edx, edx
mov rax, rdx
add rsp, 0x28
ret
Function at 0x14001b670
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
lea rcx, [0x1405aecc0]
jmp 0x140012130

Function at 0x14001b680
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
lea rcx, [0x1405aecc0]
jmp 0x140012130
Function at 0x14187b490
Capabilities:
Terminate process

Disassembly:
cld
pop r11
jmp 0x14187b49d
inc rsi
mov byte [rdi], dl
inc rdi
mov dl, byte [rsi]
add ebx, ebx
jne 0x14187b4ad
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jb 0x14187b495
lea eax, [rcx + 1]
jmp 0x14187b4bb
dec eax
call r11
adc eax, eax
call r11
adc eax, eax
add ebx, ebx
jne 0x14187b4ce
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jae 0x14187b4b4
sub eax, 3
jb 0x14187b4ee
shl eax, 8
movzx edx, dl
or eax, edx
inc rsi
xor eax, 0xffffffff
je 0x14187b53d
sar eax, 1
movsxd rbp, eax
jb 0x14187b524
jmp 0x14187b4fc
add ebx, ebx
jne 0x14187b4fa
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x14187b524
inc ecx
add ebx, ebx
jne 0x14187b50a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x14187b524
call r11
adc ecx, ecx
add ebx, ebx
jne 0x14187b51d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jae 0x14187b50c
add ecx, 2
jmp 0x14187b529
call r11
adc ecx, ecx
cmp rbp, 0xfffffffffffffb00
adc ecx, 2
call fcn.14187b452
jmp 0x14187b49d
pop rsi
mov rdi, rsi
push rsi
mov rdi, rsi
mov rsi, 0x83e00
mov dl, 0x1b
push rbx
push rdi
lea rcx, [rdi + rsi - 3]
pop rsi
push rsi
pop rbx
jmp 0x14187b589
cmp rsi, rcx
jae 0x14187b591
push rsi
pop rsi
lodsb al, byte [rsi]
cmp al, 0x80
jb 0x14187b570
cmp al, 0x8f
ja 0x14187b570
cmp byte [rsi - 2], 0xf
je 0x14187b576
sub al, 0xe8
cmp al, 1
ja 0x14187b55a
cmp rsi, rcx
jae 0x14187b591
push rsi
lodsd eax, dword [rsi]
sub al, dl
jne 0x14187b560
pop rdi
bswap eax
sub eax, edi
add eax, ebx
stosd dword [rdi], eax
cmp rsi, rcx
jae 0x14187b591
lodsb al, byte [rsi]
jmp 0x14187b570
pop rbx
pop rsi
sub rsp, 0x28
lea rdi, [rsi + 0x1878000]
mov eax, dword [rdi]
or eax, eax
je 0x14187b5fa
mov ebx, dword [rdi + 4]
lea rcx, [rax + rsi + 0x188363c]
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 0x14187b59e
jns 0x14187b5d3
movzx rdx, word [rdi]
add rdi, 2
jmp 0x14187b5dd
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 0x14187b5f4
mov qword [rbx], rax
add rbx, 8
jmp 0x14187b5be
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 0x14187b634
cmp al, 0xef
ja 0x14187b626
add rbx, rax
mov rax, qword [rbx]
bswap rax
add rax, rsi
mov qword [rbx], rax
jmp 0x14187b606
and al, 0xf
shl eax, 0x10
mov ax, word [rdi]
add rdi, 2
jmp 0x14187b615
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 + 0x26f]
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 0x14187b688
sub rsp, 0xffffffffffffff80
jmp 0x1400625f0
Function at 0x14000595c
Capabilities:
Read file on windows

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, 0x20
mov rbp, r8
mov r14, rdx
mov rdi, rcx
test r8, r8
jg 0x14000598a
xor eax, eax
jmp 0x140005a70
cmp qword [rcx + 0x68], 0
je 0x14000599b
call fcn.140006bfc
jmp 0x140005a70
mov rax, qword [rcx + 0x38]
mov rsi, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x1400059b2
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x1400059b4
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x1400059e6
cmp rax, rbp
mov rbx, rbp
mov rcx, r14
cmovb rbx, rax
mov r8, rbx
call fcn.140037350
mov rax, qword [rdi + 0x50]
add r14, rbx
sub rsi, rbx
sub dword [rax], ebx
mov rcx, qword [rdi + 0x38]
movsxd rax, ebx
add qword [rcx], rax
cmp qword [rdi + 0x80], 0
je 0x140005a6a
mov r8, qword [rdi + 0x18]
lea rax, [rdi + 0x70]
cmp qword [r8], rax
jne 0x140005a1d
mov rcx, qword [rdi + 0x88]
mov rdx, qword [rdi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rdi + 0x38]
mov qword [rax], rcx
mov rax, qword [rdi + 0x50]
mov dword [rax], edx
mov ebx, 0xfff
jmp 0x140005a46
mov r9, qword [rdi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call fcn.14003e8d0
add r14, rax
sub rsi, rax
cmp rax, rbx
jne 0x140005a6a
cmp rsi, rbx
ja 0x140005a24
test rsi, rsi
je 0x140005a6a
mov r9, qword [rdi + 0x80]
mov r8, rsi
mov edx, 1
mov rcx, r14
call fcn.14003e8d0
sub rsi, rax
sub rbp, rsi
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret

Function at 0x140010450
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 0x1400104d4
mov r8, qword [rdi]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x14006b980]
cmp byte [rcx + rax], 0
je 0x1400104d4
dec r8
sub rdx, 1
jne 0x1400104ba
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret

Function at 0x140029700
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
lea r9, [rdx + rdx]
movabs r8, 0xcbf29ce484222325
xor edx, edx
test r9, r9
je 0x14001329a
movzx eax, byte [rdx + rcx]
movabs r10, 0x100000001b3
xor r8, rax
inc rdx
imul r8, r10
cmp rdx, r9
jb 0x14001327d
mov rax, r8
ret
sub r8, rdx
mov rcx, rdx
sar r8, 1
mov rdx, r8
jmp 0x140013268

Function at 0x140029714
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
lea r9, [rdx + rdx]
movabs r8, 0xcbf29ce484222325
xor edx, edx
test r9, r9
je 0x1400132d2
movzx eax, byte [rdx + rcx]
movabs r10, 0x100000001b3
xor r8, rax
inc rdx
imul r8, r10
cmp rdx, r9
jb 0x1400132b5
mov rax, r8
ret
sub r8, rdx
mov rcx, rdx
sar r8, 1
mov rdx, r8
jmp 0x1400132a0
Function at 0x140035ad4
Capabilities:
Parse pe header

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

Function at 0x14004ba90
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x14004b880
Function at 0x140051b1c
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 0x140051b4e
call fcn.140041708
mov dword [rax], 0x16
call fcn.14003cf84
jmp 0x140051c6d
mov eax, dword [rcx + 0x14]
shr eax, 0xd
test al, 1
je 0x140051c6d
mov eax, dword [rcx + 0x14]
shr eax, 0xc
test al, 1
jne 0x140051c6d
mov eax, dword [rcx + 0x14]
shr eax, 1
test al, 1
je 0x140051b7d
lock or dword [rcx + 0x14], 0x10
jmp 0x140051c6d
lock or dword [rcx + 0x14], 1
mov eax, dword [rcx + 0x14]
test eax, 0x4c0
jne 0x140051b91
call fcn.140052364
mov rdi, qword [rsi + 8]
mov rcx, rsi
mov ebx, dword [rsi + 0x20]
mov qword [rsi], rdi
call fcn.1400506ac
mov r8d, ebx
mov rdx, rdi
mov ecx, eax
call fcn.14005287c
mov dword [rsi + 0x10], eax
lea ecx, [rax + 1]
cmp ecx, 1
jbe 0x140051c5b
mov eax, dword [rsi + 0x14]
or edi, 0xffffffff
test al, 6
jne 0x140051c26
mov rcx, rsi
call fcn.1400506ac
cmp eax, edi
je 0x140051c11
mov rcx, rsi
call fcn.1400506ac
cmp eax, 0xfffffffe
je 0x140051c11
mov rcx, rsi
call fcn.1400506ac
movsxd rbx, eax
lea r14, [0x1400e1410]
mov rcx, rsi
sar rbx, 6
call fcn.1400506ac
and eax, 0x3f
lea rcx, [rax + rax*8]
mov rax, qword [r14 + rbx*8]
lea rdx, [rax + rcx*8]
jmp 0x140051c18
lea rdx, [0x140088420]
mov al, byte [rdx + 0x38]
and al, 0x82
cmp al, 0x82
jne 0x140051c26
lock or dword [rsi + 0x14], 0x20
cmp dword [rsi + 0x20], 0x200
jne 0x140051c4a
mov eax, dword [rsi + 0x14]
shr eax, 6
test al, 1
je 0x140051c4a
mov eax, dword [rsi + 0x14]
shr eax, 8
test al, 1
jne 0x140051c4a
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 0x140051c70
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 0x1400520e4
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.140035780
sub rsp, rax
mov rax, qword [0x140088078]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.1400506ac
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x140052133
mov rax, rbp
jmp 0x14005223b
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 + 0xe1410]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.140053054
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0xe1410]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x140052237
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 0x140052237
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.140053054
test rax, rax
js 0x140052237
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x140052237
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x140052229
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x140052229
cmp byte [rcx], 0xd
jne 0x14005220f
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x14005221e
cmp byte [rcx + 1], 0xa
jne 0x14005221e
inc rcx
jmp 0x14005221e
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x88470]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x1400521f1
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x14005223b
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.1400355a0
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 0x1400523d0
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, [0x1400e1410]
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 0x14005242e
cmp word [rdx], r12w
jne 0x14005242e
or byte [rax + r8*8 + 0x38], cl
jmp 0x140052434
and byte [rax + r8*8 + 0x38], 0xfb
lea rdx, [rdx + r9*2]
mov rcx, rsi
mov rbx, rsi
cmp rsi, rdx
jae 0x14005258f
mov r9d, 0x1a
lea r13d, [r9 - 0xd]
movzx eax, word [rcx]
cmp ax, r9w
je 0x14005256a
lea r9, [rcx + 2]
cmp ax, r13w
je 0x14005246d
mov rcx, r9
jmp 0x140052490
cmp r9, rdx
jae 0x1400524a7
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 0x140052451
jmp 0x14005258f
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 0x140052564
cmp dword [rsp + 0x80], edi
je 0x140052564
mov rdx, r14
lea r11, [0x1400e1410]
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 0x14005253d
movzx eax, word [rsp + 0x70]
cmp ax, r12w
jne 0x140052510
mov word [rbx], r12w
jmp 0x14005258b
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 0x140052519
mov rax, qword [r11 + rdx*8]
mov byte [rax + r8*8 + 0x3c], r12b
jmp 0x14005258b
cmp word [rsp + 0x70], r12w
jne 0x14005254a
cmp rbx, rsi
je 0x14005250a
mov rdx, 0xfffffffffffffffe
mov ecx, ebp
lea r8d, [rdx + 3]
call fcn.14005305c
cmp word [rsp + 0x70], r12w
je 0x14005258f
mov word [rbx], r13w
jmp 0x14005258b
lea r11, [0x1400e1410]
mov rcx, qword [r11 + r10*8]
mov al, byte [rcx + r8*8 + 0x38]
test al, 0x40
jne 0x140052587
or al, 2
mov byte [rcx + r8*8 + 0x38], al
jmp 0x14005258f
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 0x1400579c4
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 0x1400579f4
xor eax, eax
jmp 0x140057ab7
mov rbp, rbx
cmp word [rax], si
je 0x140057a19
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x140057a00
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x1400579fc
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.140055a14
movsxd r14, eax
test eax, eax
jne 0x140057a57
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x1400579ed
mov rcx, r14
call fcn.14004dd40
mov rdi, rax
test rax, rax
jne 0x140057a70
xor ecx, ecx
call fcn.14004dd04
jmp 0x140057a4c
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.140055a14
test eax, eax
jne 0x140057aa1
mov rcx, rdi
call fcn.14004dd04
jmp 0x140057aab
xor ecx, ecx
call fcn.14004dd04
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 0x140057ad4
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 0x140057b5b
mov rsi, rbx
cmp word [rax], bp
je 0x140057b1a
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x140057b04
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x140057b00
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14004dd40
mov rdi, rax
test rax, rax
je 0x140057b48
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140037350
mov rbp, rdi
xor ecx, ecx
call fcn.14004dd04
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 0x14005ec78
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.14003babc
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x14005ed02
cmp byte [rbp - 0x21], r15b
je 0x14005ecfd
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x14005ed38
call fcn.14004f020
test eax, eax
jne 0x14005ed24
cmp byte [rbp - 0x21], r15b
je 0x14005ed1c
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x14005ed38
cmp byte [rbp - 0x21], r15b
je 0x14005ed35
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.140047db4
test eax, eax
jne 0x14005edd8
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.14003babc
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x14005ed77
cmp byte [rbp - 0x21], r15b
je 0x14005edac
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x14005edac
call fcn.14004f020
test eax, eax
jne 0x14005ed98
cmp byte [rbp - 0x21], r15b
je 0x14005ed91
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x14005edac
cmp byte [rbp - 0x21], r15b
je 0x14005eda9
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.140047db4
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x14005edd8
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x14005eddb
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x14005ede9
mov rcx, rdi
call fcn.14004dd04
cmp byte [rbp + 0x3f], r15b
je 0x14005edf8
mov rcx, qword [rbp + 0x27]
call fcn.14004dd04
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