joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1009fca0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push esi
push edi
mov eax, 0xcccccccc
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov dword [ebp - 4], eax
imul eax, dword [ebp + 8], 0x2c
add eax, dword [0x100eea00]
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], 5
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 4]
mov cl, byte [eax + 0x14]
and cl, 1
movzx edx, cl
test edx, edx
je 0x1009fd03
mov eax, dword [ebp - 0x18]
sub eax, 5
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x14]
add ecx, 2
mov dword [ebp - 0x14], ecx
mov esi, esp
lea edx, [ebp - 0xc]
push edx
push 0x40
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp esi, esp
call fcn.100a2782
test eax, eax
jne 0x1009fd2e
mov eax, 0xa
jmp 0x1009fe30
cmp dword [ebp + 0xc], 0
je 0x1009fd7a
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x1c]
mov byte [eax], 0xe9
mov ecx, dword [ebp - 0x18]
add ecx, 5
mov edx, dword [ebp - 4]
mov eax, dword [edx + 4]
sub eax, ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ecx + 1], eax
mov edx, dword [ebp - 4]
mov al, byte [edx + 0x14]
and al, 1
movzx ecx, al
test ecx, ecx
je 0x1009fd78
mov edx, dword [ebp - 4]
mov eax, dword [edx]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
mov byte [ecx], 0xeb
mov edx, dword [ebp - 0x20]
mov byte [edx + 1], 0xf9
jmp 0x1009fdb6
mov eax, dword [ebp - 4]
mov cl, byte [eax + 0x14]
and cl, 1
movzx edx, cl
test edx, edx
je 0x1009fda1
push 7
mov eax, dword [ebp - 4]
add eax, 0xc
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
jmp 0x1009fdb6
push 5
mov edx, dword [ebp - 4]
add edx, 0xc
push edx
mov eax, dword [ebp - 0x18]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov esi, esp
lea ecx, [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp esi, esp
call fcn.100a2782
mov esi, esp
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x18]
push eax
mov edi, esp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
cmp edi, esp
call fcn.100a2782
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
cmp esi, esp
call fcn.100a2782
mov cl, byte [ebp + 0xc]
and cl, 1
shl cl, 1
mov edx, dword [ebp - 4]
mov al, byte [edx + 0x14]
and al, 0xfd
or al, cl
mov ecx, dword [ebp - 4]
mov byte [ecx + 0x14], al
mov dl, byte [ebp + 0xc]
and dl, 1
shl dl, 2
mov eax, dword [ebp - 4]
mov cl, byte [eax + 0x14]
and cl, 0xfb
or cl, dl
mov edx, dword [ebp - 4]
mov byte [edx + 0x14], cl
xor eax, eax
push edx
mov ecx, ebp
push eax
lea edx, [0x1009fe54]
call fcn.100a272e
pop eax
pop edx
pop edi
pop esi
add esp, 0x20
cmp ebp, esp
call fcn.100a2782
mov esp, ebp
pop ebp
ret
Function at 0x100a0520
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov dword [ebp - 8], 0xcccccccc
mov dword [ebp - 4], 0xcccccccc
mov eax, dword [0x100ee9f4]
mov dword [ebp - 4], eax
jmp 0x100a0547
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
mov dword [ebp - 4], edx
cmp dword [ebp - 4], 0
je 0x100a0560
mov eax, dword [ebp - 4]
cmp dword [eax + 4], 0
je 0x100a055e
mov eax, dword [ebp - 4]
jmp 0x100a05e4
jmp 0x100a053f
mov esi, esp
push 0x40
push 0x3000
push 0x1000
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
cmp esi, esp
call fcn.100a2782
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x100a05e1
mov ecx, dword [ebp - 4]
add ecx, 0x20
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 4]
mov dword [edx + 4], 0
mov eax, dword [ebp - 4]
mov dword [eax + 8], 0
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 4]
mov dword [ecx], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov dword [ecx + 4], edx
mov eax, dword [ebp - 8]
add eax, 0x20
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp - 4]
cmp ecx, 0xfe0
jbe 0x100a05a3
mov edx, dword [ebp - 4]
mov eax, dword [0x100ee9f4]
mov dword [edx], eax
mov ecx, dword [ebp - 4]
mov dword [0x100ee9f4], ecx
mov eax, dword [ebp - 4]
pop esi
add esp, 8
cmp ebp, esp
call fcn.100a2782
mov esp, ebp
pop ebp
ret

