joyce8/EMBER2024-capa huggingface dataset:
Function at 0x5787f0
Capabilities:
Encode data using xor

Disassembly:
push esi
push edi
mov edi, dword [esp + 0x14]
mov eax, dword [edi]
inc eax
push eax
call fcn.004a67c0
push dword [edi]
mov esi, eax
push dword [esp + 0x18]
push esi
call fcn.0059ce60
mov ecx, dword [edi]
add esp, 0x10
cmp dword [esp + 0xc], 1
mov byte [esi + ecx], 0
jne 0x57882c
xor eax, eax
cmp dword [edi], eax
jbe 0x57882c
xor byte [eax + esi], 0xf3
inc eax
cmp eax, dword [edi]
jb 0x578823
pop edi
mov eax, esi
pop esi
ret

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

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
je 0x57dcf0
push esi
push edi
push eax
call fcn.004e00f0
add esp, 4
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x57dcdc
test al, 0x10
je 0x57dcdc
mov esi, 1
jmp 0x57dcde
xor esi, esi
test edi, edi
je 0x57dceb
push edi
call fcn.004a6790
add esp, 4
pop edi
mov eax, esi
pop esi
ret
xor eax, eax
ret

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

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
je 0x57dfc0
push esi
push edi
push eax
call fcn.004e00f0
add esp, 4
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x57dfac
test al, 0x50
jne 0x57dfac
mov esi, 1
jmp 0x57dfae
xor esi, esi
test edi, edi
je 0x57dfbb
push edi
call fcn.004a6790
add esp, 4
pop edi
mov eax, esi
pop esi
ret
xor eax, eax
ret

Function at 0x57ed40
Capabilities:
Query environment variable

Disassembly:
push ebx
push ebp
push edi
push dword [esp + 0x10]
xor ebx, ebx
call fcn.00493c60
add esp, 4
mov edi, eax
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ebp, eax
test ebp, ebp
je 0x57ed90
lea eax, [ebp*2]
push esi
push eax
call fcn.004a67c0
add esp, 4
mov esi, eax
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push esi
call fcn.00493b80
push esi
mov ebx, eax
call fcn.004a6790
add esp, 8
pop esi
push edi
call fcn.004a6790
add esp, 4
mov eax, ebx
pop edi
pop ebp
pop ebx
ret
Function at 0x59c8b8
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x59c8f7
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x59c8f7
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x59c8f7
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x59c8f7
cmp dword [ecx + 0x74], 0xe
jbe 0x59c8f7
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x5a424a
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.0059c1d0
mov eax, dword [0x8a3940]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.005ab481
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x5a428c
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x5a43e8
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.0059c060
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x8a9a58]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.005ae8d7
mov ecx, dword [esi*4 + 0x8a9a58]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x5a43e1
cmp eax, dword [ecx + edi + 0x24]
jne 0x5a43e1
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5a43e1
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.005ae8d7
add esp, 0x14
test edx, edx
jl 0x5a43e1
jg 0x5a4357
test eax, eax
jb 0x5a43e1
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x5a43e1
jl 0x5a4371
cmp dword [ebp - 0x1008], eax
ja 0x5a43e1
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x5a438f
test ebx, ebx
je 0x5a43c8
cmp ecx, edi
jae 0x5a43c8
mov al, byte [ecx]
cmp al, 0xd
jne 0x5a43a9
lea eax, [edi - 1]
cmp ecx, eax
jae 0x5a43b5
cmp byte [ecx + 1], 0xa
jne 0x5a43b5
inc ecx
jmp 0x5a43b5
movzx eax, al
movsx eax, byte [eax + 0x8a3ba0]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x5a438f
cmp edx, ebx
jne 0x5a438f
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x5a43e6
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0059bb21
leave
ret

