joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1800bace4
Capabilities:
Delete directory
Delete file

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x2b0
mov rax, qword [0x1803e3008]
xor rax, rsp
mov qword [rsp + 0x2a0], rax
lea r8, [rsp + 0x20]
xor edx, edx
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x1800bad22
test byte [rsp + 0x20], 0x10
jne 0x1801af164
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rcx, qword [rsp + 0x2a0]
xor rcx, rsp
call fcn.180181080
mov rbx, qword [rsp + 0x2c8]
add rsp, 0x2b0
pop rdi
ret
test dword [rsp + 0x20], 0x400
je 0x1800bad22
lea rdx, [rsp + 0x50]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp rax, 0xffffffffffffffff
je 0x1800bad22
cmp dword [rsp + 0x74], 0xa000000c
je 0x1801af1a2
cmp dword [rsp + 0x74], 0xa0000003
je 0x1801af1a2
xor edi, edi
jmp 0x1801af1a7
mov edi, 1
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_FindClose]
test edi, edi
je 0x1800bad22
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
nop
jmp 0x1800bad2b

Function at 0x1800bafdc
Capabilities:
Create directory

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
or eax, 0xffffffff
lea rcx, str.os.mkdir
cmp r9d, 0xffffff9c
mov rsi, rdx
cmovne eax, r9d
mov r9d, r8d
mov r8, qword [rdx + 0x30]
lea rdx, [0x18023e374]
mov dword [rsp + 0x20], eax
call sym.python310.dll_PySys_Audit
test eax, eax
js 0x1800bb072
call sym.python310.dll_PyEval_SaveThread
mov rcx, qword [rsi + 0x18]
xor edx, edx
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov rcx, rdi
mov ebx, eax
call sym.python310.dll_PyEval_RestoreThread
test ebx, ebx
je 0x1800bb05b
inc qword [sym.python310.dll__Py_NoneStruct]
lea rax, sym.python310.dll__Py_NoneStruct
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
mov r8, qword [rsi + 0x30]
xor r9d, r9d
mov rcx, qword [sym.python310.dll_PyExc_OSError]
xor edx, edx
call sym.python310.dll_PyErr_SetExcFromWindowsErrWithFilenameObjects
jmp 0x1800bb04b
xor eax, eax
jmp 0x1800bb04b
Function at 0x1800bb1c8
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
mov rdi, rdx
lea rcx, str.chmod
mov edx, dword [rsp + 0x60]
mov esi, r9d
mov ebx, r8d
call fcn.1800bb82c
test eax, eax
jne 0x1800bb286
mov r8, qword [rdi + 0x30]
lea rdx, [0x18023e374]
or eax, 0xffffffff
lea rcx, str.os.chmod
cmp esi, 0xffffff9c
mov r9d, ebx
cmovne eax, esi
mov dword [rsp + 0x20], eax
call sym.python310.dll_PySys_Audit
test eax, eax
js 0x1800bb286
call sym.python310.dll_PyEval_SaveThread
mov rcx, qword [rdi + 0x18]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edx, eax
cmp eax, 0xffffffff
je 0x1800bb282
mov rcx, qword [rdi + 0x18]
or eax, 1
and edx, 0xfffffffe
test bl, 0x80
cmove edx, eax
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ebx, eax
mov rcx, rsi
call sym.python310.dll_PyEval_RestoreThread
test ebx, ebx
je 0x1801af2ec
inc qword [sym.python310.dll__Py_NoneStruct]
lea rax, sym.python310.dll__Py_NoneStruct
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
xor ebx, ebx
jmp 0x1800bb254
xor eax, eax
jmp 0x1800bb272
mov r8, qword [rdi + 0x30]
xor r9d, r9d
mov rcx, qword [sym.python310.dll_PyExc_OSError]
xor edx, edx
call sym.python310.dll_PyErr_SetExcFromWindowsErrWithFilenameObjects
nop
jmp 0x1800bb272
Function at 0x1800c0050
Capabilities:
Encode data using base64

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r14
sub rsp, 0x260
mov rax, qword [0x1803e3008]
xor rax, rsp
mov qword [rsp + 0x250], rax
mov rsi, qword [rdx + 0x10]
xor ebx, ebx
and qword [rsp + 0x20], rbx
xor edi, edi
mov rbp, qword [rdx]
movabs rax, 0x3ffffffffffffffe
xorps xmm0, xmm0
mov r14d, r8d
movdqa xmmword [rsp + 0x30], xmm0
cmp rsi, rax
jg 0x1801b0166
mov eax, r8d
mov dword [rsp + 0x40], 1
neg eax
mov qword [rsp + 0x28], 0x200
lea rdx, [rsp + 0x44]
sbb rcx, rcx
neg rcx
add rcx, 2
lea r8, [rcx + rsi*2]
lea rcx, [rsp + 0x20]
call sym.python310.dll__PyBytesWriter_Prepare
mov r8, rax
test rax, rax
je 0x1800c01c2
test rsi, rsi
jle 0x1800c014d
lea r11, [0x1802623c0]
movzx eax, byte [rbp]
add edi, 8
shl ebx, 8
or ebx, eax
cmp edi, 6
jl 0x1800c0138
mov eax, 0xaaaaaaab
lea r10d, [rdi - 6]
mul edi
shr edx, 2
imul eax, edx, 0xfffffffa
mov r9d, edx
add edi, eax
mov ecx, r10d
mov eax, ebx
shr eax, cl
sub r10d, 6
mov ecx, eax
and ecx, 0x3f
mov al, byte [rcx + r11]
mov byte [r8], al
inc r8
sub r9, 1
jne 0x1800c0118
dec rsi
inc rbp
test rsi, rsi
jg 0x1800c00f1
cmp edi, 2
je 0x1800c01a8
cmp edi, 4
je 0x1800c0190
test r14d, r14d
jne 0x1800c0187
mov rdx, r8
lea rcx, [rsp + 0x20]
call sym.python310.dll__PyBytesWriter_Finish
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.180181080
lea r11, [rsp + 0x260]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
mov byte [r8], 0xa
inc r8
jmp 0x1800c0152
and ebx, 0xf
shl ebx, 2
mov al, byte [rbx + r11]
mov byte [r8], al
mov byte [r8 + 1], 0x3d
add r8, 2
jmp 0x1800c014d
and ebx, 3
shl ebx, 4
mov al, byte [rbx + r11]
mov byte [r8], al
mov word [r8 + 1], 0x3d3d
add r8, 3
jmp 0x1800c014d
xor eax, eax
jmp 0x1800c015f
call sym.python310.dll_PyModule_GetState
test rax, rax
je 0x1800c01c2
mov rcx, qword [rax]
lea rdx, str.Too_much_data_for_base64_line
call sym.python310.dll_PyErr_SetString
nop
jmp 0x1800c01c2
Function at 0x1800c036c
Capabilities:
Encode data using base64

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x260
mov rax, qword [0x1803e3008]
xor rax, rsp
mov qword [rsp + 0x250], rax
mov rsi, qword [rdx + 0x10]
mov r14, rcx
mov r15, qword [rdx]
lea rcx, [rsp + 0x20]
and qword [rsp + 0x20], 0
lea rdx, [rsp + 0x44]
xorps xmm0, xmm0
mov dword [rsp + 0x40], 1
lea rax, [rsi + 3]
movdqa xmmword [rsp + 0x30], xmm0
shr rax, 2
mov qword [rsp + 0x28], 0x200
lea r8, [rax + rax*2]
call sym.python310.dll__PyBytesWriter_Prepare
mov rbx, rax
test rax, rax
je 0x1800c0506
xor edi, edi
xor cl, cl
xor r10d, r10d
xor r9d, r9d
mov rbp, rax
test rsi, rsi
je 0x1800c045b
cmp byte [r9 + r15], 0x3d
je 0x1800c04c2
movzx eax, byte [r9 + r15]
lea rdx, [0x1802620f0]
mov r8b, byte [rax + rdx]
cmp r8b, 0x40
jae 0x1800c044f
xor r10d, r10d
mov edx, edi
test edi, edi
je 0x1800c0447
sub edx, 1
je 0x1800c048f
sub edx, 1
jne 0x1800c04ac
shl cl, 4
lea edi, [rdx + 3]
mov al, r8b
shr al, 2
or al, cl
mov cl, r8b
mov byte [rbx], al
inc rbx
and cl, dil
jmp 0x1800c044f
mov edi, 1
mov cl, r8b
inc r9
cmp r9, rsi
jb 0x1800c03f4
test edi, edi
jne 0x1800c04d8
mov rdx, rbx
lea rcx, [rsp + 0x20]
call sym.python310.dll__PyBytesWriter_Finish
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.180181080
mov rbx, qword [rsp + 0x2a0]
add rsp, 0x260
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
shl cl, 2
mov al, r8b
shr al, 4
mov edi, 2
or al, cl
mov cl, r8b
mov byte [rbx], al
inc rbx
and cl, 0xf
jmp 0x1800c044f
cmp edx, 1
jne 0x1800c044f
shl cl, 6
xor edi, edi
or cl, r8b
mov byte [rbx], cl
inc rbx
xor cl, cl
jmp 0x1800c044f
cmp edi, 2
jl 0x1800c044f
inc r10d
lea eax, [r10 + rdi]
cmp eax, 4
jge 0x1800c045b
jmp 0x1800c044f
mov rcx, r14
call sym.python310.dll_PyModule_GetState
mov rcx, rax
test rax, rax
je 0x1800c04fc
cmp edi, 1
je 0x1800c050d
mov rcx, qword [rax]
lea rdx, str.Incorrect_padding
call sym.python310.dll_PyErr_SetString
lea rcx, [rsp + 0x20]
call sym.python310.dll__PyBytesWriter_Dealloc
xor eax, eax
jmp 0x1800c0468
mov rcx, qword [rcx]
sub rbx, rbp
movabs rax, 0x5555555555555556
imul rbx
mov rax, rdx
shr rax, 0x3f
add rdx, rax
lea r8, [rdx*4 + 1]
lea rdx, str.Invalid_base64_encoded_string:_number_of_data_characters___zd__cannot_be_1_more_than_a_multiple_of_4
call sym.python310.dll_PyErr_Format
jmp 0x1800c04fc
Function at 0x1800da628
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
mov eax, dword [0x180424a18]
mov rsi, rcx
test eax, eax
mov ecx, 1
mov rdi, rdx
cmove eax, ecx
mov dword [0x180424a18], eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
xor edx, edx
mov rcx, rax
lea r8d, [rdx + 0x10]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
je 0x1800da6d7
mov qword [rax], rsi
mov qword [rax + 8], rdi
mov rax, qword [0x18044f1f0]
test rax, rax
je 0x1800da6dc
mov rax, qword [rax + 0x10]
mov rcx, qword [rax + 0x388]
lea rax, [rsp + 0x50]
mov edx, ecx
mov qword [rsp + 0x28], rax
lea r8, [0x1800da18c]
and dword [rsp + 0x20], 0
mov r9, rbx
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
test rax, rax
je 0x1801b66a6
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x50]
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
or eax, 0xffffffff
jmp 0x1800da6c7
xor ecx, ecx
jmp 0x1800da68e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
or dword [rsp + 0x50], 0xffffffff
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop
jmp 0x1800da6c3

