joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100007440
Capabilities:
Get common file path

Disassembly:
push rbx
sub rsp, 0x20
mov edx, 0x3c
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea rdx, [0x100003548]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrcatW]
cmp dword [0x10000e8fc], 0
je 0x10000747d
lea rdx, [0x100003540]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
mov al, 1
add rsp, 0x20
pop rbx
ret

Function at 0x100007630
Capabilities:
Get file size
Parse pe header
Read file via mapping

Disassembly:
sub rsp, 0x48
mov qword [rsp + 0x50], rbx
xor ebx, ebx
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x68], rdi
mov rdi, rdx
lea r8d, [rbx + 1]
xor r9d, r9d
mov edx, 0x80000000
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
mov rbp, rax
jne 0x10000768b
lea eax, [rbx + 1]
mov rdi, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x50]
add rsp, 0x48
ret
xor edx, edx
mov rcx, rax
mov qword [rsp + 0x40], r12
call qword [sym.imp.KERNEL32.dll_GetFileSize]
xor r9d, r9d
xor edx, edx
lea r8d, [r9 + 2]
mov rcx, rbp
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], ebx
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
test rax, rax
mov r12, rax
jne 0x1000076d1
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [r12 + 2]
jmp 0x1000077f0
xor r9d, r9d
xor r8d, r8d
mov rcx, rax
lea edx, [r9 + 4]
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
test rax, rax
mov rsi, rax
jne 0x100007710
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [rsi + 3]
jmp 0x1000077eb
movsxd rbx, dword [rax + 0x3c]
add rbx, rax
cmp word [rax], 0x5a4d
jne 0x1000077cb
mov edx, 0xe0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1000077cb
cmp dword [rbx], 0x4550
jne 0x1000077cb
movzx ebx, word [rbx + 4]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, 0x14c
je 0x1000077b7
cmp ebx, 0x200
je 0x1000077a3
cmp ebx, 0x8664
je 0x10000778f
lea rdx, [0x1000035e0]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
xor eax, eax
jmp 0x1000077eb
lea rdx, [0x1000035d8]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
xor eax, eax
jmp 0x1000077eb
lea rdx, [0x1000035c8]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
xor eax, eax
jmp 0x1000077eb
lea rdx, [0x1000035c0]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
xor eax, eax
jmp 0x1000077eb
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 4
mov rsi, qword [rsp + 0x60]
mov r12, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x50]
add rsp, 0x48
ret
Function at 0x100007810
Capabilities:
Get file size
Parse pe header

Disassembly:
sub rsp, 0x68
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rbp
xor ebp, ebp
mov qword [rsp + 0x30], rbp
lea r8d, [rbp + 1]
xor r9d, r9d
mov edx, 0xc0000000
mov dword [rsp + 0x28], ebp
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
mov rbx, rax
jne 0x10000785e
lea eax, [rbp + 1]
mov rbp, qword [rsp + 0x78]
mov rbx, qword [rsp + 0x70]
add rsp, 0x68
ret
xor edx, edx
mov rcx, rax
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x58], r13
call qword [sym.imp.KERNEL32.dll_GetFileSize]
xor r9d, r9d
lea r8d, [r9 + 4]
xor edx, edx
mov rcx, rbx
mov qword [rsp + 0x28], rbp
mov r13d, eax
mov dword [rsp + 0x20], ebp
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
test rax, rax
mov r12, rax
jne 0x1000078ac
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [r12 + 2]
jmp 0x1000079b9
xor r9d, r9d
xor r8d, r8d
mov edx, 0xf001f
mov rcx, rax
mov qword [rsp + 0x88], rdi
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
test rax, rax
mov rdi, rax
jne 0x1000078ef
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [rdi + 3]
jmp 0x1000079b1
mov qword [rsp + 0x80], rsi
movsxd rsi, dword [rax + 0x3c]
add rsi, rax
cmp word [rax], 0x5a4d
jne 0x100007989
mov edx, 0xe0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x100007989
cmp dword [rsi], 0x4550
jne 0x100007989
lea r9, [rsp + 0x40]
lea r8, [rsp + 0x44]
mov edx, r13d
mov rcx, rdi
call qword [sym.imp.imagehlp.dll_CheckSumMappedFile]
lea r9, [rsp + 0x40]
lea r8, [rsp + 0x44]
mov r11, rax
mov eax, dword [rsp + 0x40]
mov edx, r13d
mov rcx, rdi
mov dword [r11 + 0x58], eax
call qword [sym.imp.imagehlp.dll_CheckSumMappedFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [rsp + 0x40]
mov edx, 5
cmp dword [rsp + 0x44], ecx
cmovne ebp, edx
mov eax, ebp
jmp 0x1000079a9
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 4
mov rsi, qword [rsp + 0x80]
mov rdi, qword [rsp + 0x88]
mov r12, qword [rsp + 0x60]
mov r13, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x78]
mov rbx, qword [rsp + 0x70]
add rsp, 0x68
ret
Function at 0x100009870
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub rsp, 0x28
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x38], rbp
mov ebp, r8d
mov qword [rsp + 0x40], rsi
mov ebx, r8d
mov rsi, rcx
shr ebp, 4
mov qword [rsp + 0x48], rdi
mov rdi, rdx
inc ebp
mov edx, 6
mov rcx, rdi
movzx r8d, bp
call qword [sym.imp.KERNEL32.dll_FindResourceExW]
test rax, rax
je 0x1000098df
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x1000098df
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
test rax, rax
mov rdi, rax
je 0x1000098df
lea eax, [rbp - 1]
shl eax, 4
sub ebx, eax
cmp ebx, 0x10
jb 0x1000098e5
mov rax, qword [rsi + 0x10]
jmp 0x100009943
and ebx, 0xf
jbe 0x10000990b
mov edx, ebx
nop
movzx eax, word [rdi]
inc eax
cdqe
lea rcx, [rax + rax]
lea rax, [rcx + rcx*2]
prefetcht1 byte [rdi + rax*2]
add rdi, rcx
dec rdx
jne 0x1000098f0
mov rcx, qword [rsi + 0x18]
movzx ebx, word [rdi]
test rcx, rcx
je 0x10000991d
call qword [sym.imp.msvcrt.dll_free]
inc ebx
movsxd rcx, ebx
add rcx, rcx
call qword [sym.imp.msvcrt.dll_malloc]
lea rdx, [rdi + 2]
mov r8d, ebx
mov rcx, rax
mov qword [rsi + 0x18], rax
call qword [sym.imp.KERNEL32.dll_lstrcpynW]
mov rax, qword [rsi + 0x18]
mov rdi, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x30]
add rsp, 0x28
ret