Function at 0x5a8d2a
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x79d328
push 0x79d320
push str.FlsAlloc
push 0x1f
call fcn.005a8c46
mov esi, eax
add esp, 0x10
test esi, esi
je 0x5a8d5e
push dword [ebp + 8]
mov ecx, esi
call dword [0x5d2dd8]
call esi
jmp 0x5a8d64
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4
Function at 0x5a8da8
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x79d338
push 0x79d330
push str.FlsGetValue
push 0x21
call fcn.005a8c46
mov esi, eax
add esp, 0x10
test esi, esi
je 0x5a8ddf
push dword [ebp + 8]
mov ecx, esi
call dword [0x5d2dd8]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x5a8de7
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x79d340
push 0x79d338
push str.FlsSetValue
push 0x22
call fcn.005a8c46
mov esi, eax
add esp, 0x10
test esi, esi
je 0x5a8e21
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x5d2dd8]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x5adbd5
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 + 0x8a9a58]
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 0x5adc15
cmp byte [ebx], 0xa
jne 0x5adc15
or byte [edi + eax + 0x28], 4
jmp 0x5adc1a
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 0x5add19
mov dl, byte [eax]
cmp dl, 0x1a
je 0x5adcfc
inc eax
cmp dl, 0xd
je 0x5adc46
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x5adc6c
cmp eax, ecx
jae 0x5adc7a
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 0x5adc2e
jmp 0x5add19
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 0x5adcf7
cmp dword [ebp - 0x10], 0
je 0x5adcf7
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x8a9a58]
test byte [eax + edi + 0x28], 0x48
je 0x5adcd1
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x5adcbc
mov byte [esi], dl
jmp 0x5adccd
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x8a9a58]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x5add19
cmp byte [ebp - 1], 0xa
jne 0x5adce0
cmp esi, ebx
jne 0x5adce0
mov byte [esi], 0xa
jmp 0x5add18
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.005ae8f5
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x5add19
mov byte [esi], 0xd
jmp 0x5add18
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x8a9a58]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x5add16
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x5add19
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x5add22
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 + 0x8a9a58]
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 0x5add68
cmp word [ebx], dx
jne 0x5add68
or byte [eax + edi + 0x28], 4
jmp 0x5add6d
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 0x5aded0
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 0x5adeb0
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x5addae
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x5adde4
cmp eax, edx
jae 0x5addf2
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 0x5add89
jmp 0x5aded0
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 0x5adeab
cmp dword [ebp - 0x18], 0
je 0x5adeab
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x8a9a58]
test byte [eax + edi + 0x28], 0x48
je 0x5ade81
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 0x5ade45
mov word [esi], cx
jmp 0x5ade7c
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x8a9a58]
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 + 0x8a9a58]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x8a9a58]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x5aded0
pop eax
cmp word [ebp - 4], ax
jne 0x5ade91
cmp esi, ebx
jne 0x5ade91
mov word [esi], ax
jmp 0x5adecd
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.005ae8f5
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x5aded0
push 0xd
pop eax
jmp 0x5ade8c
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x8a9a58]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x5adeca
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x5aded0
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 0x5b0e79
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x5b0f16
push ebx
push esi
call fcn.005b0e42
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.005b0dd6
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x5b0ec3
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x5b0f15
push edi
push eax
call fcn.005accc0
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x5b0ee3
call fcn.005a8af3
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x5b0f14
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.005b0dd6
add esp, 0x20
test eax, eax
jne 0x5b0f02
push edi
call fcn.005a8af3
jmp 0x5b0f0a
push ebx
call fcn.005a8af3
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret
Function at 0x5b67b5
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.005b6731
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x5b6924
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x5b6924
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x5b68d9
jg 0x5b6811
test eax, eax
je 0x5b68cf
push 1
push 0x1000
call fcn.005a8a96
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x5b6834
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x5b68c6
push 0x8000
push ebx
call fcn.005a77be
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x5b685d
jg 0x5b6858
cmp ecx, 0x1000
jb 0x5b685d
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.005ac725
add esp, 0x10
cmp eax, 0xffffffff
je 0x5b68a2
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x5b6858
jl 0x5b6889
test ecx, ecx
jne 0x5b684a
push dword [ebp - 0xc]
push ebx
call fcn.005a77be
push esi
call fcn.005a8af3
add esp, 0xc
xor ebx, ebx
jmp 0x5b6932
cmp byte [edi + 0x24], 0
je 0x5b68b9
cmp dword [edi + 0x20], 5
jne 0x5b68b9
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x5b68c4
mov ebx, dword [edi + 0x18]
jmp 0x5b68c6
xor ebx, ebx
push esi
call fcn.005a8af3
pop ecx
jmp 0x5b6932
test ecx, ecx
jg 0x5b689b
jl 0x5b68d9
test eax, eax
jae 0x5b689b
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.005ae8f5
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x5b68f9
cmp byte [edi + 0x1c], 0
je 0x5b689b
jmp 0x5b692a
push ebx
call fcn.005b12e3
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x5b689b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x5b6932
cmp byte [edi + 0x1c], 0
je 0x5b692f
mov ebx, dword [edi + 0x18]
jmp 0x5b6932
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.005ae8f5
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x5bb840
Capabilities:
Get common file path

