joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140057010
Capabilities:
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0x70
mov rbx, rdx
mov r14, r8
mov r15, rcx
call fcn.140074910
lea rdx, str.environ
mov rcx, rax
call qword [sym.imp.python310.dll_PyObject_GetAttrString]
mov rcx, rbx
mov r12, rax
call qword [sym.imp.python310.dll_PyUnicode_FromString]
mov r13, rax
test r14, r14
je 0x1400570ca
mov rdx, r14
mov rcx, rbx
call fcn.140056f40
mov rcx, r14
mov rdx, 0xffffffffffffffff
call sub.python310.dll_PyUnicode_FromWideChar
mov rdx, r13
mov rcx, r12
mov r14, rax
mov r8, rax
call qword [sym.imp.python310.dll_PyObject_SetItem]
test eax, eax
jne 0x14005710c
sub qword [r14], 1
jne 0x140057091
mov rcx, r14
call fcn.140056f80
sub qword [r13], 1
jne 0x1400570a0
mov rcx, r13
call fcn.140056f80
sub qword [r12], 1
jne 0x1400570bc
mov rcx, r12
add rsp, 0x70
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp fcn.140056f80
add rsp, 0x70
pop rbx
pop r12
pop r13
pop r14
pop r15
ret
lea r14, [rsp + 0x20]
mov r8d, 0x28
mov rdx, rbx
mov word [rsp + 0x20], 0
mov rcx, r14
call fcn.14007c9c0
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rdx, r13
mov rcx, r12
call qword [sym.imp.python310.dll_PyObject_DelItem]
test eax, eax
je 0x140057091
mov rcx, r15
call fcn.140056f90
jmp 0x140057091
mov ecx, 1
call qword [sym.imp.python310.dll_PyErr_PrintEx]
mov ecx, 1
call qword [sym.imp.python310.dll_Py_Exit]
nop
nop word cs:[rax + rax]
nop
Function at 0x1400d79c0
Capabilities:
Encode data using xor
Extract resource via kernel32 functions
Hash data with crc32

Disassembly:
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x20
cmp byte [0x14011f331], 0
mov r12, rcx
mov r13, rdx
mov rdi, r8
je 0x1400d7a48
lea rdx, [0x1400ffb12]
mov rcx, rdi
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1400d7b60
mov rsi, qword [0x14011f1e8]
jmp 0x1400d7a05
lea rsi, [rdx + rax + 4]
mov rdx, rsi
mov rcx, rdi
call sub.msvcrt.dll_strcmp
mov rcx, rsi
mov ebx, eax
call sub.msvcrt.dll_strlen
lea rdx, [rsi + rax + 1]
mov eax, dword [rdx]
test ebx, ebx
jne 0x1400d7a00
movzx r9d, word [rdx + 4]
lea r8, [rdx + 6]
mov rcx, r12
mov rdx, r13
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop r12
pop r13
jmp fcn.1400c53e0
mov r8d, 0xa
mov edx, 3
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_FindResourceA]
xor ecx, ecx
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov qword [0x14011f1e8], rax
mov rdx, rax
mov r9d, dword [rax]
lea rax, [rax + 4]
mov qword [0x14011f1e8], rax
mov eax, dword [rdx + 4]
lea rcx, [rdx + 8]
mov qword [0x14011f1e8], rcx
test eax, eax
je 0x1400d7b48
sub eax, 1
lea r8, [rdx + rax + 9]
mov eax, 0xffffffff
nop word [rax + rax]
movzx edx, byte [rcx]
xor edx, eax
mov eax, edx
and edx, 1
neg edx
shr eax, 1
and edx, 0xedb88320
xor eax, edx
mov edx, eax
and eax, 1
neg eax
shr edx, 1
and eax, 0xedb88320
xor edx, eax
mov eax, edx
and edx, 1
neg edx
shr eax, 1
and edx, 0xedb88320
xor eax, edx
mov edx, eax
and eax, 1
neg eax
shr edx, 1
and eax, 0xedb88320
xor edx, eax
mov eax, edx
and edx, 1
neg edx
shr eax, 1
and edx, 0xedb88320
xor eax, edx
mov edx, eax
and eax, 1
neg eax
shr edx, 1
and eax, 0xedb88320
xor edx, eax
mov eax, edx
shr eax, 1
and edx, 1
add rcx, 1
neg edx
and edx, 0xedb88320
xor eax, edx
mov edx, eax
and eax, 1
neg eax
shr edx, 1
and eax, 0xedb88320
xor eax, edx
cmp r8, rcx
jne 0x1400d7ab0
not eax
cmp r9d, eax
jne 0x1400d7be7
mov byte [0x14011f331], 1
jmp 0x1400d79dd
cmp byte [0x14011f330], 0
jne 0x1400d79f4
mov rbx, qword [sym.imp.python310.dll_PyDict_New]
call rbx
mov qword [0x14011fc68], rax
call rbx
mov qword [0x14011fc60], rax
call rbx
mov qword [0x14011fc58], rax
call rbx
mov qword [0x14011fc50], rax
call rbx
mov qword [0x14011fc48], rax
call rbx
mov qword [0x14011fc40], rax
call rbx
mov qword [0x14011fc38], rax
call rbx
mov byte [0x14011f330], 1
mov qword [0x14011fc30], rax
mov rax, qword [sym.imp.python310.dll__PyRuntime]
mov rax, qword [rax + 0x1f0]
mov rax, qword [rax + 0x10]
add rax, 0xda0
mov qword [0x14011f1e0], rax
jmp 0x1400d79f4
lea rcx, str.Error__corrupted_constants_object
call sub.msvcrt.dll_puts
call sub.msvcrt.dll_abort
nop
nop dword [rax]
Function at 0x1400e0da0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call fcn.1400f2100
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call fcn.1400f2100
mov r8, rbx
mov rdx, qword [rbp + 0x20]
mov rcx, rax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop

Function at 0x1400e1a52
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x140120128]
test eax, eax
je 0x1400e1aea
lea rax, [0x140120100]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x140120130]
mov qword [rbp - 8], rax
jmp 0x1400e1ace
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x1400e1ac2
cmp qword [rbp - 0x10], 0
je 0x1400e1ac2
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x1400e1a88
lea rax, [0x140120100]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x1400e1aeb
nop
add rsp, 0x30
pop rbp
ret

Function at 0x1400e1bf0
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400e1c18
mov eax, 0
jmp 0x1400e1c66
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x1400e1c41
mov eax, 0
jmp 0x1400e1c66
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x1400e1c61
mov eax, 0
jmp 0x1400e1c66
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x1400e1c6c
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x1400e1cea
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x1400e1ce1
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x1400e1ce1
mov rax, qword [rbp - 8]
jmp 0x1400e1cff
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x1400e1cb4
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x1418837a0
Capabilities:
Terminate process

Disassembly:
cld
pop r11
jmp 0x1418837ad
inc rsi
mov byte [rdi], dl
inc rdi
mov dl, byte [rsi]
add ebx, ebx
jne 0x1418837bd
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jb 0x1418837a5
lea eax, [rcx + 1]
jmp 0x1418837cb
dec eax
call r11
adc eax, eax
call r11
adc eax, eax
add ebx, ebx
jne 0x1418837de
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jae 0x1418837c4
sub eax, 3
jb 0x1418837fe
shl eax, 8
movzx edx, dl
or eax, edx
inc rsi
xor eax, 0xffffffff
je 0x14188384d
sar eax, 1
movsxd rbp, eax
jb 0x141883834
jmp 0x14188380c
add ebx, ebx
jne 0x14188380a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x141883834
inc ecx
add ebx, ebx
jne 0x14188381a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x141883834
call r11
adc ecx, ecx
add ebx, ebx
jne 0x14188382d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jae 0x14188381c
add ecx, 2
jmp 0x141883839
call r11
adc ecx, ecx
cmp rbp, 0xfffffffffffffb00
adc ecx, 2
call fcn.141883762
jmp 0x1418837ad
pop rsi
mov rdi, rsi
push rsi
mov rdi, rsi
mov rsi, 0x41b600
mov dl, 0x64
push rbx
push rdi
lea rcx, [rdi + rsi - 3]
pop rsi
push rsi
pop rbx
jmp 0x141883899
cmp rsi, rcx
jae 0x1418838a1
push rsi
pop rsi
lodsb al, byte [rsi]
cmp al, 0x80
jb 0x141883880
cmp al, 0x8f
ja 0x141883880
cmp byte [rsi - 2], 0xf
je 0x141883886
sub al, 0xe8
cmp al, 1
ja 0x14188386a
cmp rsi, rcx
jae 0x1418838a1
push rsi
lodsd eax, dword [rsi]
sub al, dl
jne 0x141883870
pop rdi
bswap eax
sub eax, edi
add eax, ebx
stosd dword [rdi], eax
cmp rsi, rcx
jae 0x1418838a1
lodsb al, byte [rsi]
jmp 0x141883880
pop rbx
pop rsi
sub rsp, 0x28
lea rdi, [rsi + 0x1879000]
mov eax, dword [rdi]
or eax, eax
je 0x1418838fe
mov ebx, dword [rdi + 4]
lea rcx, [rax + rsi + 0x18834ec]
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 0x1418838ae
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 0x1418838f8
mov qword [rbx], rax
add rbx, 8
jmp 0x1418838ce
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 0x141883942
cmp al, 0xef
ja 0x14188392a
add rbx, rax
mov rax, qword [rbx]
bswap rax
add rax, rsi
mov qword [rbx], rax
jmp 0x14188390a
and al, 0xf
shl eax, 0x10
mov ax, word [rdi]
add rdi, 2
or eax, eax
jne 0x141883919
mov eax, dword [rdi]
add rdi, 4
jmp 0x141883919
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 + 0x1af]
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
mov byte [fcn.1418839c1], 0xfc
lea rcx, [rsi - 0x1000]
push 1
pop rdx
xor r8, r8
push rax
call fcn.1418839c1
pop rax
pop rbp
pop rdi
pop rsi
pop rbx
lea rax, [rsp - 0x80]
push 0
cmp rsp, rax
jne 0x1418839b1
sub rsp, 0xffffffffffffff80
jmp 0x1400014e0
Function at 0x1400084d0
Capabilities:
Check mutex on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
mov rbp, rsp
sub rsp, 0x50
and qword [rbp + 0x30], 0
lea r8, [rbp + 0x30]
xor ebx, ebx
lea rcx, str.D:PAI_A_OICI_FA___WD_
xor r14d, r14d
xor r9d, r9d
mov qword [rbp + 0x38], r14
lea edi, [rbx + 1]
mov edx, edi
call qword [sym.imp.api_ms_win_security_sddl_l1_1_0.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW]
test eax, eax
jne 0x140008530
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
test eax, eax
jne 0x14000851d
mov esi, 0x80004005
jmp 0x140008695
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
jmp 0x140008695
xor eax, eax
lea r8, str.GlobalMicrosoft.Windows.Remediation.TelemetryLauncher
mov qword [rbp - 0x20], rax
lea rcx, [rbp - 0x20]
mov qword [rbp - 0x10], rax
xor edx, edx
mov rax, qword [rbp + 0x30]
and dword [rbp - 0x10], ebx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0x20], 0x18
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_CreateMutexW]
mov rbx, rax
test rax, rax
je 0x140008509
mov edx, 0x2710
mov rcx, rax
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
test eax, eax
je 0x1400085bb
cmp eax, 0x102
je 0x1400085b1
cmp eax, 0xffffffff
jne 0x140008513
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
test eax, eax
jne 0x140008596
xor esi, esi
jmp 0x14000869c
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
je 0x14000869c
jmp 0x140008695
mov esi, 0x800705b4
jmp 0x140008695
lea r9, [rbp + 0x38]
call fcn.14000b590
mov r14, qword [rbp + 0x38]
test eax, eax
cmovs r14, rdi
call fcn.14000b6d8
mov esi, eax
test eax, eax
jns 0x1400085e0
mov ecx, eax
jmp 0x140008697
xor ecx, ecx
int3
mov ecx, esi
call fcn.140009374
test rbx, rbx
je 0x1400086aa
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseMutex]
test esi, esi
jns 0x1400086bc
lea rdx, str.Failed_to_get_a_proper_GlobalEventCounter_for_telemetry__using_0
mov ecx, esi
call fcn.140008a40
test rbx, rbx
je 0x1400086ca
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov rcx, qword [rbp + 0x30]
test rcx, rcx
je 0x1400086d9
call qword [sym.imp.api_ms_win_core_heap_obsolete_l1_1_0.dll_LocalFree]
mov rax, r14
add rsp, 0x50
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret
Function at 0x140017548
Capabilities:
Get file version info

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
xor ebx, ebx
xor edi, edi
mov qword [rsp + 0x20], rbx
mov r12, r9
mov r13, r8
mov rsi, rdx
test rdx, rdx
jne 0x140017589
mov ecx, 0x80070057
mov edi, ecx
call fcn.140009374
jmp 0x14001767a
test r13, r13
je 0x140017578
test r12, r12
je 0x140017578
mov r14, qword [rsp + 0x90]
test r14, r14
je 0x140017578
mov r15, qword [rsp + 0x98]
test r15, r15
je 0x140017578
lea rdx, [rsp + 0x70]
mov rcx, rsi
call qword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov ebp, eax
test eax, eax
jne 0x1400175e1
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
test eax, eax
je 0x1400175e1
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
je 0x1400175e1
mov ecx, edi
jmp 0x14001757f
mov rdx, rbp
lea rcx, [rsp + 0x20]
call fcn.1400176a4
mov rbx, qword [rsp + 0x20]
test rbx, rbx
jne 0x1400175ff
mov edi, 0x8007000e
jmp 0x1400175dd
mov r9, rbx
mov r8d, ebp
xor edx, edx
mov rcx, rsi
call qword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
jne 0x140017635
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
test eax, eax
jne 0x140017625
mov edi, 0x80004005
jmp 0x1400175dd
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
jmp 0x1400175dd
lea r9, [rsp + 0x78]
mov rcx, rbx
lea r8, [rsp + 0x28]
lea rdx, [0x140021d30]
call qword [sym.imp.api_ms_win_core_version_l1_1_0.dll_VerQueryValueW]
test eax, eax
je 0x140017614
mov r8, qword [rsp + 0x28]
movzx edx, word [r8 + 0xa]
mov dword [r13], edx
movzx edx, word [r8 + 8]
mov dword [r12], edx
movzx edx, word [r8 + 0xe]
mov dword [r14], edx
movzx edx, word [r8 + 0xc]
mov dword [r15], edx
mov ecx, edi
call fcn.140009390
mov rcx, rbx
call fcn.14001cb10
mov rbx, qword [rsp + 0x80]
mov eax, edi
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret

Function at 0x14001c24d
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [rsp + 8]
and rdx, 0
Function at 0x140001487
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x1400da190]
mov dword [rax], 1
mov rax, qword [0x1400da1a0]
mov dword [rax], 1
mov rax, qword [0x1400da1b0]
mov dword [rax], 1
mov rax, qword [0x1400da130]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400014d8
mov eax, 0
jmp 0x140001585
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x140001504
mov eax, 0
jmp 0x140001585
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000152a
cmp eax, 0x20b
je 0x140001551
jmp 0x140001580
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000153d
mov eax, 0
jmp 0x140001585
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001585
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000156c
mov eax, 0
jmp 0x140001585
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001585
mov eax, 0
add rsp, 0x20
pop rbp
ret

Function at 0x14002dc00
Capabilities:
Query environment variable

Disassembly:
push r13
mov eax, 0x10078
push r12
call fcn.1400bad60
sub rsp, rax
xor eax, eax
mov r8d, 0x28
mov rdx, rcx
lea r12, [rsp + 0x20]
xor ecx, ecx
mov word [rsp + 0x70], ax
mov word [rsp + 0x20], cx
lea r13, [rsp + 0x70]
mov rcx, r12
call fcn.140052960
mov rdx, r13
mov r8d, 0x10000
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea edx, [rax - 1]
xor eax, eax
cmp edx, 0xffff
ja 0x14002dc61
mov rcx, r13
call sub.msvcrt.dll__wcsdup
add rsp, 0x10078
pop r12
pop r13
ret

