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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
lea rsi, str.NUITKA_ONEFILE_BINARY
mov ebx, ecx
mov rcx, rsi
call fcn.1403a3c70
test rax, rax
je 0x1403bcbe0
mov rcx, rax
mov rdx, 0xffffffffffffffff
lea r14, [rsp + 0x40]
call qword [sym.imp.python38.dll_PyUnicode_FromWideChar]
xor ecx, ecx
mov r15, r14
lea r12, [rsi + 0x28]
mov word [rsp + 0x40], cx
mov r13, rax
lea rbp, [rsp + 0x3a]
mov eax, 0x4e
lea rdi, [rsp + 0x3c]
nop word [rax + rax]
mov rbx, r12
mov r8d, 2
mov rdx, rbp
mov rcx, rdi
sub rbx, rsi
mov byte [rsp + 0x3a], al
mov byte [rsp + 0x3b], 0
call sub.msvcrt.dll_mbstowcs
cmp rax, 1
jne 0x1404161be
cmp word [r15], 0
movzx edx, word [rsp + 0x3c]
mov rax, r15
je 0x1403bcb36
nop dword [rax]
add rax, 2
sub rbx, 1
cmp word [rax], 0
jne 0x1403bcb28
test rbx, rbx
je 0x1404161be
mov word [rax], dx
add rsi, 1
xor edx, edx
add r15, 2
mov word [rax + 2], dx
movzx eax, byte [rsi]
test al, al
jne 0x1403bcae8
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rax, qword [sym.imp.python38.dll__PyRuntime]
mov rdx, qword [0x14045fb80]
mov rsi, qword [rax + 0x510]
mov rax, qword [0x14042f0c0]
mov rbx, qword [rax + 0x1c0]
test rdx, rdx
je 0x1403bcc30
mov r8, rbx
mov rcx, rsi
call fcn.1403a7a70
mov r8, r13
mov rcx, rsi
mov rbx, rax
mov rdx, rax
call fcn.1403b79f0
sub qword [rbx], 1
jne 0x1403bcbc4
mov rdx, qword [rbx + 8]
mov qword [rsp + 0x28], rax
mov rcx, rbx
call qword [rdx + 0x30]
mov rax, qword [rsp + 0x28]
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [0x14045f228]
lea rsi, [0x14045f228]
test bl, bl
je 0x1403bcc00
mov rax, qword [0x14045f230]
lea rsi, [0x14045f230]
test rax, rax
jne 0x1403bcbc4
cmp byte [0x14045f442], 0
je 0x1403bcc5d
mov rdx, 0xffffffffffffffff
lea rcx, [0x14045f240]
call qword [sym.imp.python38.dll_PyUnicode_FromWideChar]
mov qword [rsi], rax
test rax, rax
je 0x1403bcc67
add qword [rax], 1
jmp 0x1403bcbc4
mov rdx, qword [0x14045faf8]
mov rdi, qword [rax + 0x1b0]
test rdx, rdx
je 0x1403bcc72
mov r8, rdi
mov rcx, rsi
call fcn.1403a7a70
mov qword [0x14045fb80], rax
mov rdx, rax
jmp 0x1403bcb8e
movzx ecx, bl
call fcn.1403a48e0
jmp 0x1403bcc0e
call qword [sym.imp.python38.dll_PyErr_Print]
call sub.msvcrt.dll_abort
lea rcx, [0x14042737e]
call qword [sym.imp.python38.dll_PyImport_ImportModule]
mov qword [0x14045faf8], rax
mov rdx, rax
test rax, rax
je 0x1404161be
jmp 0x1403bcc43
Function at 0x1403fb7c0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp byte [0x14045f211], 0
mov rbp, rcx
mov rdi, rdx
mov r12, r8
je 0x1403fb868
lea rdx, [0x14042af72]
mov rcx, r12
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1403fb8d0
mov rbx, qword [0x14045f0b8]
jmp 0x1403fb80d
lea rbx, [rdx + rax + 4]
mov rdx, rbx
mov rcx, r12
call sub.msvcrt.dll_strcmp
mov rcx, rbx
mov esi, eax
call sub.msvcrt.dll_strlen
lea rdx, [rbx + rax + 1]
mov eax, dword [rdx]
test esi, esi
jne 0x1403fb808
movzx eax, word [rdx + 4]
lea r8, [rdx + 6]
test ax, ax
je 0x1403fb857
lea rbx, [rdi + rax*8]
nop
mov rdx, rdi
mov rcx, rbp
add rdi, 8
call fcn.1403eab60
mov r8, rax
cmp rdi, rbx
jne 0x1403fb840
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov r8d, 0xa
xor ecx, ecx
mov edx, 3
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]
xor ecx, ecx
lea rdx, [rax + 4]
mov qword [0x14045f0b8], rax
mov ebx, dword [rax]
mov qword [0x14045f0b8], rdx
mov r8d, dword [rax + 4]
lea rdx, [rax + 8]
mov qword [0x14045f0b8], rdx
call fcn.1403fa8f0
cmp eax, ebx
jne 0x1403fb96a
mov byte [0x14045f211], 1
jmp 0x1403fb7e2
cmp byte [0x14045f210], 0
jne 0x1403fb7f9
mov rbx, qword [sym.imp.python38.dll_PyDict_New]
lea rsi, [0x14045e8a8]
call rbx
mov qword [0x14045fd88], rax
call rbx
mov qword [0x14045fd80], rax
call rbx
mov qword [0x14045fd78], rax
call rbx
mov qword [0x14045fd70], rax
call rbx
mov qword [0x14045fd68], rax
call rbx
mov qword [0x14045fd60], rax
call rbx
mov qword [0x14045fd58], rax
call rbx
mov r13, qword [sym.imp.python38.dll_PyLong_FromLong]
mov rbx, 0xfffffffffffffffb
mov qword [0x14045fd50], rax
nop dword [rax]
mov ecx, ebx
call r13
mov qword [rsi + rbx*8], rax
add rbx, 1
cmp rbx, 0x101
jne 0x1403fb948
mov byte [0x14045f210], 1
jmp 0x1403fb7f9
lea rcx, str.Error__corrupted_constants_object
call sub.msvcrt.dll_puts
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x140403f50
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.140415640
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.140415640
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
Function at 0x140404c22
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x1404601e8]
test eax, eax
je 0x140404cba
lea rax, [0x1404601c0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x1404601f0]
mov qword [rbp - 8], rax
jmp 0x140404c9e
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 0x140404c92
cmp qword [rbp - 0x10], 0
je 0x140404c92
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 0x140404c58
lea rax, [0x1404601c0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x140404cbb
nop
add rsp, 0x30
pop rbp
ret

Function at 0x140404dc0
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 0x140404de8
mov eax, 0
jmp 0x140404e36
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 0x140404e11
mov eax, 0
jmp 0x140404e36
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 0x140404e31
mov eax, 0
jmp 0x140404e36
mov eax, 1
add rsp, 0x20
pop rbp
ret

Function at 0x140404e3c
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 0x140404eba
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x140404eb1
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 0x140404eb1
mov rax, qword [rbp - 8]
jmp 0x140404ecf
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 0x140404e84
mov eax, 0
add rsp, 0x20
pop rbp
ret