Function at 0x1000099d0
Capabilities:
Read .ini file

Disassembly:
sub rsp, 0x38
cmp dword [0x10000e8e8], 0
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x48], rbp
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], rdi
mov rbp, r8
mov edi, edx
mov rsi, r9
mov rbx, rcx
je 0x100009abe
mov rcx, qword [rcx + 0x18]
test rcx, rcx
je 0x100009a0f
call qword [sym.imp.msvcrt.dll_free]
mov ecx, 0x400
call qword [sym.imp.msvcrt.dll_malloc]
test rax, rax
mov qword [rbx + 0x18], rax
je 0x100009abe
xor edx, edx
mov r8d, 0x400
mov rcx, rax
call sub.msvcrt.dll_memset
mov r9, qword [rbx + 0x18]
lea r11, [0x10000e500]
mov qword [rsp + 0x28], r11
xor r8d, r8d
mov rdx, rsi
mov rcx, rbp
mov dword [rsp + 0x20], 0x200
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
test eax, eax
je 0x100009abe
cmp eax, 5
jbe 0x100009ad8
dec eax
je 0x100009ad8
mov ecx, 2
mov r8d, eax
mov rax, qword [rbx + 0x18]
cmp word [rcx + rax - 2], 0x5c
jne 0x100009ab3
movzx edx, word [rcx + rax]
cmp dx, 0x6e
jne 0x100009a9c
mov word [rcx + rax - 2], 0x20
mov rax, qword [rbx + 0x18]
mov word [rcx + rax], 0xa
jmp 0x100009ab3
cmp dx, 0x72
jne 0x100009ab3
mov word [rcx + rax - 2], 0x20
mov rax, qword [rbx + 0x18]
mov word [rcx + rax], 0xd
add rcx, 2
dec r8
jne 0x100009a73
jmp 0x100009ad8
movzx r9d, word [0x10000e8ec]
mov rdx, qword [0x10000e8f0]
mov r8d, edi
mov rcx, rbx
call fcn.100009870
mov rax, qword [rbx + 0x18]
mov rdi, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
add rsp, 0x38
ret
Function at 0x10000a2c0
Capabilities:
Terminate process

Disassembly:
mov rax, rsp
sub rsp, 0x68
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rdi, rcx
lea rsi, [0x10000e9b0]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
mov rbx, qword [0x10000eaa8]
lea rdx, [rsp + 0x70]
mov rcx, rbx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_RtlLookupFunctionEntry]
test rax, rax
je 0x10000a341
mov rdx, qword [rsp + 0x70]
mov qword [rsp + 0x38], 0
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x30], rcx
lea rcx, [rsp + 0x48]
mov r9, rax
mov qword [rsp + 0x28], rcx
xor ecx, ecx
mov r8, rbx
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_RtlVirtualUnwind]
mov r11, qword [0x10000eaa8]
jmp 0x10000a35d
mov r11, qword [rsp + 0x68]
lea rax, [rsp + 0x68]
add rax, 8
mov qword [0x10000eaa8], r11
mov qword [0x10000ea48], rax
mov rax, qword [0x10000e360]
mov qword [0x10000e920], r11
mov qword [0x10000ea30], rdi
mov dword [0x10000e910], 0xc0000409
mov dword [0x10000e914], 1
mov qword [rsp + 0x50], rax
mov rax, qword [0x10000e358]
xor ecx, ecx
mov qword [rsp + 0x50], rax
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea rcx, [0x100003af0]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov rdi, qword [rsp + 0x88]
mov rsi, qword [rsp + 0x80]
mov rbx, qword [rsp + 0x78]
add rsp, 0x68
ret
cmp rcx, qword [0x10000e360]
jne 0x10000afb9
rol rcx, 0x10
test cx, 0xffff
jne 0x10000afb5
ret
ror rcx, 0x10
jmp 0x10000a2c0
Function at 0x10000a960
Capabilities:
Parse pe header

