joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400b7748
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 0x1400b7778
xor eax, eax
jmp 0x1400b783b
mov rbp, rbx
cmp word [rax], si
je 0x1400b779d
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x1400b7784
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x1400b7780
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.1400ae98c
movsxd r14, eax
test eax, eax
jne 0x1400b77db
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x1400b7771
mov rcx, r14
call fcn.1400ae89c
mov rdi, rax
test rax, rax
jne 0x1400b77f4
xor ecx, ecx
call fcn.1400ae860
jmp 0x1400b77d0
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.1400ae98c
test eax, eax
jne 0x1400b7825
mov rcx, rdi
call fcn.1400ae860
jmp 0x1400b782f
xor ecx, ecx
call fcn.1400ae860
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 0x1400b7858
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 0x1400b78df
mov rsi, rbx
cmp word [rax], bp
je 0x1400b789e
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x1400b7888
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x1400b7884
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.1400ae89c
mov rdi, rax
test rax, rax
je 0x1400b78cc
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140096fe0
mov rbp, rdi
xor ecx, ecx
call fcn.1400ae860
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 0x1400b990c
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x1400b9922
mov al, 1
jmp 0x1400b9982
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x1400b9933
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x1400b9980
mov ecx, dword [rcx + 0x18]
nop
call fcn.1400b8198
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1400b9980
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x1400b9980
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1400b9980
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x1400b9982
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x1400ba3b4
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x1400fb3e0]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x1400ba40b
cmp word [rdx], r13w
jne 0x1400ba40b
or byte [rax + rdi*8 + 0x38], cl
jmp 0x1400ba410
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x1400ba535
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x1400ba556
lea r9, [rdx + 2]
cmp cx, r11w
je 0x1400ba449
mov rdx, r9
mov word [rbx], cx
jmp 0x1400ba470
cmp r9, r8
jae 0x1400ba480
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x1400ba42a
jmp 0x1400ba535
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400ba52a
cmp dword [rsp + 0x80], esi
je 0x1400ba52a
lea r8, [0x1400fb3e0]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x1400ba502
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x1400ba4d2
mov word [rbx], r13w
jmp 0x1400ba532
mov ecx, 0xd
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x1400ba4df
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x1400ba532
cmp word [rsp + 0x70], r13w
jne 0x1400ba50f
cmp rbx, r14
je 0x1400ba4cc
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.1400b6f1c
cmp word [rsp + 0x70], r13w
je 0x1400ba535
mov ecx, 0xd
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x1400fb3e0]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x1400ba52f
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x1400ba535
Function at 0x1400be75c
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.140097d3c
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x1400be7e6
cmp byte [rbp - 0x21], r15b
je 0x1400be7e1
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x1400be81c
call fcn.1400af4a8
test eax, eax
jne 0x1400be808
cmp byte [rbp - 0x21], r15b
je 0x1400be800
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x1400be81c
cmp byte [rbp - 0x21], r15b
je 0x1400be819
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.140098218
test eax, eax
jne 0x1400be8bc
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.140097d3c
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x1400be85b
cmp byte [rbp - 0x21], r15b
je 0x1400be890
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x1400be890
call fcn.1400af4a8
test eax, eax
jne 0x1400be87c
cmp byte [rbp - 0x21], r15b
je 0x1400be875
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x1400be890
cmp byte [rbp - 0x21], r15b
je 0x1400be88d
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.140098218
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x1400be8bc
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x1400be8bf
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x1400be8cd
mov rcx, rdi
call fcn.1400ae860
cmp byte [rbp + 0x3f], r15b
je 0x1400be8dc
mov rcx, qword [rbp + 0x27]
call fcn.1400ae860
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 0x1400406d0
Capabilities:
Contain obfuscated stackstrings

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x38
mov rax, qword [0x140080040]
xor rax, rsp
mov qword [rsp + 0x28], rax
mov byte [rsp], 0x2c
mov byte [rsp + 1], 0x5c
mov byte [rsp + 2], 0x43
mov byte [rsp + 3], 0x5b
mov byte [rsp + 4], 0x49
mov byte [rsp + 5], 0x5e
mov byte [rsp + 6], 0x5f
mov byte [rsp + 7], 0x44
mov byte [rsp + 8], 0x49
mov byte [rsp + 9], 0x40
mov byte [rsp + 0xa], 0x40
mov byte [rsp + 0xb], 2
mov byte [rsp + 0xc], 0x49
mov byte [rsp + 0xd], 0x54
mov byte [rsp + 0xe], 0x49
mov byte [rsp + 0xf], 0xc
mov byte [rsp + 0x10], 1
mov byte [rsp + 0x11], 0x69
mov byte [rsp + 0x12], 0x42
mov byte [rsp + 0x13], 0x4f
mov byte [rsp + 0x14], 0x43
mov byte [rsp + 0x15], 0x48
mov byte [rsp + 0x16], 0x49
mov byte [rsp + 0x17], 0x48
mov byte [rsp + 0x18], 0x6f
mov byte [rsp + 0x19], 0x43
mov byte [rsp + 0x1a], 0x41
mov byte [rsp + 0x1b], 0x41
mov byte [rsp + 0x1c], 0x4d
mov byte [rsp + 0x1d], 0x42
mov byte [rsp + 0x1e], 0x48
mov byte [rsp + 0x1f], 0xc
mov byte [rsp + 0x20], 0
lea rax, [rsp]
mov rdi, qword [rsp + 0x58]
mov rsi, rax
mov ecx, 0x21
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.14004bb20
add rsp, 0x38
pop rdi
pop rsi
ret