Function at 0x1800da9a4
Capabilities:
Allocate thread local storage

Disassembly:
push rbx
sub rsp, 0x20
cmp dword [rcx], 0
mov rbx, rcx
jne 0x1800da9c6
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x1800da9ce
mov dword [rbx + 4], eax
mov dword [rbx], 1
xor eax, eax
add rsp, 0x20
pop rbx
ret
or eax, 0xffffffff
jmp 0x1800da9c8

Function at 0x1800db354
Capabilities:
Generate random numbers via winapi

Disassembly:
sub rsp, 0x28
test rdx, rdx
js 0x1801b68d4
je 0x1800db36f
mov r8d, r9d
add rsp, 0x28
jmp fcn.1800db378
xor eax, eax
add rsp, 0x28
ret
test r9d, r9d
je 0x1801b68ec
mov rcx, qword [sym.python310.dll_PyExc_ValueError]
lea rdx, str.negative_argument_not_allowed
call sym.python310.dll_PyErr_Format
or eax, 0xffffffff
add rsp, 0x28
ret
Function at 0x1800db378
Capabilities:
Generate random numbers via winapi

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, 0x30
cmp qword [0x180423c18], 0
mov edi, r8d
mov rbx, rdx
mov rsi, rcx
jne 0x1800db3cb
mov r9d, 1
mov dword [rax - 0x18], 0xf0000000
xor r8d, r8d
lea rcx, [0x180423c18]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x1801b68f4
test rbx, rbx
jle 0x1800db406
mov r14d, 0xffffffff
mov rcx, qword [0x180423c18]
cmp rbx, r14
mov ebp, ebx
mov r8, rsi
cmova ebp, r14d
mov edx, ebp
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
je 0x1801b68f4
mov eax, ebp
add rsi, rax
sub rbx, rax
test rbx, rbx
jg 0x1800db3d6
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
add rsp, 0x30
pop r14
ret
test edi, edi
je 0x1801b6909
mov rcx, qword [sym.python310.dll_PyExc_OSError]
xor r8d, r8d
xor edx, edx
call sym.python310.dll_PyErr_SetExcFromWindowsErrWithFilename
or eax, 0xffffffff
jmp 0x1800db408

