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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x61d110]
xor eax, dword [ebp + 4]
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
mov dword [ebp - 4], eax
je 0x5f0a7e
push ebx
call fcn.005f09cc
test eax, eax
pop ecx
jne 0x5f0a50
call fcn.005dc5be
mov dword [eax], 0xf
call fcn.005dc5b5
mov dword [eax], 0xd
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop ebx
call fcn.005df800
leave
ret
and byte [ebp + 0xb], 0
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10c]
push eax
push 0x104
lea eax, [ebp + 8]
add bl, 0x40
push eax
mov byte [ebp + 8], bl
mov byte [ebp + 9], 0x3a
mov byte [ebp + 0xa], 0x2e
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x5f0a90
lea eax, [ebp - 0x10c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x5f0a40
inc eax
cmp eax, 0x104
ja 0x5f0a40
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x5f0ac8
cmp eax, dword [ebp + 0x10]
jg 0x5f0aab
mov eax, dword [ebp + 0x10]
push eax
call fcn.005d9f91
pop ecx
mov ecx, eax
test ecx, ecx
jne 0x5f0add
call fcn.005dc5b5
mov dword [eax], 0xc
jmp 0x5f0a40
cmp eax, dword [ebp + 0x10]
jle 0x5f0add
call fcn.005dc5b5
mov dword [eax], 0x22
jmp 0x5f0a40
lea eax, [ebp - 0x10c]
push eax
push ecx
call fcn.005e0520
pop ecx
pop ecx
jmp 0x5f0a42

Function at 0x5f117c
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x6b21ac], ebx
push esi
push edi
jne 0x5f11fc
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x5f1237
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x612860
push edi
call esi
test eax, eax
mov dword [0x6b21ac], eax
je 0x5f1237
push 0x612850
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x6b21b0], eax
call esi
cmp dword [0x6b1d08], 2
mov dword [0x6b21b4], eax
jne 0x5f11fc
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x6b21bc], eax
je 0x5f11fc
push 0x612808
push edi
call esi
mov dword [0x6b21b8], eax
mov eax, dword [0x6b21b8]
test eax, eax
je 0x5f1241
call eax
test eax, eax
je 0x5f1228
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x6b21bc]
test eax, eax
je 0x5f1228
test byte [ebp - 8], 1
jne 0x5f1241
cmp dword [0x6b1d14], 4
jb 0x5f123b
or byte [ebp + 0x12], 0x20
jmp 0x5f1260
xor eax, eax
jmp 0x5f1270
or byte [ebp + 0x12], 4
jmp 0x5f1260
mov eax, dword [0x6b21b0]
test eax, eax
je 0x5f1260
call eax
mov ebx, eax
test ebx, ebx
je 0x5f1260
mov eax, dword [0x6b21b4]
test eax, eax
je 0x5f1260
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x6b21ac]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x5f1c0c
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.005d9990
mov eax, dword [0x61d110]
xor eax, dword [ebp + 4]
push ebx
push esi
push 1
xor esi, esi
push esi
push dword [ebp + 8]
mov dword [ebp - 4], eax
call fcn.005e5c12
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x5f1d36
push 2
push esi
push dword [ebp + 8]
call fcn.005e5c12
add esp, 0xc
cmp eax, ebx
je 0x5f1d36
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x5f1cd9
mov ebx, 0x1000
push ebx
lea eax, [ebp - 0x100c]
push esi
push eax
call fcn.005dfec0
push 0x8000
push dword [ebp + 8]
call fcn.005f20b1
add esp, 0x14
mov dword [ebp - 0xc], eax
cmp edi, ebx
mov eax, ebx
jge 0x5f1c92
mov eax, edi
push eax
lea eax, [ebp - 0x100c]
push eax
push dword [ebp + 8]
call fcn.005e5fca
add esp, 0xc
cmp eax, 0xffffffff
je 0x5f1cb2
sub edi, eax
test edi, edi
jg 0x5f1c8a
jmp 0x5f1cca
call fcn.005dc5be
cmp dword [eax], 5
jne 0x5f1cc7
call fcn.005dc5b5
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.005f20b1
pop ecx
pop ecx
jmp 0x5f1d21
jge 0x5f1d21
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.005e5c12
push dword [ebp + 8]
call fcn.005db912
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, ebx
jne 0x5f1d21
call fcn.005dc5b5
mov dword [eax], 0xd
call fcn.005dc5be
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.005e5c12
add esp, 0xc
mov eax, esi
pop edi
jmp 0x5f1d38
mov eax, ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop esi
pop ebx
call fcn.005df800
leave
ret

Function at 0x5f296a
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x5f298a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.005dc5c7
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x5f29ad
test byte [esp + 8], 2
je 0x5f29ad
call fcn.005dc5b5
mov dword [eax], 0xd
call fcn.005dc5be
mov dword [eax], 5
jmp 0x5f2986
xor eax, eax
ret