Function at 0x1400407d0
Capabilities:
Contain obfuscated stackstrings

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x28
mov rax, qword [0x140080040]
xor rax, rsp
mov qword [rsp + 0x18], rax
mov byte [rsp], 0x5b
mov byte [rsp + 1], 0x18
mov byte [rsp + 2], 0x29
mov byte [rsp + 3], 0x3e
mov byte [rsp + 4], 0x3a
mov byte [rsp + 5], 0x2f
mov byte [rsp + 6], 0x3e
mov byte [rsp + 7], 0xb
mov byte [rsp + 8], 0x29
mov byte [rsp + 9], 0x34
mov byte [rsp + 0xa], 0x38
mov byte [rsp + 0xb], 0x3e
mov byte [rsp + 0xc], 0x28
mov byte [rsp + 0xd], 0x28
mov byte [rsp + 0xe], 0x7b
mov byte [rsp + 0xf], 0x3d
mov byte [rsp + 0x10], 0x3a
mov byte [rsp + 0x11], 0x32
mov byte [rsp + 0x12], 0x37
mov byte [rsp + 0x13], 0x3e
mov byte [rsp + 0x14], 0x3f
mov byte [rsp + 0x15], 0x7b
mov byte [rsp + 0x16], 0x73
mov byte [rsp + 0x17], 0
lea rax, [rsp]
mov rdi, qword [rsp + 0x48]
mov rsi, rax
mov ecx, 0x18
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x18]
xor rcx, rsp
call fcn.14004bb20
add rsp, 0x28
pop rdi
pop rsi
ret
Function at 0x1427dd058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x1427dd1df
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 0x1427dd089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1427dd06f
add dl, dl
jne 0x1427dd096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1427dd0f6
xor eax, eax
add dl, dl
jne 0x1427dd0a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1427dd1ad
add dl, dl
jne 0x1427dd0b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1427dd0c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1427dd0d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1427dd0dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1427dd0ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x1427dd07e
mov eax, 1
add dl, dl
jne 0x1427dd106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1427dd113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1427dd0fb
sub eax, ebx
mov ebx, 1
jne 0x1427dd14c
mov ecx, 1
add dl, dl
jne 0x1427dd12e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1427dd13b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1427dd123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1427dd07e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1427dd168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1427dd175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1427dd15d
cmp eax, 0x7d00
jae 0x1427dd19b
cmp eax, 0x500
jb 0x1427dd196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1427dd07e
cmp eax, 0x7f
ja 0x1427dd19e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1427dd07e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1427dd1d2
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 0x1427dd07e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140160090
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x18
cmp qword [rsp + 0x20], 0
je 0x1401600ba
cmp qword [rsp + 0x28], 0
je 0x1401600ba
cmp dword [rsp + 0x30], 0
jne 0x1401600c1
xor eax, eax
jmp 0x140160218
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x28]
mov qword [rax], rcx
mov rax, qword [rsp + 0x20]
mov ecx, dword [rsp + 0x30]
mov dword [rax + 8], ecx
mov rax, qword [rsp + 0x28]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 0x10], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x10]
cmp dword [rax], 0x4550
je 0x14016010f
xor eax, eax
jmp 0x140160218
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x10]
movzx eax, word [rax + 0x16]
and eax, 0x2000
test eax, eax
je 0x14016012e
mov dword [rsp], 1
jmp 0x140160135
mov dword [rsp], 0
mov rax, qword [rsp + 0x20]
mov ecx, dword [rsp]
mov dword [rax + 0x48], ecx
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x10]
mov rcx, qword [rsp + 0x20]
mov rcx, qword [rcx + 0x10]
movzx ecx, word [rcx + 0x14]
lea rax, [rax + rcx + 0x18]
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 0x18], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x10]
mov ecx, 8
imul rcx, rcx, 1
lea rax, [rax + rcx + 0x88]
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 0x20], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x10]
mov ecx, 8
imul rcx, rcx, 5
lea rax, [rax + rcx + 0x88]
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 0x28], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x10]
mov ecx, 8
imul rcx, rcx, 9
lea rax, [rax + rcx + 0x88]
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 0x30], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x10]
mov ecx, 8
imul rcx, rcx, 3
lea rax, [rax + rcx + 0x88]
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 0x38], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x10]
mov ecx, 8
imul rcx, rcx, 0
lea rax, [rax + rcx + 0x88]
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 0x40], rax
mov eax, 1
add rsp, 0x18
ret
Function at 0x140161908
Capabilities:
Parse pe header

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