Function at 0x1800db790
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov edi, 1
mov dword [rcx + 0x14], 0x12bd6aa
mov r9, rcx
mov r10d, edi
mov ecx, edi
mov r11, r8
mov rbx, rdx
mov esi, 0x270
mov eax, dword [r9 + rcx*4 + 0x10]
shr eax, 0x1e
xor eax, dword [r9 + rcx*4 + 0x10]
imul eax, eax, 0x6c078965
add eax, r10d
add r10d, edi
mov dword [r9 + rcx*4 + 0x14], eax
add rcx, rdi
cmp rcx, rsi
jl 0x1800db7be
mov dword [r9 + 0x10], r10d
mov r8, rsi
xor r10d, r10d
mov rdx, rdi
cmp r11, rsi
cmovae r8, r11
test r8, r8
je 0x1800db83b
mov eax, dword [r9 + rdx*4 + 0x10]
shr eax, 0x1e
xor eax, dword [r9 + rdx*4 + 0x10]
imul ecx, eax, 0x19660d
xor ecx, dword [r9 + rdx*4 + 0x14]
add ecx, dword [rbx + r10*4]
add ecx, r10d
mov dword [r9 + rdx*4 + 0x14], ecx
add rdx, rdi
lea rcx, [r10 + 1]
cmp rdx, rsi
jae 0x1800db885
cmp rcx, r11
sbb r10, r10
and r10, rcx
sub r8, rdi
jne 0x1800db7fd
mov r8d, 0x26f
mov eax, dword [r9 + rdx*4 + 0x10]
shr eax, 0x1e
xor eax, dword [r9 + rdx*4 + 0x10]
imul ecx, eax, 0x5d588b65
xor ecx, dword [r9 + rdx*4 + 0x14]
sub ecx, edx
mov dword [r9 + rdx*4 + 0x14], ecx
add rdx, rdi
cmp rdx, rsi
jae 0x1800db895
sub r8, rdi
jne 0x1800db841
mov rbx, qword [rsp + 8]
mov rsi, qword [rsp + 0x10]
mov rdi, qword [rsp + 0x18]
mov dword [r9 + 0x14], 0x80000000
ret
mov eax, dword [r9 + 0x9d0]
mov rdx, rdi
mov dword [r9 + 0x14], eax
jmp 0x1800db82d
mov eax, dword [r9 + 0x9d0]
mov rdx, rdi
mov dword [r9 + 0x14], eax
jmp 0x1800db868
Function at 0x1800e71e8
Capabilities:
Send data
Send data on socket