Function at 0x100a0ad0
Capabilities:
Check for software breakpoints

Disassembly:
push ebp
mov ebp, esp
push ecx
mov dword [ebp - 4], 0xcccccccc
mov eax, 1
imul ecx, eax, 0
mov edx, dword [ebp + 8]
movzx eax, byte [edx + ecx]
test eax, eax
je 0x100a0b20
mov ecx, 1
imul edx, ecx, 0
mov eax, dword [ebp + 8]
movzx ecx, byte [eax + edx]
cmp ecx, 0x90
je 0x100a0b20
mov edx, 1
imul eax, edx, 0
mov ecx, dword [ebp + 8]
movzx edx, byte [ecx + eax]
cmp edx, 0xcc
je 0x100a0b20
xor eax, eax
jmp 0x100a0b61
mov dword [ebp - 4], 1
jmp 0x100a0b32
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp + 0xc]
jae 0x100a0b5c
mov edx, dword [ebp + 8]
add edx, dword [ebp - 4]
movzx eax, byte [edx]
mov ecx, 1
imul edx, ecx, 0
mov ecx, dword [ebp + 8]
movzx edx, byte [ecx + edx]
cmp eax, edx
je 0x100a0b5a
xor eax, eax
jmp 0x100a0b61
jmp 0x100a0b29
mov eax, 1
mov esp, ebp
pop ebp
ret
Function at 0x401538
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
xor edi, edi
test esi, esi
je 0x40159f
mov ecx, dword [esi + 0x60]
test ecx, ecx
je 0x40159f
cmp ecx, 0xffffffff
je 0x40159f
movzx eax, word [esi + 0x1e]
cmp dword [ebp + 0xc], eax
ja 0x401589
push edi
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, eax
test edi, edi
jne 0x4015ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [esi + 4]
push str.ERROR_kull_m_busylight_device_send_raw____device__u__WriteFile__0x_08x__n
call fcn.00407017
add esp, 0xc
jmp 0x4015ae
push eax
push dword [ebp + 0xc]
push dword [esi + 4]
push str.ERROR_kull_m_busylight_device_send_raw____device__u__Size_is_not_valide__siz___u__max___u__n
call fcn.00407017
add esp, 0x10
jmp 0x4015ae
push dword [esi + 4]
push str.ERROR_kull_m_busylight_device_send_raw____device__u__Invalid_Device_Busy_Handle_n
call fcn.00407017
pop ecx
pop ecx
mov eax, edi
pop edi
leave
ret

Function at 0x4015b3
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
push edi
test esi, esi
je 0x401631
mov eax, dword [esi + 0x60]
test eax, eax
je 0x401631
cmp eax, 0xffffffff
je 0x401631
movzx edi, word [esi + 0x1c]
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebx], eax
test eax, eax
je 0x401640
push 0
push dword [ebp + 8]
push edi
push eax
push dword [esi + 0x60]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 4], eax
test eax, eax
je 0x401620
mov eax, dword [ebp + 8]
mov eax, dword [eax]
cmp eax, edi
je 0x401640
push edi
push eax
push str.ERROR_kull_m_busylight_device_read_raw____device__u___u_byte_s__readed___u_wanted_n
call fcn.00407017
add esp, 0xc
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebx], eax
mov eax, dword [ebp + 8]
and dword [eax], 0
jmp 0x401640
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [esi + 4]
push str.ERROR_kull_m_busylight_device_read_raw____device__u__ReadFile__0x_08x__n
jmp 0x401606
push dword [esi + 4]
push str.ERROR_kull_m_busylight_device_read_raw____device__u__Invalid_Device_Busy_Handle_n
call fcn.00407017
pop ecx
pop ecx
mov eax, dword [ebp - 4]
pop edi
leave
ret