Disassembly:
mov rax, rsp
sub rsp, 0xc8
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rdi
lea rcx, [rax - 0x78]
call qword [sym.imp.KERNEL32.dll_GetStartupInfoW]
cmp word [0x100000000], 0x5a4d
je 0x10000a99c
xor ebx, ebx
mov dword [rsp + 0xd0], ebx
lea rdi, [0x100000000]
jmp 0x10000aa2a
movsxd rax, dword [0x10000003c]
lea rdi, [0x100000000]
add rax, rdi
cmp dword [rax], 0x4550
je 0x10000a9c0
xor ebx, ebx
mov dword [rsp + 0xd0], ebx
jmp 0x10000aa2a
movzx ecx, word [rax + 0x18]
cmp ecx, 0x10b
je 0x10000aa07
cmp ecx, 0x20b
je 0x10000a9df
xor ebx, ebx
mov dword [rsp + 0xd0], ebx
jmp 0x10000aa2a
cmp dword [rax + 0x84], 0xe
ja 0x10000a9f3
xor ebx, ebx
mov dword [rsp + 0xd0], ebx
jmp 0x10000aa2a
xor ebx, ebx
cmp dword [rax + 0xf8], ebx
setne bl
mov dword [rsp + 0xd0], ebx
jmp 0x10000aa2a
cmp dword [rax + 0x74], 0xe
ja 0x10000aa18
xor ebx, ebx
mov dword [rsp + 0xd0], ebx
jmp 0x10000aa2a
xor ebx, ebx
cmp dword [rax + 0xe8], ebx
setne bl
mov dword [rsp + 0xd0], ebx
mov ecx, 2
call qword [sym.imp.msvcrt.dll___set_app_type]
mov qword [0x10000ee98], 0xffffffffffffffff
mov qword [0x10000eea0], 0xffffffffffffffff
mov rcx, qword [sym.imp.msvcrt.dll__fmode]
mov eax, dword [0x10000ee90]
mov dword [rcx], eax
mov rcx, qword [sym.imp.msvcrt.dll__commode]
mov eax, dword [0x10000ee8c]
mov dword [rcx], eax
call fcn.10000ad40
cmp dword [0x10000e370], 0
jne 0x10000aa84
lea rcx, [fcn.10000ad40]
call qword [sym.imp.msvcrt.dll___setusermatherr]
lea rdx, [0x100001878]
lea rcx, [0x100001870]
call fcn.1000a3000
mov r11d, dword [0x10000ee88]
mov dword [rsp + 0xd8], r11d
lea rax, [rsp + 0xd8]
mov qword [rsp + 0x20], rax
mov r9d, dword [0x10000ee84]
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x3c]
call qword [sym.imp.msvcrt.dll___wgetmainargs]
lea rdx, [0x100001868]
lea rcx, [0x100001848]
call sub.msvcrt.dll__initterm
mov r8, qword [sym.imp.msvcrt.dll__wcmdln]
cmp qword [r8], 0
jne 0x10000aaf9
mov eax, 0xff
jmp 0x10000abc9
mov r8, qword [r8]
mov qword [rsp + 0x30], r8
cmp word [r8], 0x22
jne 0x10000ab40
nop
nop
add r8, 2
mov qword [rsp + 0x30], r8
movzx eax, word [r8]
test ax, ax
je 0x10000ab2a
cmp ax, 0x22
je 0x10000ab2a
jmp 0x10000ab10
cmp word [r8], 0x22
jne 0x10000ab52
add r8, 2
mov qword [rsp + 0x30], r8
jmp 0x10000ab52
cmp word [r8], 0x20
jbe 0x10000ab52
add r8, 2
mov qword [rsp + 0x30], r8
jmp 0x10000ab40
movzx eax, word [r8]
test ax, ax
je 0x10000ab6c
cmp ax, 0x20
ja 0x10000ab6c
add r8, 2
mov qword [rsp + 0x30], r8
jmp 0x10000ab52
test byte [rsp + 0x8c], 1
je 0x10000ab81
movzx r9d, word [rsp + 0x90]
jmp 0x10000ab87
mov r9d, 0xa
xor edx, edx
mov rcx, rdi
call fcn.10000af74
mov edi, eax
mov dword [rsp + 0x38], eax
test ebx, ebx
jne 0x10000aba3
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
call qword [sym.imp.msvcrt.dll__cexit]
jmp 0x10000abc7
mov eax, edi
mov rbx, qword [rsp + 0xe0]
mov rdi, qword [rsp + 0xe8]
add rsp, 0xc8
ret