Disassembly:
push rbx
sub rsp, 0x20
mov r8d, 1
movsxd r9, ecx
lea rax, [0x180420be0]
mov rdx, r9
shl rdx, 4
add rdx, rax
mov eax, r8d
xchg dword [rdx], eax
mov eax, r8d
xchg dword [0x180420d50], eax
mov rbx, qword [0x18044f028]
mov eax, r8d
mov rcx, qword [rbx + 0x10]
xchg dword [rcx + 0x158], eax
mov eax, r8d
xchg dword [rbx + 0x44], eax
mov rcx, qword [0x180419b50]
cmp ecx, 0xffffffff
jne 0x1801b9868
add rsp, 0x20
pop rbx
ret
mov eax, dword [0x180419b5c]
lea rdx, [rsp + 0x38]
mov byte [rsp + 0x38], r9b
xor r9d, r9d
test eax, eax
je 0x1801b98b7
movsxd rcx, ecx
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x1800e7240
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [0x180419b58]
test edx, edx
jne 0x1801b98ab
cmp eax, 0x2733
je 0x1800e7240
movsxd r8, eax
lea rdx, [0x1801f6b9c]
jmp 0x1801b9900
call fcn.180002fb4
test rax, rax
jns 0x1800e7240
mov eax, dword [0x180419b58]
test eax, eax
jne 0x1801b98f0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [rax], 0x8c
je 0x1800e7240
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [rax], 0xb
je 0x1800e7240
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
lea rdx, [0x1801f6c14]
movsxd r8, dword [rax]
mov rcx, rbx
call sym.python310.dll__PyEval_AddPendingCall
nop
jmp 0x1800e7240
Function at 0x1800e8ca8
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov eax, dword [0x1803fc5c8]
cmp eax, 0xffffffff
je 0x1800e8e14
test eax, eax
jne 0x1801ba229
mov rbx, qword [0x180421b18]
test rbx, rbx
je 0x1800e8d77
mov rax, qword [rbx + 0x20]
mov edx, 0x100000
mov rcx, qword [0x180419b60]
mov qword [0x180421b18], rax
call qword [0x180419b68]
mov rdi, rax
test rax, rax
je 0x1801ba258
mov edx, 1
mov rcx, rax
call fcn.1800e8e54
test eax, eax
je 0x1801ba242
mov rax, qword [0x180421b30]
mov edx, edi
mov rcx, qword [0x180421b20]
inc qword [0x1804218f8]
inc rcx
cmp rcx, rax
mov qword [rbx], rdi
mov qword [0x180421b20], rcx
cmova rax, rcx
mov qword [rbx + 8], rdi
and qword [rbx + 0x18], 0
mov qword [0x180421b30], rax
mov eax, 0x40
mov dword [rbx + 0x10], eax
and edx, 0x3fff
jne 0x1801ba271
mov dword [rbx + 0x14], eax
mov rax, rbx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov eax, dword [0x180421b10]
lea edi, [rax + rax]
test eax, eax
jne 0x1800e8d89
mov edi, send
cmp edi, eax
jbe 0x1801ba26a
mov rcx, qword [0x180421b08]
mov eax, edi
lea rdx, [rax + rax*2]
shl rdx, 4
call sym.python310.dll_PyMem_RawRealloc
test rax, rax
je 0x1801ba26a
mov r11d, dword [0x180421b10]
mov qword [0x180421b08], rax
mov edx, r11d
cmp r11d, edi
jae 0x1800e8dfa
lea r8, [r11 + r11*2]
shl r8, 4
lea ebx, [rdi - 1]
add r8, rax
and qword [r8], 0
lea r10d, [rdx + 1]
cmp edx, ebx
mov edx, r10d
jae 0x1800e8e10
lea rcx, [r10 + r10*2]
shl rcx, 4
add rcx, rax
mov qword [r8 + 0x20], rcx
add r8, 0x30
cmp edx, edi
jb 0x1800e8dd4
lea rbx, [r11 + r11*2]
mov dword [0x180421b10], edi
shl rbx, 4
add rbx, rax
jmp 0x1800e8cd9
xor ecx, ecx
jmp 0x1800e8dee
cmp dword [sym.python310.dll_Py_IgnoreEnvironmentFlag], 0
jne 0x1800e8e33
lea rcx, str.PYTHONMALLOCSTATS
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
jne 0x1801ba216
xor eax, eax
mov dword [0x1803fc5c8], eax
jmp 0x1800e8cc1
cmp byte [rax], 0
je 0x1800e8e33
mov dword [0x1803fc5c8], 1
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call sym.python310.dll__PyObject_DebugMallocStats
nop
jmp 0x1800e8cc9
mov rcx, qword [0x180419b60]
mov r8d, 0x100000
mov rdx, rdi
call qword [0x180419b70]
mov rax, qword [0x180421b18]
mov qword [rbx + 0x20], rax
mov qword [0x180421b18], rbx
xor eax, eax
jmp 0x1800e8d6c
mov ecx, 0x4000
mov eax, 0x3f
sub ecx, edx
mov dword [rbx + 0x10], eax
mov edx, ecx
add rdx, rdi
mov qword [rbx + 8], rdx
jmp 0x1800e8d66
Function at 0x1800eb00c
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x28
test ecx, ecx
je 0x1800eb025
mov rcx, rdx
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rdx, rax
test rax, rax
jne 0x1800eb02c
xor eax, eax
add rsp, 0x28
ret
mov cl, byte [rax]
neg cl
sbb rax, rax
and rax, rdx
jmp 0x1800eb027

