joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100c61c6
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x100dd0e8]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x100c6206
cmp byte [ebx], 0xa
jne 0x100c6206
or byte [edi + eax + 0x28], 4
jmp 0x100c620b
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x100c630a
mov dl, byte [eax]
cmp dl, 0x1a
je 0x100c62ed
inc eax
cmp dl, 0xd
je 0x100c6237
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x100c625d
cmp eax, ecx
jae 0x100c626b
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x100c621f
jmp 0x100c630a
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100c62e8
cmp dword [ebp - 0x10], 0
je 0x100c62e8
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x100dd0e8]
test byte [eax + edi + 0x28], 0x48
je 0x100c62c2
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x100c62ad
mov byte [esi], dl
jmp 0x100c62be
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x100dd0e8]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x100c630a
cmp byte [ebp - 1], 0xa
jne 0x100c62d1
cmp esi, ebx
jne 0x100c62d1
mov byte [esi], 0xa
jmp 0x100c6309
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.100c54f6
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x100c630a
mov byte [esi], 0xd
jmp 0x100c6309
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x100dd0e8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x100c6307
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x100c630a
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x100c6313
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x100dd0e8]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x100c6359
cmp word [ebx], dx
jne 0x100c6359
or byte [eax + edi + 0x28], 4
jmp 0x100c635e
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x100c64c1
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x100c64a1
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x100c639f
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x100c63d5
cmp eax, edx
jae 0x100c63e3
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x100c637a
jmp 0x100c64c1
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100c649c
cmp dword [ebp - 0x18], 0
je 0x100c649c
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x100dd0e8]
test byte [eax + edi + 0x28], 0x48
je 0x100c6472
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x100c6436
mov word [esi], cx
jmp 0x100c646d
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x100dd0e8]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x100dd0e8]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x100dd0e8]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x100c64c1
pop eax
cmp word [ebp - 4], ax
jne 0x100c6482
cmp esi, ebx
jne 0x100c6482
mov word [esi], ax
jmp 0x100c64be
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.100c54f6
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x100c64c1
push 0xd
pop eax
jmp 0x100c647d
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x100dd0e8]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x100c64bb
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x100c64c1
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret

Function at 0x100c9384
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.100c940c
Function at 0x407e15
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x42e180]
jne 0x407e1f
repz ret
jmp fcn.0040bc0c