Function at 0x4017d5
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
xor ebx, ebx
push esi
mov esi, dword [ebp + 8]
mov byte [ebp - 8], bl
mov byte [ebp - 7], bl
mov byte [ebp - 6], bl
mov byte [ebp - 5], bl
mov byte [ebp - 4], bl
mov byte [ebp - 3], bl
mov byte [ebp - 2], bl
mov byte [ebp - 1], 0x80
jmp 0x40181c
mov eax, dword [esi + 0x70]
mov dword [esi + 0x6c], ebx
cmp eax, ebx
je 0x401811
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [esi + 0x70], ebx
cmp dword [ebp + 0xc], ebx
je 0x40181a
mov esi, dword [esi]
jmp 0x40181c
xor esi, esi
cmp esi, ebx
jne 0x4017fc
push dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push 1
lea edx, [ebp - 8]
call fcn.00401755
pop ecx
pop ecx
pop esi
pop ebx
leave
ret
Function at 0x402875
Capabilities:
Create new key via cryptacquirecontext
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push edi
xor edi, edi
cmp dword [ebp + 8], 0x8000
mov dword [ebp - 0x14], edi
jne 0x4028f1
cmp dword [ebp + 0x18], 4
jne 0x4029a4
lea eax, [ebp - 4]
push eax
push 0xffffff7c
call sub.cryptdll.dll_CDLocateCheckSum
test eax, eax
jl 0x4029a4
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 4]
push edi
call dword [eax + 0xc]
test eax, eax
jl 0x4029a4
push dword [ebp + 0xc]
mov eax, dword [ebp - 4]
push dword [ebp + 0x10]
push dword [ebp - 0x10]
call dword [eax + 0x10]
push dword [ebp + 0x14]
mov eax, dword [ebp - 4]
push dword [ebp - 0x10]
call dword [eax + 0x14]
xor ecx, ecx
test eax, eax
setge cl
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0x14], ecx
call dword [eax + 0x18]
jmp 0x4029a4
push 0xf0000000
push 0x18
push edi
push edi
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x4029a4
lea eax, [ebp - 0xc]
push eax
push edi
push edi
push dword [ebp + 8]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x40299a
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x402991
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
push edi
lea eax, [ebp - 8]
push eax
push edi
push 2
push dword [ebp - 0xc]
call esi
test eax, eax
je 0x402990
push ebx
push dword [ebp - 8]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
cmp ebx, edi
je 0x40298f
push edi
lea eax, [ebp - 8]
push eax
push ebx
push 2
push dword [ebp - 0xc]
call esi
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x18]
cmp dword [ebp - 8], eax
jae 0x40297b
mov eax, dword [ebp - 8]
push eax
push ebx
push dword [ebp + 0x14]
call sub.msvcrt.dll_memcpy
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop ebx
pop esi
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push edi
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [ebp - 0x14]
pop edi
leave
ret
Function at 0x4029aa
Capabilities:
Encrypt data using des via winapi

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
push ebx
mov eax, 0x6603
push esi
lea ebx, [edi + 0xc]
cmp dword [ebp + 0xc], eax
je 0x402a15
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x402a34
xor eax, eax
mov word [esi + 2], ax
mov eax, dword [ebp + 0xc]
push edi
push dword [ebp + 0x10]
mov dword [esi + 4], eax
lea eax, [esi + 0xc]
push eax
mov byte [esi], 8
mov byte [esi + 1], 2
mov dword [esi + 8], edi
call sub.msvcrt.dll_memcpy
add esp, 0xc
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push 0
push ebx
push esi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
push esi
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x402a34
cmp dword [ebp + 0x1c], 0
je 0x402a34
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push edi
push dword [ebp + 0x10]
push eax
call fcn.004031c3
add esp, 0x18
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
pop esi
pop ebx
leave
ret