Function at 0x1800fa40c
Capabilities:
Query or enumerate registry value

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 8], rcx
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x40
and dword [rbp + 0x20], 0
lea rcx, str.winreg.QueryValue
mov rsi, r8
mov qword [rax - 0x38], r8
mov r8, rdx
mov r14, rdx
lea rdx, [0x180240554]
xor r9d, r9d
call sym.python310.dll_PySys_Audit
test eax, eax
js 0x1800fa538
lea rax, [rbp + 0x20]
xor r9d, r9d
mov qword [rsp + 0x28], rax
xor r8d, r8d
and qword [rsp + 0x20], 0
mov rdx, rsi
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, 0xea
je 0x1801bc0ee
test eax, eax
jne 0x1801bc0fb
mov eax, dword [rbp + 0x20]
mov ecx, eax
call sym.python310.dll_PyMem_Malloc
mov rdi, rax
test rax, rax
je 0x1801bc136
mov eax, dword [rbp + 0x20]
mov dword [rbp + 0x38], eax
lea rax, [rbp + 0x38]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
lea r9, [rbp - 0x10]
xor r8d, r8d
mov rdx, rsi
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, eax
cmp eax, 0xea
je 0x1801bc141
test eax, eax
jne 0x1801bc0ff
mov r8d, dword [rbp - 0x10]
mov rcx, rdi
mov edx, dword [rbp + 0x20]
call fcn.1800fa53c
mov rcx, qword [0x1803fc5f8]
mov rdx, rdi
mov rbx, rax
call qword [case.0x180096615.3]
test rbx, rbx
je 0x1800fa538
mov r8d, dword [rbp - 0x10]
lea rcx, [0x18023d540]
mov rdx, rbx
call sym.python310.dll__Py_BuildValue_SizeT
sub qword [rbx], 1
mov rdi, rax
je 0x1801bc174
mov rax, rdi
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x40
pop r14
pop rdi
pop rbp
ret
xor eax, eax
jmp 0x1800fa525
mov eax, 0x100
mov dword [rbp + 0x20], eax
jmp 0x1800fa48c
mov edx, eax
jmp 0x1801bc111
mov rcx, qword [0x1803fc5f8]
mov rdx, rdi
call qword [case.0x180096615.3]
mov edx, ebx
mov rcx, qword [sym.python310.dll_PyExc_OSError]
xor r8d, r8d
call sym.python310.dll_PyErr_SetExcFromWindowsErrWithFilename
nop
jmp 0x1800fa525
mov rcx, qword [0x1803fc5f8]
mov rdx, rdi
call qword [case.0x180096615.3]
call sym.python310.dll_PyErr_NoMemory
nop
jmp 0x1800fa525
mov eax, dword [rbp + 0x20]
mov rcx, rdi
add eax, eax
mov edx, eax
mov dword [rbp + 0x20], eax
call sym.python310.dll_PyMem_Realloc
test rax, rax
je 0x1801bc126
mov ecx, dword [rbp + 0x20]
mov rdi, rax
mov dword [rbp + 0x38], ecx
lea rcx, [rbp + 0x38]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rax
jmp 0x1800fa4b3
mov rdx, qword [rbx + 8]
mov rcx, rbx
call qword [rdx + 0x30]
nop
jmp 0x1800fa522
Function at 0x1801044a0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
add rsp, 0x28
ret