Function at 0x409be9
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
pushal
call 0x409bf8
pop dword [ebp - 0x48]
mov eax, 0x34da4e2c
sub eax, 0x3499b234
sub dword [ebp - 0x48], eax
mov dword [ebp - 0x58], 0x2e3de46e
sub dword [ebp - 0x58], 0xdfeb9f23
mov dword [ebp - 0x54], 0xc3d27cab
sub dword [ebp - 0x54], 0x919f3066
mov dword [ebp - 0x50], 0x53a456
sub dword [ebp - 0x50], 0xb4076028
mov dword [ebp - 0x4c], 0x764ec1d4
add dword [ebp - 0x4c], 0x89b13e2c
lea eax, [ebp - 0x58]
push eax
mov eax, sym.imp.kernel32.dll_GetModuleHandleA
add eax, dword [ebp - 0x48]
call dword [eax]
mov dword [ebp - 0x58], 0x32393e22
add dword [ebp - 0x58], 0x42392b34
mov dword [ebp - 0x54], 0x236b462a
sub dword [ebp - 0x54], 0xe1fee4b5
mov dword [ebp - 0x50], 0x9e56a9ae
sub dword [ebp - 0x50], 0x3ae73d42
mov dword [ebp - 0x4c], 0xbd7769d9
add dword [ebp - 0x4c], 0x42889627
lea ebx, [ebp - 0x58]
push ebx
push eax
mov eax, 0xf2e0436f
sub eax, 0xf29e124b
add eax, dword [ebp - 0x48]
call dword [eax]
push 0x40
push 0x1000
push 0x403bf
push 0
call eax
mov ecx, 0xa59a35a
add ecx, 0xf5a6ae4c
mov ebx, eax
mov edi, 0x5f45bef9
sub edi, 0x5f027af9
add edi, dword [ebp - 0x48]
mov edx, 0x80a71bbe
xor dword [ebp - 0x24], 0x759772e5
mov esi, dword [edi]
mov dword [ebp - 0x24], 0x7f5454c9
add esi, edx
add dword [ebp - 0x28], 0xefd37e41
mov dword [ebx], esi
add ebx, 0xc1c0ce0
add ebx, 0xf3e3f324
add edi, 0xbaf1b760
add edi, 0x450e48a4
loop 0x409d0f
add eax, 0xa6b390c2
add eax, 0x594da8a9
mov ebx, eax
add eax, 5
mov ecx, 0x400000
add ecx, dword [ebp - 0x48]
call ebx
leave
ret
Function at 0x100025e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov esi, dword [ebp + 8]
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_strlen]
mov ebx, eax
xor eax, eax
test ebx, ebx
je 0x10002638
cmp byte [esi + ebx - 1], 0xa
je 0x1000260c
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
xchg dword [0x10007084], eax
mov dword [esp], 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_fwrite]
add esp, 0x10
pop ebx
pop esi
pop ebp
ret
Function at 0x10002c60
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xe0
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [esp], eax
call sym.___wine_dbg_get_channel_flags
movzx eax, al
bt eax, esi
jae 0x10002e38
mov edi, dword [0x10007084]
xor eax, eax
mov edx, dword fs:[0x18]
cmp dword [edx + 0x24], edi
je 0x10002d47
test byte [0x10003030], 8
jne 0x10002de0
lea ebx, [ebp - 0xd4]
mov edi, ebx
test byte [0x10003040], 8
jne 0x10002da0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
mov dword [esp + 4], str._04x:
mov dword [esp], edi
mov dword [esp + 8], eax
call sym._sprintf
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x10002ce9
cmp esi, 3
jbe 0x10002d58
mov dword [esp], 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
mov ecx, ebx
mov edi, eax
mov esi, dword [ecx]
add ecx, 4
lea edx, [esi - 0x1010101]
not esi
and edx, esi
and edx, 0x80808080
je 0x10002cfa
mov esi, edx
mov dword [esp + 0xc], edi
shr esi, 0x10
test edx, 0x8080
mov dword [esp + 4], 1
cmove edx, esi
lea esi, [ecx + 2]
mov dword [esp], ebx
cmove ecx, esi
mov eax, edx
add al, dl
sbb ecx, 3
sub ecx, ebx
mov dword [esp + 8], ecx
call dword [sym.imp.ucrtbase.dll_fwrite]
add esp, 0xe0
pop ebx
pop esi
pop edi
pop ebp
ret
add eax, edi
mov edi, dword [ebp + 0x10]
mov dword [esp + 8], str._s:_s:_s
mov dword [esp], eax
mov dword [esp + 0x14], edi
mov edi, dword [ebp + 0xc]
lea edx, [edi + 1]
mov dword [esp + 0x10], edx
mov edx, dword [esi*4 + 0x10005400]
mov dword [esp + 0xc], edx
mov edx, ebx
sub edx, eax
add edx, 0xc8
mov dword [esp + 4], edx
call sym._snprintf.constprop.0
jmp 0x10002ce9
mov dword [esp], 0x10003040
call sym.___wine_dbg_get_channel_flags
test al, 8
je 0x10002cc0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x20]
mov dword [esp], edi
mov dword [esp + 4], str._04x:
mov dword [esp + 8], eax
call sym._sprintf
add edi, eax
jmp 0x10002cc0
mov dword [esp], 0x10003030
call sym.___wine_dbg_get_channel_flags
test al, 8
je 0x10002cab
call dword [sym.imp.kernel32.dll_GetTickCount]
mov edx, 0x10624dd3
lea ebx, [ebp - 0xd4]
mov dword [esp + 4], str._3u._03u:
mov ecx, eax
mul edx
mov dword [esp], ebx
shr edx, 6
imul eax, edx, 0x3e8
mov dword [esp + 8], edx
sub ecx, eax
mov dword [esp + 0xc], ecx
call sym._sprintf
lea edi, [ebx + eax]
jmp 0x10002cb3
mov eax, 0xffffffff
jmp 0x10002d47
Function at 0x409961
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00409621

Function at 0x40bb7e
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0040b9fd