Function at 0x402a3b
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ebp
lea ebp, [esp - 0x68]
sub esp, 0x11c
push ebx
push edi
mov edi, eax
cmp edi, dword [ebp + 0x7c]
sbb ebx, ebx
inc ebx
je 0x402a5d
push dword [ebp + 0x7c]
push dword [ebp + 0x74]
jmp 0x402aed
push 0x40
lea eax, [ebp + 0x24]
push 0x36
push eax
call sub.msvcrt.dll_memset
push 0x40
lea eax, [ebp - 0x1c]
push 0x5c
push eax
call sub.msvcrt.dll_memset
add esp, 0x18
test edi, edi
jbe 0x402a9e
mov eax, dword [ebp + 0x74]
push esi
lea edx, [ebp + 0x24]
lea esi, [ebp - 0x1c]
sub edx, eax
sub esi, eax
mov dword [ebp + 0x64], edi
mov cl, byte [eax]
xor byte [edx + eax], cl
xor byte [esi + eax], cl
inc eax
dec dword [ebp + 0x64]
jne 0x402a8f
pop esi
push edi
lea eax, [ebp - 0xb4]
push eax
push 0x40
lea eax, [ebp + 0x24]
push eax
push dword [ebp + 0x70]
call fcn.00402875
add esp, 0x14
test eax, eax
je 0x402af8
push edi
lea eax, [ebp + edi - 0xb4]
push eax
push 0x40
lea eax, [ebp - 0x1c]
push eax
push dword [ebp + 0x70]
call fcn.00402875
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x402af8
add edi, edi
cmp dword [ebp + 0x7c], edi
jae 0x402ae5
mov edi, dword [ebp + 0x7c]
push edi
lea eax, [ebp - 0xb4]
push eax
push dword [ebp + 0x78]
call sub.msvcrt.dll_memcpy
add esp, 0xc
pop edi
mov eax, ebx
pop ebx
add ebp, 0x68
leave
ret
Function at 0x402bdb
Capabilities:
Create new key via cryptacquirecontext
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push esi
xor esi, esi
push 0xf0000000
push 0x18
push esi
mov dword [ebp - 0x28], eax
push esi
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x402cf6
push edi
mov edi, dword [ebp + 0xc]
push esi
lea eax, [ebp - 0x10]
push eax
push pe_nt_image_headers32
push dword [ebp + 8]
push 0x6602
push dword [ebp - 0xc]
call fcn.004029aa
add esp, 0x18
test eax, eax
je 0x402ceb
lea eax, [ebp - 4]
push eax
push esi
push dword [ebp - 0x10]
push 0x8009
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x402ce2
push esi
lea eax, [ebp - 0x28]
push eax
push 5
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
je 0x402cd9
push esi
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x402cd9
mov edi, dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
push esi
lea eax, [ebp - 8]
push eax
push esi
push 2
push dword [ebp - 4]
call edi
test eax, eax
je 0x402cd9
push ebx
push dword [ebp - 8]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
cmp ebx, esi
je 0x402cd8
push esi
lea eax, [ebp - 8]
push eax
push ebx
push 2
push dword [ebp - 4]
call edi
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x1c]
cmp dword [ebp - 8], eax
jae 0x402cc4
mov eax, dword [ebp - 8]
push eax
push ebx
push dword [ebp + 0x18]
call sub.msvcrt.dll_memcpy
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push esi
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop edi
mov eax, dword [ebp - 0x14]
pop esi
leave
ret
Function at 0x402cfc
Capabilities:
Create new key via cryptacquirecontext
Encode data using xor
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push edi
push 0xf0000000
push 0x18
xor ebx, ebx
push ebx
mov edi, eax
push ebx
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0x20], ebx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x402ea6
lea eax, [ebp - 0x18]
push eax
push ebx
push ebx
push dword [ebp + 8]
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x402e9c
push ebx
lea eax, [ebp - 4]
push eax
push ebx
push 2
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x402e93
push esi
mov esi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
lea eax, [edi + 4]
push eax
push 0x40
mov dword [ebp - 0x24], eax
call esi
mov dword [ebp - 0x10], eax
cmp eax, ebx
je 0x402e92
push dword [ebp - 4]
push 0x40
call esi
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x402e89
push dword [ebp - 4]
push 0x40
call esi
mov ebx, eax
test ebx, ebx
je 0x402e7e
mov esi, dword [ebp - 0x10]
push edi
push dword [ebp + 0x14]
mov dword [ebp - 0x20], 1
push esi
call sub.msvcrt.dll_memcpy
add esp, 0xc
cmp dword [ebp + 0x20], 0
mov dword [ebp - 0xc], 1
jbe 0x402e77
add edi, esi
mov eax, dword [ebp - 0xc]
bswap eax
mov dword [edi], eax
push dword [ebp - 4]
mov eax, dword [ebp + 8]
push ebx
push dword [ebp - 0x24]
push dword [ebp - 0x10]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.00402bdb
push dword [ebp - 4]
push ebx
push dword [ebp - 8]
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp + 0x18]
add esp, 0x24
cmp eax, 1
jbe 0x402e4a
dec eax
mov dword [ebp - 0x14], eax
push dword [ebp - 4]
mov eax, dword [ebp + 8]
push ebx
push dword [ebp - 4]
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.00402bdb
xor esi, esi
add esp, 0x18
cmp dword [ebp - 4], esi
jbe 0x402e30
mov eax, dword [ebp - 8]
mov ecx, ebx
sub ecx, eax
mov dl, byte [ecx + eax]
xor byte [eax], dl
inc esi
inc eax
cmp esi, dword [ebp - 4]
jb 0x402e24
cmp dword [ebp + 0x24], 0
je 0x402e45
push dword [ebp - 4]
push dword [ebp - 8]
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
dec dword [ebp - 0x14]
jne 0x402dfd
mov esi, dword [ebp + 0x20]
cmp esi, dword [ebp - 4]
jb 0x402e55
mov esi, dword [ebp - 4]
push esi
push dword [ebp - 8]
push dword [ebp + 0x1c]
call sub.msvcrt.dll_memcpy
add dword [ebp + 0x1c], esi
sub dword [ebp + 0x20], esi
add esp, 0xc
inc dword [ebp - 0xc]
cmp dword [ebp + 0x20], 0
ja 0x402dc3
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor ebx, ebx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop esi
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push ebx
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [ebp - 0x20]
pop edi
pop ebx
leave
ret
Function at 0x402ee5
Capabilities:
Encode data using xor
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
push edi
push 0x10
mov esi, eax
xor ebx, ebx
pop edi
mov dword [ebp - 0xc], ebx
cmp esi, edi
jbe 0x403021
lea eax, [ebp - 0x10]
push eax
push ebx
push ebx
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_CryptDuplicateKey]
test eax, eax
je 0x403037
push ebx
push dword [ebp + 0x10]
push 1
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x403016
lea ebx, [esi + 0xf]
shr ebx, 4
and esi, 0xf
je 0x402f3e
mov dword [ebp - 8], esi
jmp 0x402f43
mov dword [ebp - 8], edi
mov esi, edi
cmp ebx, 2
jbe 0x402f64
push 0
lea eax, [ebx - 2]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00402ead
add esp, 0x10
test eax, eax
je 0x403016
lea edi, [ebx - 2]
shl edi, 4
add edi, dword [ebp + 0xc]
lea eax, [esi + 0x10]
push eax
lea eax, [ebp - 0x38]
push edi
push eax
call sub.msvcrt.dll_memcpy
mov dword [ebp - 4], 0x10
sub dword [ebp - 4], esi
push dword [ebp - 4]
lea eax, [ebp + esi - 0x28]
push 0
push eax
mov dword [ebp - 0x18], eax
call sub.msvcrt.dll_memset
add esp, 0x18
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x38]
push eax
xor eax, eax
push eax
push eax
push eax
push dword [ebp - 0x10]
mov dword [ebp - 0x14], 0x10
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
je 0x403016
xor eax, eax
mov cl, byte [ebp + eax - 0x28]
xor byte [ebp + eax - 0x38], cl
inc eax
cmp eax, 0x10
jb 0x402fbd
push dword [ebp - 4]
lea eax, [ebp + esi - 0x38]
push eax
push dword [ebp - 0x18]
call sub.msvcrt.dll_memcpy
push 0
push 1
lea eax, [ebp - 0x28]
push eax
push dword [ebp + 8]
call fcn.00402ead
add esp, 0x1c
mov dword [ebp - 0xc], eax
test eax, eax
je 0x403016
push dword [ebp - 8]
lea esi, [ebp - 0x28]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp + 0xc]
movsd dword es:[edi], dword [esi]
shl ebx, 4
lea eax, [ebx + eax - 0x10]
push eax
movsd dword es:[edi], dword [esi]
call sub.msvcrt.dll_memcpy
add esp, 0xc
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x403037
jne 0x403037
push ebx
push 1
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00402ead
add esp, 0x10
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x403128
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push 0xf0000000
push 0x18
xor ebx, ebx
push ebx
push ebx
lea eax, [ebp - 8]
push eax
xor esi, esi
mov dword [ebp - 0xc], 1
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x4031bd
push edi
push ebx
lea eax, [ebp - 4]
push eax
push ebx
push dword [ebp + 0x10]
push 0x660e
push dword [ebp - 8]
push 0x10
pop edi
call fcn.004029aa
add esp, 0x18
pop edi
test eax, eax
je 0x4031b3
push ebx
lea eax, [ebp - 0xc]
push eax
push 4
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x4031aa
push dword [ebp + 0x14]
mov eax, dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
cmp dword [ebp + 0x18], ebx
je 0x4031a0
call fcn.0040303f
jmp 0x4031a5
call fcn.00402ee5
mov esi, eax
add esp, 0xc
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push ebx
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4033c1
Capabilities:
Create new key via cryptacquirecontext
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push 0xf0000000
push 0x18
xor esi, esi
push esi
push esi
lea eax, [ebp - 8]
push eax
mov dword [ebp - 0xc], esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x40341e
lea eax, [ebp - 4]
push eax
push esi
push esi
push dword [ebp + 8]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x403414
push esi
lea eax, [ebp - 0xc]
push eax
push esi
push 2
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push esi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [ebp - 0xc]
pop esi
leave
ret

Function at 0x403424
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push 0xf0000000
push 0x18
xor esi, esi
push esi
push esi
lea eax, [ebp - 8]
push eax
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], 4
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x40348a
lea eax, [ebp - 4]
push eax
push esi
push dword [ebp + 8]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x403480
push esi
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push 8
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGetKeyParam]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push esi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [ebp - 0xc]
shr eax, 3
pop esi
leave
ret

Function at 0x403493
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push 0xf0000000
push 0x18
xor esi, esi
push esi
push esi
lea eax, [ebp - 8]
push eax
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], 4
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x4034f9
lea eax, [ebp - 4]
push eax
push esi
push dword [ebp + 8]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x4034ef
push esi
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push 9
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGetKeyParam]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push esi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [ebp - 0xc]
shr eax, 3
pop esi
leave
ret