Function at 0x18010ae50
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
mov r9d, 1
test r8, r8
jle 0x18010ae83
sub rdx, rcx
mov r10d, 0x3fffffff
mov eax, dword [rdx + rcx]
xor eax, r10d
add r9d, eax
mov eax, r9d
shr r9d, 0x1e
and eax, r10d
mov dword [rcx], eax
lea rcx, [rcx + 4]
sub r8, 1
jne 0x18010ae64
ret

Function at 0x18010f040
Capabilities:
Encode data using xor
Hash data using sha256

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, rdx
mov rbx, rcx
add rcx, 0x20
xor edx, edx
mov r8d, 0x96
call sub.VCRUNTIME140.dll_memset
movaps xmm0, xmmword [0x180255cc0]
lea r8, [rdi + 2]
movaps xmm1, xmmword [0x180255cd0]
mov r9, rbx
movups xmmword [rbx], xmm0
sub r9, rdi
mov r10d, 8
movups xmmword [rbx + 0x10], xmm1
movzx eax, byte [r8 - 1]
movzx edx, byte [r8 - 2]
movzx ecx, byte [r8 + 1]
shl ecx, 8
shl eax, 8
or edx, eax
movzx eax, byte [r8]
or ecx, eax
lea r8, [r8 + 4]
shl ecx, 0x10
or ecx, edx
xor dword [r9 + r8 - 6], ecx
sub r10, 1
jne 0x18010f086
mov al, byte [rdi]
mov byte [rbx + 0xb4], al
xor eax, eax
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x1801114a4
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
xor r9d, r9d
mov rbx, rdx
mov r10, rcx
cmp r8d, 8
jae 0x1801114f2
lea eax, [r9 + 4]
cmp eax, r8d
jbe 0x1801114d5
lea eax, [r9 + 2]
cmp eax, r8d
jbe 0x180111525
cmp r9d, r8d
jb 0x18011151b
mov rbx, qword [rsp + 8]
ret
xor edx, edx
lea eax, [rdx + r9]
inc edx
mov ecx, eax
mov rax, qword [rbx + rax*8]
xor qword [r10 + rcx*8], rax
cmp edx, 4
jl 0x1801114d7
add r9d, 4
jmp 0x1801114b8
xor r11d, r11d
lea eax, [r11 + r9]
inc r11d
mov ecx, eax
mov rax, qword [rdx + rax*8]
xor qword [r10 + rcx*8], rax
cmp r11d, 8
jl 0x1801114f5
add r9d, 8
lea eax, [r9 + 8]
cmp eax, r8d
ja 0x1801114b8
jmp 0x1801114f2
mov rax, qword [rbx + r9*8]
xor qword [r10 + r9*8], rax
jmp 0x1801114cf
xor edx, edx
lea eax, [rdx + r9]
inc edx
mov ecx, eax
mov rax, qword [rbx + rax*8]
xor qword [r10 + rcx*8], rax
cmp edx, 2
jl 0x180111527
add r9d, 2
jmp 0x1801114c1
Function at 0x180117d48
Capabilities:
Hash data using sha1

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x70
mov rdi, rdx
mov rbx, rcx
test rdx, rdx
je 0x180117da5
mov rax, qword [rdx + 8]
test dword [rax + 0xa8], 0x10000000
jne 0x180117e31
mov rcx, rdx
call sym.python310.dll_PyObject_CheckBuffer
test eax, eax
je 0x1801c1b3e
xor r8d, r8d
lea rdx, [rsp + 0x20]
mov rcx, rdi
call sym.python310.dll_PyObject_GetBuffer
cmp eax, 0xffffffff
je 0x180117e44
cmp dword [rsp + 0x44], 1
jg 0x1801c1b4a
mov rcx, rbx
call sym.python310.dll_PyModule_GetState
mov rcx, rax
call fcn.180117e48
mov rbx, rax
test rax, rax
je 0x1801c1b7d
lea rcx, [rax + 0x10]
and dword [rcx + 0x1c], 0
and qword [rcx], 0
mov dword [rcx + 8], 0x67452301
mov dword [rcx + 0xc], 0xefcdab89
mov dword [rcx + 0x10], 0x98badcfe
mov dword [rcx + 0x14], 0x10325476
mov dword [rcx + 0x18], 0xc3d2e1f0
mov rax, qword [0x18044f1f0]
cmp qword [rax + 0x58], 0
jne 0x1801c1b6d
test rdi, rdi
je 0x180117e20
mov r8, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x20]
call fcn.180117f00
lea rcx, [rsp + 0x20]
call sym.python310.dll_PyBuffer_Release
mov rax, rbx
mov rbx, qword [rsp + 0x80]
add rsp, 0x70
pop rdi
ret
lea rdx, str.Strings_must_be_encoded_before_hashing
mov rcx, qword [sym.python310.dll_PyExc_TypeError]
call sym.python310.dll_PyErr_SetString
xor eax, eax
jmp 0x180117e23
lea rdx, str.object_supporting_the_buffer_API_required
jmp 0x180117e38
mov rcx, qword [sym.python310.dll_PyExc_BufferError]
lea rdx, str.Buffer_must_be_single_dimension
call sym.python310.dll_PyErr_SetString
lea rcx, [rsp + 0x20]
call sym.python310.dll_PyBuffer_Release
nop
jmp 0x180117e44
sub qword [rbx], 1
jne 0x1801c1b7d
mov rax, qword [rbx + 8]
mov rcx, rbx
call qword [rax + 0x30]
test rdi, rdi
je 0x180117e44
jmp 0x1801c1b5d