Function at 0x140166104
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140165f00
Function at 0x1401691cc
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 0x1401691fc
xor eax, eax
jmp 0x1401692bf
mov rbp, rbx
cmp word [rax], si
je 0x140169221
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x140169208
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x140169204
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.1401690ec
movsxd r14, eax
test eax, eax
jne 0x14016925f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x1401691f5
mov rcx, r14
call fcn.14016a0a8
mov rdi, rax
test rax, rax
jne 0x140169278
xor ecx, ecx
call fcn.14016774c
jmp 0x140169254
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.1401690ec
test eax, eax
jne 0x1401692a9
mov rcx, rdi
call fcn.14016774c
jmp 0x1401692b3
xor ecx, ecx
call fcn.14016774c
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 0x14016c7b0
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.1401681bc
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x14016c83a
cmp byte [rbp - 0x21], r15b
je 0x14016c835
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x14016c870
call fcn.14016a8b8
test eax, eax
jne 0x14016c85c
cmp byte [rbp - 0x21], r15b
je 0x14016c854
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x14016c870
cmp byte [rbp - 0x21], r15b
je 0x14016c86d
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.14016779c
test eax, eax
jne 0x14016c910
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.1401681bc
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x14016c8af
cmp byte [rbp - 0x21], r15b
je 0x14016c8e4
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x14016c8e4
call fcn.14016a8b8
test eax, eax
jne 0x14016c8d0
cmp byte [rbp - 0x21], r15b
je 0x14016c8c9
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x14016c8e4
cmp byte [rbp - 0x21], r15b
je 0x14016c8e1
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.14016779c
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x14016c910
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x14016c913
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x14016c921
mov rcx, rdi
call fcn.14016774c
cmp byte [rbp + 0x3f], r15b
je 0x14016c930
mov rcx, qword [rbp + 0x27]
call fcn.14016774c
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 0x14016f760
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x14016f788
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x14016f788
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140001984
Capabilities:
Parse pe header

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