Disassembly:
push ebp
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0
push 0
call edi
mov esi, eax
test esi, esi
je 0x5bb8b8
push ebx
mov ebx, dword [esp + 0x14]
test ebx, ebx
je 0x5bb8a3
xor ecx, ecx
cmp word [ebx], cx
je 0x5bb86d
inc ecx
cmp word [ebx + ecx*2], 0
jne 0x5bb865
lea edi, [ecx + esi]
lea esi, [edi + 1]
lea eax, [esi + esi]
push eax
call fcn.004a67c0
add esp, 4
mov ebp, eax
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push edi
push 0x79cd90
push ebp
call fcn.005bb910
push edi
push ebx
push ebp
call fcn.005bb910
add esp, 0x18
pop ebx
jmp 0x5bb8e5
lea eax, [esi + esi]
push eax
call fcn.004a67c0
add esp, 4
mov ebp, eax
push esi
push ebp
call edi
pop ebx
jmp 0x5bb8e5
mov edi, dword [esp + 0x10]
xor esi, esi
cmp word [edi], si
je 0x5bb8cb
inc esi
cmp word [edi + esi*2], 0
jne 0x5bb8c3
lea esi, [esi*2 + 2]
push esi
call fcn.004a67c0
push esi
mov ebp, eax
push edi
push ebp
call fcn.0059ce60
add esp, 0x10
push 8
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
push ebp
mov esi, eax
call fcn.004a6790
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
ret
Function at 0x5c2bb0
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
push ebp
mov ebp, dword [esp + 8]
push esi
mov esi, dword [esp + 0x10]
mov dword [esi], 0x12345678
mov dword [esi + 4], 0x23456789
mov dword [esi + 8], 0x34567890
mov cl, byte [ebp]
test cl, cl
je 0x5c2c30
push ebx
push edi
mov ebx, 0x12345678
mov edi, 0x23456789
mov eax, 0x34567890
movsx ecx, cl
lea ebp, [ebp + 1]
xor ecx, ebx
mov edx, ebx
mov ebx, dword [esp + 0x1c]
movzx ecx, cl
shr edx, 8
mov ebx, dword [ebx + ecx*4]
xor ebx, edx
mov edx, dword [esp + 0x1c]
movzx ecx, bl
add ecx, edi
mov dword [esi], ebx
imul edi, ecx, 0x8088405
inc edi
mov ecx, edi
mov dword [esi + 4], edi
shr ecx, 0x18
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [edx + ecx*4]
mov dword [esi + 8], eax
mov cl, byte [ebp]
test cl, cl
jne 0x5c2be6
pop edi
pop ebx
pop esi
pop ebp
ret