Function at 0x14002dc70
Capabilities:
Set environment variable

Disassembly:
push r13
push r12
sub rsp, 0x78
xor eax, eax
mov r8d, 0x28
lea r13, [rsp + 0x20]
mov r12, rdx
mov rdx, rcx
mov word [rsp + 0x20], ax
mov rcx, r13
call fcn.140052960
mov rdx, r12
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
nop
add rsp, 0x78
pop r12
pop r13
ret
Function at 0x14002ddc0
Capabilities:
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0x70
mov rbx, rdx
mov r14, r8
mov r15, rcx
call fcn.14004cdd0
lea rdx, str.environ
mov rcx, rax
call qword [sym.imp.python37.dll_PyObject_GetAttrString]
mov rcx, rbx
mov r12, rax
call qword [sym.imp.python37.dll_PyUnicode_FromString]
mov r13, rax
test r14, r14
je 0x14002de8d
mov rdx, r14
mov rcx, rbx
call fcn.14002dc70
mov rcx, r14
mov rdx, 0xffffffffffffffff
call sub.python37.dll_PyUnicode_FromWideChar
mov rdx, r13
mov rcx, r12
mov r14, rax
mov r8, rax
call qword [sym.imp.python37.dll_PyObject_SetItem]
test eax, eax
jne 0x14002ded6
sub qword [r14], 1
je 0x14002de81
sub qword [r13], 1
je 0x14002de75
sub qword [r12], 1
je 0x14002de59
add rsp, 0x70
pop rbx
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [r12 + 8]
mov rcx, r12
mov rax, qword [rax + 0x30]
add rsp, 0x70
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp rax
mov rax, qword [r13 + 8]
mov rcx, r13
call qword [rax + 0x30]
jmp 0x14002de44
mov rax, qword [r14 + 8]
mov rcx, r14
call qword [rax + 0x30]
jmp 0x14002de3d
lea r14, [rsp + 0x20]
mov r8d, 0x28
mov rdx, rbx
mov word [rsp + 0x20], 0
mov rcx, r14
call fcn.140052960
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rdx, r13
mov rcx, r12
call qword [sym.imp.python37.dll_PyObject_DelItem]
test eax, eax
je 0x14002de3d
mov rcx, r15
call fcn.14002db80
jmp 0x14002de3d
mov ecx, 1
call qword [sym.imp.python37.dll_PyErr_PrintEx]
mov ecx, 1
call qword [sym.imp.python37.dll_Py_Exit]
nop
nop dword [rax]
Function at 0x1400b7610
Capabilities:
Encode data using xor
Extract resource via kernel32 functions
Hash data with crc32

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp byte [0x1400ebd79], 0
mov r12, rcx
mov r13, rdx
mov rdi, r8
je 0x1400b7698
lea rdx, [0x1400d87fa]
mov rcx, rdi
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1400b77b0
mov rsi, qword [0x1400ebc38]
jmp 0x1400b7655
lea rsi, [rdx + rax + 4]
mov rdx, rsi
mov rcx, rdi
call sub.msvcrt.dll_strcmp
mov rcx, rsi
mov ebx, eax
call sub.msvcrt.dll_strlen
lea rdx, [rsi + rax + 1]
mov eax, dword [rdx]
test ebx, ebx
jne 0x1400b7650
movzx r9d, word [rdx + 4]
lea r8, [rdx + 6]
mov rcx, r12
mov rdx, r13
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp fcn.1400a4c10
mov r8d, 0xa
mov edx, 3
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_FindResourceA]
xor ecx, ecx
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov qword [0x1400ebc38], rax
mov rdx, rax
mov r9d, dword [rax]
lea rax, [rax + 4]
mov qword [0x1400ebc38], rax
mov eax, dword [rdx + 4]
lea rcx, [rdx + 8]
mov qword [0x1400ebc38], rcx
test eax, eax
je 0x1400b7798
sub eax, 1
lea r8, [rdx + rax + 9]
mov eax, 0xffffffff
nop word [rax + rax]
movzx edx, byte [rcx]
xor edx, eax
mov eax, edx
and edx, 1
neg edx
shr eax, 1
and edx, 0xedb88320
xor eax, edx
mov edx, eax
and eax, 1
neg eax
shr edx, 1
and eax, 0xedb88320
xor edx, eax
mov eax, edx
and edx, 1
neg edx
shr eax, 1
and edx, 0xedb88320
xor eax, edx
mov edx, eax
and eax, 1
neg eax
shr edx, 1
and eax, 0xedb88320
xor edx, eax
mov eax, edx
and edx, 1
neg edx
shr eax, 1
and edx, 0xedb88320
xor eax, edx
mov edx, eax
and eax, 1
neg eax
shr edx, 1
and eax, 0xedb88320
xor edx, eax
mov eax, edx
shr eax, 1
and edx, 1
add rcx, 1
neg edx
and edx, 0xedb88320
xor eax, edx
mov edx, eax
and eax, 1
neg eax
shr edx, 1
and eax, 0xedb88320
xor eax, edx
cmp r8, rcx
jne 0x1400b7700
not eax
cmp r9d, eax
jne 0x1400b7849
mov byte [0x1400ebd79], 1
jmp 0x1400b762e
cmp byte [0x1400ebd78], 0
jne 0x1400b7645
mov rbx, qword [sym.imp.python37.dll_PyDict_New]
lea rsi, [0x1400eb428]
call rbx
mov qword [0x1400ec6a8], rax
call rbx
mov qword [0x1400ec6a0], rax
call rbx
mov qword [0x1400ec698], rax
call rbx
mov qword [0x1400ec690], rax
call rbx
mov qword [0x1400ec688], rax
call rbx
mov qword [0x1400ec680], rax
call rbx
mov qword [0x1400ec678], rax
call rbx
mov rbp, qword [sym.imp.python37.dll_PyLong_FromLong]
mov rbx, 0xfffffffffffffffb
mov qword [0x1400ec670], rax
nop dword [rax]
mov ecx, ebx
call rbp
mov qword [rsi + rbx*8], rax
add rbx, 1
cmp rbx, 0x101
jne 0x1400b7828
mov byte [0x1400ebd78], 1
jmp 0x1400b7645
lea rcx, str.Error__corrupted_constants_object
call sub.msvcrt.dll_puts
call sub.msvcrt.dll_abort
nop
nop dword [rax + rax]
Function at 0x1400b9a60
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call fcn.1400cad20
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call fcn.1400cad20
mov r8, rbx
mov rdx, qword [rbp + 0x20]
mov rcx, rax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop

Function at 0x1400ba712
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x1400ecb08]
test eax, eax
je 0x1400ba7aa
lea rax, [0x1400ecae0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x1400ecb10]
mov qword [rbp - 8], rax
jmp 0x1400ba78e
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x1400ba782
cmp qword [rbp - 0x10], 0
je 0x1400ba782
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x1400ba748
lea rax, [0x1400ecae0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x1400ba7ab
nop
add rsp, 0x30
pop rbp
ret

Function at 0x1400ba8b0
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400ba8d8
mov eax, 0
jmp 0x1400ba926
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x1400ba901
mov eax, 0
jmp 0x1400ba926
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x1400ba921
mov eax, 0
jmp 0x1400ba926
mov eax, 1
add rsp, 0x20
pop rbp
ret