Function at 0x100401080
Capabilities:
Terminate process
Write file on windows

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, qword [str.clear]
call sub.cygwin1.dll___getreent
mov rcx, qword [rax + 0x18]
lea rdx, str.Usage:__s__options__n
mov r8, rbx
call sub.cygwin1.dll_fprintf
call sub.cygwin1.dll___getreent
mov r9, qword [rax + 0x18]
lea rcx, str._nOptions:_n___T_TERM_____use_this_instead_of__TERM_n___V__________print_curses_version_n___x__________do_not_try_to_clear_scrollback_n
mov r8d, 0x82
mov edx, 1
call sub.cygwin1.dll_fwrite
mov ecx, 1
call sub.cygwin1.dll_exit
nop
nop
jmp 0x1004014a0
jmp qword [sym.imp.cygwin1.dll_putchar]

Function at 0x100401190
Capabilities:
Terminate process

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x30
mov dword [0x10040704c], 2
mov rbx, rcx
mov esi, edx
mov rdx, rcx
mov ecx, 2
call sub.cygwin1.dll_tcgetattr
test eax, eax
js 0x100401210
mov rax, qword [rbx]
mov rdx, qword [rbx + 8]
mov byte [section..bss], 1
mov qword [0x100407020], rax
mov qword [0x100407028], rdx
mov rax, qword [rbx + 0x10]
mov rdx, qword [rbx + 0x18]
mov qword [0x100407030], rax
mov qword [0x100407038], rdx
mov rax, qword [rbx + 0x20]
mov qword [0x100407040], rax
mov eax, dword [rbx + 0x28]
mov dword [0x100407048], eax
mov eax, dword [0x10040704c]
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
mov rdx, rbx
mov ecx, 1
mov dword [0x10040704c], 1
call sub.cygwin1.dll_tcgetattr
test eax, eax
jns 0x1004011b7
xor ecx, ecx
mov rdx, rbx
mov dword [0x10040704c], 0
call sub.cygwin1.dll_tcgetattr
test eax, eax
jns 0x1004011b7
lea rcx, str._dev_tty
mov edx, 2
call sub.cygwin1.dll_open
test eax, eax
mov dword [0x10040704c], eax
jns 0x100401280
test sil, sil
jne 0x100401294
call sub.cygwin1.dll___getreent
mov rcx, qword [rax + 0x10]
call sub.cygwin1.dll_fileno
mov dword [0x10040704c], eax
jmp 0x100401203
mov rdx, rbx
mov ecx, eax
call sub.cygwin1.dll_tcgetattr
test eax, eax
jns 0x1004011b7
jmp 0x100401262
call sub.cygwin1.dll___errno
mov ebx, dword [rax]
mov ecx, ebx
call sub.cygwin1.dll_strerror
mov rdi, rax
mov rax, qword [0x100403120]
mov rsi, qword [rax]
call sub.cygwin1.dll___getreent
mov rcx, qword [rax + 0x18]
lea r9, str.terminal_attributes
lea rdx, str._s:__s:__s_n
mov qword [rsp + 0x20], rdi
mov r8, rsi
call sub.cygwin1.dll_fprintf
cmp byte [section..bss], 0
je 0x1004012f3
mov ecx, dword [0x10040704c]
lea r8, [0x100407020]
mov edx, 3
call sub.cygwin1.dll_tcsetattr
call sub.cygwin1.dll___getreent
mov rdx, qword [rax + 0x18]
mov ecx, 0xa
call sub.cygwin1.dll_fputc
lea ecx, [rbx + 4]
call sub.cygwin1.dll_exit
nop
nop
cmp byte [section..bss], 0
jne 0x100401320
ret
mov ecx, dword [0x10040704c]
lea r8, [0x100407020]
mov edx, 3
jmp sub.cygwin1.dll_tcsetattr