Function at 0x5c2c40
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
xor ebx, ebx
push edi
cmp dword [esi + 0x100ac], ebx
je 0x5c2ced
cmp dword [esi + 0x7c], ebx
jbe 0x5c2ced
push ebp
mov ebp, 0xffffff5c
lea ebx, [esi + 0xa4]
sub ebp, esi
nop dword [eax]
movzx eax, byte [ebx]
lea ebx, [ebx + 1]
mov ecx, dword [esi + 0x100d0]
xor eax, ecx
mov edx, dword [esi + 0x100dc]
movzx eax, al
mov edi, dword [esi + 0x100d8]
shr ecx, 8
and edi, 0xfffd
or edi, 2
mov eax, dword [edx + eax*4]
xor eax, ecx
mov ecx, dword [esi + 0x100d8]
mov dword [esi + 0x100d0], eax
movzx eax, al
add eax, dword [esi + 0x100d4]
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 0x100d4], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [edx + eax*4]
mov eax, edi
xor eax, 1
mov dword [esi + 0x100d8], ecx
imul eax, edi
shr eax, 8
xor byte [ebx - 1], al
lea eax, [ebx + ebp]
cmp eax, dword [esi + 0x7c]
jb 0x5c2c70
xor ebx, ebx
pop ebp
mov edi, dword [esi + 0x7c]
lea eax, [esi + 0xa4]
push edi
push eax
push dword [esi + 0x2c]
mov eax, dword [esi + 8]
push dword [esi + 0x1c]
call eax
add esp, 0x10
mov dword [esi + 0x7c], 0
or ecx, 0xffffffff
cmp eax, edi
cmovne ebx, ecx
add dword [esi + 0x100c0], edi
mov ecx, dword [esi + 0x48]
mov eax, ebx
adc dword [esi + 0x100c4], 0
add dword [esi + 0x100c8], ecx
pop edi
adc dword [esi + 0x100cc], 0
mov dword [esi + 0x48], 0
pop esi
pop ebx
ret
Function at 0x5c7170
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x104
mov eax, dword [0x8a3940]
xor eax, esp
mov dword [esp + 0x100], eax
lea eax, [esp]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardState]
test eax, eax
je 0x5c72c7
movzx ecx, byte [esp + 0x10]
shr ecx, 7
movzx eax, byte [esp + 0x11]
mov edx, ecx
or edx, 2
and al, 0x80
movzx eax, byte [esp + 0x12]
cmove edx, ecx
mov ecx, edx
or ecx, 4
and al, 0x80
movzx eax, byte [esp + 0x5b]
cmove ecx, edx
mov edx, ecx
or edx, 0x4000
and al, 0x80
movzx eax, byte [esp + 0x5c]
cmove edx, ecx
mov ecx, edx
or ecx, 0x8000
and al, 0x80
movzx eax, byte [esp + 0x5d]
cmove ecx, edx
mov edx, ecx
or edx, 0x10000
and al, 0x80
movzx eax, byte [esp + 0x91]
cmove edx, ecx
mov ecx, edx
or ecx, 0x10
and al, 1
movzx eax, byte [esp + 0x90]
cmove ecx, edx
mov edx, ecx
or edx, 0x20
and al, 1
movzx eax, byte [esp + 0x14]
cmove edx, ecx
mov ecx, edx
or ecx, 0x40
and al, 1
movzx eax, byte [esp + 0x2d]
cmove ecx, edx
mov edx, ecx
or edx, 0x80
and al, 1
movzx eax, byte [esp + 0xa0]
cmove edx, ecx
mov ecx, edx
or ecx, 0x100
and al, 0x80
movzx eax, byte [esp + 0xa1]
cmove ecx, edx
mov edx, ecx
or edx, 0x200
and al, 0x80
movzx eax, byte [esp + 0xa2]
cmove edx, ecx
mov ecx, edx
or ecx, 0x400
and al, 0x80
movzx eax, byte [esp + 0xa3]
cmove ecx, edx
mov edx, ecx
or edx, 0x800
and al, 0x80
movzx eax, byte [esp + 0xa4]
cmove edx, ecx
mov ecx, edx
or ecx, 0x1000
and al, 0x80
cmove ecx, edx
test byte [esp + 0xa5], 0x80
je 0x5c72b0
or ecx, 0x2000
mov eax, ecx
mov ecx, dword [esp + 0x100]
xor ecx, esp
call fcn.0059bb21
add esp, 0x104
ret
mov ecx, dword [esp + 0x100]
xor eax, eax
xor ecx, esp
call fcn.0059bb21
add esp, 0x104
ret

