joyce8/EMBER2024-capa huggingface dataset:
Function at 0x52e040
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x63cefd
mov eax, dword fs:[0]
push eax
sub esp, 0x240
mov eax, dword [0x6d1554]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
push 0x208
lea eax, [ebp - 0x218]
mov dword [ebp - 0x24c], 0
push 0
push eax
call fcn.005c7920
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push 0x400000
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
mov edi, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x218]
push eax
call edi
mov esi, dword [ebp + 8]
test esi, esi
je 0x52e0ce
nop dword [eax]
lea eax, [ebp - 0x218]
push eax
call edi
sub esi, 1
jne 0x52e0c0
xor eax, eax
mov dword [ebp - 0x220], 0
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x52e0f4
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x230]
call fcn.00483a10
xor eax, eax
mov dword [ebp - 4], 1
mov word [ebp - 0x248], ax
lea ecx, [ebp - 0x248]
mov eax, dword [ebp - 0x220]
add eax, 0x10
mov dword [ebp - 0x238], 0
push eax
mov dword [ebp - 0x234], 7
mov dword [ebp - 0x24c], 1
call fcn.00491d50
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
push dword [ebp - 0x220]
cmovae eax, dword [ebp - 0x230]
lea ecx, [ebp - 0x248]
push eax
call fcn.004837a0
push 0x10
push 0x664088
lea ecx, [ebp - 0x248]
call fcn.004837a0
cmp dword [ebp - 0x234], 8
lea eax, [ebp - 0x248]
cmovae eax, dword [ebp - 0x248]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov edx, dword [ebp - 0x234]
mov esi, eax
mov byte [ebp - 4], 0
cmp edx, 8
jb 0x52e1f2
mov ecx, dword [ebp - 0x248]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x52e1e8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x52e290
push edx
push ecx
call fcn.0054cd75
add esp, 8
lea eax, [ebp - 0x218]
test esi, esi
je 0x52e203
push str.ProductInfo.dat
jmp 0x52e208
push str.utilsProductInfo.dat
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
cmp dword [ebp - 0x21c], 8
lea ecx, [ebp - 0x218]
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
push ecx
push eax
mov ecx, ebx
call fcn.0052e2a0
mov edx, dword [ebp - 0x21c]
mov bl, al
cmp edx, 8
jb 0x52e270
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x52e266
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x52e295
push edx
push ecx
call fcn.0054cd75
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0054d193
mov esp, ebp
pop ebp
ret 4
call fcn.005d1f0f
call fcn.005d1f0f
int3
Function at 0x539d10
Capabilities:
Check if file exists
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x63eb90
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x6d1554]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, dword [ebp + 8]
test edi, edi
je 0x539e59
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x539e59
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x539e59
push edi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x539e59
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 5
push SysReAllocStringLen
push edi
mov dword [ebp - 0x14], ebx
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov edi, eax
mov dword [ebp - 0x18], edi
cmp edi, 0xffffffff
je 0x539e45
lea eax, [ebp - 0x20]
xorps xmm0, xmm0
push eax
push edi
movq qword [ebp - 0x20], xmm0
call dword [sym.imp.KERNEL32.DLL_GetFileSizeEx]
test eax, eax
je 0x539e3e
cmp dword [ebp - 0x1c], ebx
jne 0x539e3e
mov ecx, dword [esi + 0x10]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 4], ebx
cmp eax, ecx
ja 0x539ddd
mov dword [esi + 0x10], eax
mov ecx, esi
cmp dword [esi + 0x14], 0x10
jb 0x539dd7
mov ecx, dword [esi]
mov byte [ecx + eax], 0
jmp 0x539de9
sub eax, ecx
mov ecx, esi
push 0
push eax
call fcn.004834e0
push 0
lea eax, [ebp + 8]
mov dword [ebp + 8], 0
push eax
push dword [ebp - 0x20]
mov ecx, esi
push 0
call fcn.0050150b
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp + 8]
jne 0x539e3e
push edi
mov ebx, 1
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x54bcd0
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6407b0
mov eax, dword fs:[0]
push eax
sub esp, 8
push esi
push edi
mov eax, dword [0x6d1554]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x14]
push eax
call fcn.0054c3f0
push 0
push dword [ebp + 0x10]
mov dword [ebp - 4], 0
push dword [eax]
lea eax, [ebp - 0x10]
push eax
call fcn.0054c600
add esp, 0x18
mov edx, dword [ebp - 0x14]
or esi, 0xffffffff
mov byte [ebp - 4], 2
add edx, 0xfffffff0
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x54bd3e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp + 0x14], 0
je 0x54bd6f
push 0
push dword [ebp - 0x10]
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push dword [ebp - 0x10]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x54bd6f
mov edi, dword [ebp + 8]
mov ecx, edi
push 0x65503c
call fcn.0047cc90
jmp 0x54bd7d
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
mov ecx, edi
call fcn.0051c520
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lock xadd dword [eax + 0xc], esi
dec esi
test esi, esi
jg 0x54bd9c
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x54c600
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6409c0
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x6d1554]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x54c719
cmp dword [ebp + 0x10], 0
je 0x54c719
call fcn.0047fb20
mov ecx, eax
test ecx, ecx
je 0x54c769
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp + 0xc], esi
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x105
or eax, ecx
mov dword [ebp - 4], 1
jge 0x54c67e
push 0x105
lea ecx, [ebp + 0xc]
call fcn.00481860
mov esi, dword [ebp + 0xc]
push dword [ebp + 0x10]
push edi
push esi
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push dword [esi - 8]
push esi
call fcn.005d3037
add esp, 8
test eax, eax
js 0x54c773
cmp eax, dword [esi - 8]
jg 0x54c773
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
cmp dword [ebp + 0x14], ecx
je 0x54c709
push ecx
push esi
push ecx
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x54c709
mov edi, dword [ebp + 8]
mov ecx, edi
push 0x65503c
call fcn.0047cc90
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x54c6f6
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 8]
lea eax, [ebp + 0xc]
push eax
mov ecx, edi
call fcn.0051c520
jmp 0x54c6d7
call fcn.0047fb20
mov ecx, eax
test ecx, ecx
je 0x54c77d
mov eax, dword [ecx]
call dword [eax + 0xc]
mov esi, dword [ebp + 8]
add eax, 0x10
mov dword [esi], eax
push 0x65503c
mov ecx, esi
mov dword [ebp - 4], 0
call fcn.0047d4d0
test al, al
jne 0x54c756
push 0
push 0x65503c
mov ecx, esi
call fcn.00481fe0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.0047d4b0
push 0x80070057
call fcn.0047d4b0
push 0x80004005
call fcn.0047d4b0
int3
Function at 0x54f8f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x6d1554]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0xc]
push esi
mov esi, dword [ebp + 0xc]
push edi
push 0
push 0
push 0x80
push 2
push 1
push 0x40000000
push eax
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
call fcn.0054e630
mov edi, dword [ebp - 0xc]
test eax, eax
js 0x54f983
cmp dword [esi + 0x14], 0x10
mov eax, dword [esi + 0x10]
jb 0x54f943
mov esi, dword [esi]
push 0
lea ecx, [ebp - 8]
push ecx
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
jne 0x54f961
call fcn.0054e610
mov esi, eax
test esi, esi
js 0x54f97c
push edi
call dword [sym.imp.KERNEL32.DLL_FlushFileBuffers]
test eax, eax
jne 0x54f97a
call fcn.0054e610
mov esi, eax
not esi
shr esi, 0x1f
jmp 0x54f985
xor esi, esi
not esi
shr esi, 0x1f
jmp 0x54f985
xor esi, esi
test edi, edi
je 0x54f990
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
xor ecx, ebp
pop esi
call fcn.0054d193
mov esp, ebp
pop ebp
ret
Function at 0x54fe80
Capabilities:
Encode data using base64 via winapi

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x640e48
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x6d1554]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x10]
mov edx, 2
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 0x14]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x34], eax
mov ecx, dword [eax]
mov eax, ecx
add ecx, 0xa
shr eax, 6
add eax, ecx
xor ecx, ecx
mov dword [ebp - 0x2c], eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0054d20c
mov ecx, dword [ebp - 0x2c]
mov edi, eax
add ecx, ecx
push ecx
push 0
push edi
call fcn.005c7920
add esp, 0x10
lea eax, [ebp - 0x2c]
push eax
push edi
push SysReAllocStringLen
push dword [ebp + 0xc]
push esi
call dword [sym.imp.CRYPT32.dll_CryptBinaryToStringW]
mov ecx, edi
mov dword [ebp - 0x18], 0
mov esi, eax
mov dword [ebp - 0x14], 7
xor eax, eax
mov dword [ebp - 0x3c], esi
mov word [ebp - 0x28], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x54ff24
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x28]
call fcn.00483a10
push 2
push edi
mov dword [ebp - 4], 0
call fcn.0054cd75
mov ebx, dword [ebp - 0x14]
add esp, 8
mov edi, dword [ebp - 0x28]
test esi, esi
je 0x550026
cmp ebx, 8
lea eax, [ebp - 0x28]
cmovae eax, edi
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x30], edx
nop dword [eax]
cmp ebx, 8
lea ecx, [ebp - 0x28]
cmovae ecx, edi
lea ecx, [ecx + edx*2]
cmp eax, ecx
je 0x54fff4
cmp word [eax], 0xa
jne 0x54ffec
cmp ebx, 8
lea ecx, [ebp - 0x28]
cmovae ecx, edi
sub eax, ecx
sar eax, 1
cmp edx, eax
jb 0x550074
mov ecx, edx
lea esi, [eax + eax]
sub ecx, eax
mov edx, 1
cmp ecx, edx
cmovb edx, ecx
cmp ebx, 8
mov ebx, dword [ebp - 0x30]
lea ecx, [ebp - 0x28]
cmovae ecx, edi
sub ebx, edx
mov dword [ebp - 0x18], ebx
add ecx, esi
sub ebx, eax
lea eax, [ebx*2 + 2]
push eax
lea eax, [ecx + edx*2]
push eax
push ecx
call fcn.005c73a0
mov ebx, dword [ebp - 0x14]
lea eax, [ebp - 0x28]
mov edi, dword [ebp - 0x28]
add esp, 0xc
cmp ebx, 8
cmovae eax, edi
add eax, esi
jmp 0x54ff66
add eax, 2
jmp 0x54ff70
mov esi, dword [ebp - 0x34]
mov ecx, dword [esi]
cmp edx, ecx
jbe 0x550001
xor esi, esi
jmp 0x550026
cmp ebx, 8
lea eax, [ebp - 0x28]
push edx
cmovae eax, edi
push eax
push ecx
push dword [ebp - 0x38]
call fcn.005ebd5f
mov eax, dword [ebp - 0x18]
add esp, 0x10
mov ebx, dword [ebp - 0x14]
mov edi, dword [ebp - 0x28]
mov dword [esi], eax
mov esi, dword [ebp - 0x3c]
cmp ebx, 8
jb 0x550056
lea ebx, [ebx*2 + 2]
mov eax, edi
cmp ebx, 0x1000
jb 0x55004c
mov edi, dword [edi - 4]
add ebx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x550079
push ebx
push edi
call fcn.0054cd75
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0054d193
mov esp, ebp
pop ebp
ret
call fcn.00483400
call fcn.005d1f0f
int3
Function at 0x552180
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x640ff6
mov eax, dword fs:[0]
push eax
sub esp, 0x108
mov eax, dword [0x6d1554]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, dword [ecx + 8]
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0xb4], ecx
mov dword [ebp - 4], 0
test esi, esi
je 0x55226d
test edi, edi
je 0x552299
mov edx, dword [ebp + 0x10]
test edx, 0xf
jne 0x5522c5
lea eax, [edx - 0x10]
cmp dword [ebp + 0xc], eax
jbe 0x5522f1
cmp byte [ecx + 0x10], 0
je 0x55231d
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], edx
push eax
push edi
push 0
push 1
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov ecx, eax
test ecx, ecx
je 0x552349
jmp 0x552245
mov eax, dword [ebp - 0x18]
mov dword [ebx], eax
test ecx, ecx
setne al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0054d193
mov esp, ebp
pop ebp
ret 0x10
push 0x80090003
call dword [sym.imp.KERNEL32.DLL_SetLastError]
push str.Decrypt_1_:_Key_is_not_valid
lea ecx, [ebp - 0xc0]
call fcn.00551bb0
push 0x6ba894
lea eax, [ebp - 0xc0]
push eax
call fcn.005c678a
push 0x6f8
call dword [sym.imp.KERNEL32.DLL_SetLastError]
push str.Decrypt_1_:_Buffer_is_NULL
lea ecx, [ebp - 0xcc]
call fcn.00551bb0
push 0x6ba894
lea eax, [ebp - 0xcc]
push eax
call fcn.005c678a
push 0x80090005
call dword [sym.imp.KERNEL32.DLL_SetLastError]
push str.Decrypt_1_:_Data_size_is_not_a_multple_of_block_size
lea ecx, [ebp - 0xd8]
call fcn.00551bb0
push 0x6ba894
lea eax, [ebp - 0xd8]
push eax
call fcn.005c678a
push 0x80090028
call dword [sym.imp.KERNEL32.DLL_SetLastError]
push str.Decrypt_1_:_Buffer_is_too_small
lea ecx, [ebp - 0xe4]
call fcn.00551bb0
push 0x6ba894
lea eax, [ebp - 0xe4]
push eax
call fcn.005c678a
push 0x80090027
call dword [sym.imp.KERNEL32.DLL_SetLastError]
push str.Decrypt_1_:_IV_has_not_been_set
lea ecx, [ebp - 0xf0]
call fcn.00551bb0
push 0x6ba894
lea eax, [ebp - 0xf0]
push eax
call fcn.005c678a
push 0x98
lea ecx, [ebp - 0xb0]
call fcn.005535c0
push 1
push 2
lea ecx, [ebp - 0xb0]
call fcn.0049d650
lea eax, [ebp - 0xb0]
mov byte [ebp - 4], 1
push str.Decrypt_1_:_CryptDecrypt_failed__
push eax
call fcn.0049d1b0
mov esi, dword [sym.imp.KERNEL32.DLL_GetLastError]
add esp, 8
call esi
push eax
call fcn.00552d90
push eax
lea eax, [ebp - 0xb0]
push eax
call fcn.0049d1b0
add esp, 0xc
lea eax, [ebp - 0xb0]
push str.__0x
push eax
call fcn.0049d1b0
add esp, 8
mov ecx, eax
push 0x5535e0
call fcn.00551fa0
mov edi, eax
call esi
push eax
mov ecx, edi
call fcn.00551ce0
push 0x65986c
push eax
call fcn.0049d1b0
add esp, 8
mov dword [ebx], 0
lea eax, [ebp - 0x114]
lea ecx, [ebp - 0xb0]
push eax
call fcn.004a0c30
mov ecx, eax
mov byte [ebp - 4], 2
call fcn.005018af
push eax
lea ecx, [ebp - 0xfc]
call fcn.00551bb0
push 0x6ba894
lea eax, [ebp - 0xfc]
push eax
call fcn.005c678a
push 0
push 0
call fcn.005c678a
int3
Function at 0x5527a0
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x641076
mov eax, dword fs:[0]
push eax
sub esp, 0xfc
mov eax, dword [0x6d1554]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edx, dword [ecx + 8]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0xb4], ecx
mov dword [ebp - 4], 0
test edx, edx
je 0x552889
test esi, esi
je 0x5528b5
mov ebx, dword [ebp + 0x10]
mov eax, ebx
and eax, 0xfffffff0
add eax, 0x10
cmp dword [ebp + 0xc], eax
jb 0x5528e1
cmp byte [ecx + 0x10], 0
je 0x55290d
push dword [ebp + 0xc]
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], ebx
push eax
push esi
push 0
push 1
push 0
push edx
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov ecx, eax
test ecx, ecx
je 0x552939
jmp 0x552861
mov eax, dword [ebp - 0x18]
mov dword [edi], eax
test ecx, ecx
setne al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0054d193
mov esp, ebp
pop ebp
ret 0x10
push 0x80090003
call dword [sym.imp.KERNEL32.DLL_SetLastError]
push str.Encrypt_1_:_Key_is_not_valid
lea ecx, [ebp - 0xc0]
call fcn.00551bb0
push 0x6ba894
lea eax, [ebp - 0xc0]
push eax
call fcn.005c678a
push 0x6f8
call dword [sym.imp.KERNEL32.DLL_SetLastError]
push str.Encrypt_1_:_Buffer_is_NULL
lea ecx, [ebp - 0xcc]
call fcn.00551bb0
push 0x6ba894
lea eax, [ebp - 0xcc]
push eax
call fcn.005c678a
push 0x80090028
call dword [sym.imp.KERNEL32.DLL_SetLastError]
push str.Encrypt_1_:_Buffer_is_too_small
lea ecx, [ebp - 0xd8]
call fcn.00551bb0
push 0x6ba894
lea eax, [ebp - 0xd8]
push eax
call fcn.005c678a
push 0x80090027
call dword [sym.imp.KERNEL32.DLL_SetLastError]
push str.Encrypt_1_:_IV_has_not_been_set
lea ecx, [ebp - 0xe4]
call fcn.00551bb0
push 0x6ba894
lea eax, [ebp - 0xe4]
push eax
call fcn.005c678a
push 0x98
lea ecx, [ebp - 0xb0]
call fcn.005535c0
push 1
push 2
lea ecx, [ebp - 0xb0]
call fcn.0049d650
lea eax, [ebp - 0xb0]
mov byte [ebp - 4], 1
push str.Encrypt_1_:_CryptEncrypt_failed__
push eax
call fcn.0049d1b0
mov esi, dword [sym.imp.KERNEL32.DLL_GetLastError]
add esp, 8
call esi
push eax
call fcn.00552d90
push eax
lea eax, [ebp - 0xb0]
push eax
call fcn.0049d1b0
add esp, 0xc
lea eax, [ebp - 0xb0]
push str.__0x
push eax
call fcn.0049d1b0
add esp, 8
mov ecx, eax
push 0x5535e0
call fcn.00551fa0
mov ebx, eax
call esi
push eax
mov ecx, ebx
call fcn.00551ce0
push 0x65986c
push eax
call fcn.0049d1b0
add esp, 8
mov dword [edi], 0
lea eax, [ebp - 0x108]
lea ecx, [ebp - 0xb0]
push eax
call fcn.004a0c30
mov ecx, eax
mov byte [ebp - 4], 2
call fcn.005018af
push eax
lea ecx, [ebp - 0xf0]
call fcn.00551bb0
push 0x6ba894
lea eax, [ebp - 0xf0]
push eax
call fcn.005c678a
push 0
push 0
call fcn.005c678a
int3
Function at 0x5531a0
Capabilities:
Encrypt data using aes via winapi

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x641118
mov eax, dword fs:[0]
push eax
sub esp, 0x94
mov eax, dword [0x6d1554]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov eax, dword [edi + 8]
lea ebx, [edi + 8]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x18], ecx
test eax, eax
je 0x5531fa
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov ecx, dword [ebp - 0x18]
mov dword [ebx], 0
mov byte [edi + 0x10], 0
cmp dword [edi + 4], 0
mov dword [ebp - 4], 0
je 0x553329
test ecx, ecx
je 0x553344
mov esi, dword [ebp + 0xc]
cmp esi, 0x10
je 0x553229
cmp esi, 0x18
je 0x553229
cmp esi, 0x20
jne 0x55335f
push 0x2c
lea eax, [ebp - 0x44]
push 0
push eax
call fcn.005c7920
add esp, 0xc
mov dword [ebp - 0x44], 0x208
mov byte [ebp - 4], 1
cmp esi, 0x10
je 0x553270
cmp esi, 0x18
je 0x553262
cmp esi, 0x20
jne 0x55337a
mov dword [ebp - 0x40], 0x6610
mov eax, esi
jmp 0x55327c
mov dword [ebp - 0x40], 0x660f
mov eax, 0x18
jmp 0x55327c
mov dword [ebp - 0x40], 0x660e
mov eax, 0x10
push esi
push dword [ebp - 0x18]
mov dword [ebp - 0x3c], eax
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.00553600
add esp, 0x10
test eax, eax
jne 0x553395
push ebx
push 0
push 0
lea eax, [esi + 0xc]
push eax
lea eax, [ebp - 0x44]
push eax
push dword [edi + 4]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x5533b6
push 0
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 1
push eax
push 4
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x5533d7
jmp 0x5532f3
mov al, 1
lea ecx, [ebp - 0x44]
mov edx, 4
nop dword [eax]
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub edx, 1
jne 0x553300
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0054d193
mov esp, ebp
pop ebp
ret 8
push str.SetKey:_Provider_is_not_valid
lea ecx, [ebp - 0x58]
call fcn.00551bb0
push 0x6ba894
lea eax, [ebp - 0x58]
push eax
call fcn.005c678a
push str.SetKey:_Key_buffer_is_NULL
lea ecx, [ebp - 0x64]
call fcn.00551bb0
push 0x6ba894
lea eax, [ebp - 0x64]
push eax
call fcn.005c678a
push str.SetKey:_Key_size_is_not_valid
lea ecx, [ebp - 0x70]
call fcn.00551bb0
push 0x6ba894
lea eax, [ebp - 0x70]
push eax
call fcn.005c678a
push str.SetKey:_Key_size_is_not_valid
lea ecx, [ebp - 0x7c]
call fcn.00551bb0
push 0x6ba894
lea eax, [ebp - 0x7c]
push eax
call fcn.005c678a
push str.SetKey:_Unable_to_copy_key
lea ecx, [ebp - 0x88]
call fcn.00551bb0
push 0x6ba894
lea eax, [ebp - 0x88]
push eax
call fcn.005c678a
push str.SetKey:_Import_key_failed
lea ecx, [ebp - 0x94]
call fcn.00551bb0
push 0x6ba894
lea eax, [ebp - 0x94]
push eax
call fcn.005c678a
push str.SetKey:_Set_CBC_mode_failed
lea ecx, [ebp - 0xa0]
call fcn.00551bb0
push 0x6ba894
lea eax, [ebp - 0xa0]
push eax
call fcn.005c678a
push 0
push 0
call fcn.005c678a
int3