Function at 0x5c72e0
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x108
mov eax, dword [0x8a3940]
xor eax, esp
mov dword [esp + 0x104], eax
lea eax, [esp + 4]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardState]
test eax, eax
je 0x5c73e1
mov ecx, dword [esp + 0x10c]
mov al, cl
shl al, 7
mov edx, ecx
mov byte [esp + 0x14], al
mov al, cl
and al, 0xfe
shr edx, 5
shl al, 6
mov byte [esp + 0x15], al
mov al, cl
and al, 0xfc
shl al, 5
mov byte [esp + 0x16], al
push ebx
mov ebx, ecx
shr ebx, 7
mov al, bl
and bl, 1
and al, 0x80
mov byte [esp + 0x35], bl
mov byte [esp + 0x63], al
mov eax, ecx
shr eax, 8
and al, 0x80
mov ebx, dword [esp + 0x110]
mov byte [esp + 0x64], al
mov eax, ecx
shr eax, 9
and al, 0x80
mov byte [esp + 0x65], al
mov eax, ecx
shr eax, 4
mov dword [esp + 4], eax
and al, 1
mov byte [esp + 0x99], al
mov al, dl
and al, 1
shr ecx, 6
mov byte [esp + 0x98], al
and dl, 0x80
mov al, cl
mov byte [esp + 0xac], dl
and al, 1
and cl, 0x80
mov byte [esp + 0x1c], al
mov eax, ebx
shr eax, 1
and al, 0x80
mov byte [esp + 0xad], cl
mov byte [esp + 0xa8], al
mov eax, ebx
shr eax, 2
and al, 0x80
shr ebx, 3
mov byte [esp + 0xa9], al
and bl, 0x80
mov eax, dword [esp + 4]
and al, 0x80
mov byte [esp + 0xaa], bl
mov byte [esp + 0xab], al
lea eax, [esp + 8]
push eax
call dword [sym.imp.USER32.dll_SetKeyboardState]
pop ebx
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.0059bb21
add esp, 0x108
ret
Function at 0x5c74b0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov edx, dword [esp + 8]
push esi
mov esi, dword [esp + 0x10]
test edx, edx
jne 0x5c74c1
xor eax, eax
pop esi
ret
mov eax, dword [esp + 8]
not eax
cmp esi, 8
jb 0x5c757d
push edi
mov edi, esi
shr edi, 3
movzx ecx, byte [edx]
sub esi, 8
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x7aa740]
movzx ecx, byte [edx + 1]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x7aa740]
movzx ecx, byte [edx + 2]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x7aa740]
movzx ecx, byte [edx + 3]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x7aa740]
movzx ecx, byte [edx + 4]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x7aa740]
movzx ecx, byte [edx + 5]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x7aa740]
movzx ecx, byte [edx + 6]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x7aa740]
movzx ecx, byte [edx + 7]
add edx, 8
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x7aa740]
sub edi, 1
jne 0x5c74d6
pop edi
test esi, esi
je 0x5c759b
movzx ecx, byte [edx]
lea edx, [edx + 1]
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x7aa740]
sub esi, 1
jne 0x5c7581
not eax
pop esi
ret
Function at 0x5cdd90
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x5cddbd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x5cddbd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x40df99
Capabilities:
Hash data with crc32

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
and dword [ebp - 8], 0
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, dword [ebp - 8]
movzx eax, byte [eax]
test eax, eax
je 0x40e00a
mov eax, dword [ebp + 8]
add eax, dword [ebp - 8]
movzx eax, byte [eax]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 4]
xor eax, dword [ebp - 0x10]
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], 7
jmp 0x40dfdb
mov eax, dword [ebp - 0xc]
dec eax
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jl 0x40e001
mov eax, dword [ebp - 4]
and eax, 1
neg eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
shr eax, 1
mov ecx, dword [ebp - 0x14]
and ecx, 0xedb88320
xor eax, ecx
mov dword [ebp - 4], eax
jmp 0x40dfd4
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
jmp 0x40dfa9
mov eax, dword [ebp - 4]
not eax
mov esp, ebp
pop ebp
ret