Function at 0x407ce0
Capabilities:
Encrypt or decrypt via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
xor eax, eax
mov ebp, esp
push edi
push esi
push ebx
lea ebx, [ebp - 0x214]
sub esp, 0x248
lea esi, [esi]
mov byte [ebx + eax], al
add eax, 1
cmp eax, 0x100
jne 0x407cf8
xor eax, eax
lea esi, [ebp - 0x114]
lea esi, [esi]
mov byte [esi + eax], al
add eax, 1
cmp eax, 0x100
jne 0x407d10
mov ecx, 0x28
lea edx, [ebp - 0x220]
mov eax, 0x6602
call fcn.00407220
test eax, eax
jne 0x407d3e
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x218], 0x100
lea eax, [ebp - 0x218]
mov dword [esp + 0x18], 0x108
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x220]
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_CryptEncrypt]
mov dword [ebp - 0x228], eax
call eax
sub esp, 0x1c
mov edi, eax
call fcn.00412e10
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x74c
mov eax, dword [ebp - 0x218]
mov edx, dword fs:[0x18]
mov dword [esp + 0xc], eax
mov ecx, dword [edx + 0x34]
cmp eax, 0x108
mov dword [ebp - 0x224], edx
mov dword [esp + 8], ecx
sete cl
xor eax, eax
test edi, edi
setne al
mov dword [esp + 4], str._08lx__dwLen:__ld_n
lea edi, [ebp - 0x21c]
and eax, ecx
mov dword [esp], eax
call fcn.00401ac0
mov dword [esp + 0x10], edi
mov ecx, dword [sym.imp.advapi32.dll_CryptCreateHash]
mov dword [esp + 0xc], 0
mov eax, dword [ebp - 0x220]
mov dword [esp + 4], 0x8005
mov dword [esp + 8], eax
mov eax, dword [0x42b014]
mov dword [esp], eax
mov dword [ebp - 0x22c], ecx
call ecx
sub esp, 0x14
mov edi, eax
call fcn.00412e10
mov edx, dword [ebp - 0x224]
mov dword [eax], 0x41605d
mov dword [eax + 4], 0x74f
mov eax, dword [edx + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.00401ac0
test edi, edi
je 0x407d36
mov dword [ebp - 0x218], 8
lea ecx, [ebp - 0x218]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], 8
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x220]
mov dword [esp], eax
mov eax, dword [ebp - 0x228]
call eax
sub esp, 0x1c
mov edi, eax
mov eax, 0x754
call fcn.00401310
mov edx, dword [ebp - 0x224]
mov eax, dword [edx + 0x34]
mov dword [ebp - 0x230], edx
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], str._08lx_n
call fcn.00401ac0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x100
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x21c]
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_CryptHashData]
mov dword [ebp - 0x224], eax
call eax
sub esp, 0x10
mov edi, eax
mov eax, 0x757
call fcn.00401310
mov edx, dword [ebp - 0x230]
mov eax, dword [edx + 0x34]
mov dword [ebp - 0x234], edx
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], str._08lx_n
call fcn.00401ac0
lea eax, [ebp - 0x218]
mov dword [ebp - 0x218], 0x100
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], 2
mov eax, dword [ebp - 0x21c]
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_CryptGetHashParam]
mov dword [ebp - 0x230], eax
call eax
sub esp, 0x14
mov edi, eax
mov eax, 0x75b
call fcn.00401310
mov eax, dword [ebp - 0x218]
test edi, edi
mov dword [esp + 0xc], eax
mov edx, dword [ebp - 0x234]
mov edx, dword [edx + 0x34]
mov dword [esp + 4], str._08lx__dwLen:__ld_n
mov dword [esp + 8], edx
setne dl
cmp eax, 8
sete al
movzx eax, al
and eax, edx
mov dword [esp], eax
call fcn.00401ac0
mov eax, 0x75e
call fcn.00401310
cmp dword [ebp - 0x214], 0xe946a2b7
je 0x408613
mov dword [esp + 8], 8
mov dword [esp + 4], 0x418ea4
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_memcmp]
or eax, dword [0x42b050]
sete al
movzx eax, al
mov dword [esp], eax
mov dword [esp + 4], str.Hash_does_not_match._n
call fcn.00401ac0
xor eax, eax
lea esi, [esi]
mov byte [ebx + eax], al
add eax, 1
cmp eax, 0x100
jne 0x408008
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x21c]
mov dword [esp], eax
mov eax, dword [ebp - 0x224]
call eax
sub esp, 0x10
mov edi, eax
mov eax, 0x765
call fcn.00401310
xor eax, eax
mov edx, dword fs:[0x18]
mov ecx, dword [edx + 0x34]
test edi, edi
jne 0x408064
xor eax, eax
cmp ecx, 0x8009000c
sete al
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [esp + 4], str.Unexpected_result__d__error__lx_n
mov edi, dword fs:[0x18]
call fcn.00401ac0
mov eax, dword [ebp - 0x21c]
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_CryptDestroyHash]
mov dword [ebp - 0x234], eax
call eax
sub esp, 4
mov dword [ebp - 0x238], eax
mov eax, 0x768
call fcn.00401310
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x238]
mov dword [esp], edx
call fcn.00401ac0
lea eax, [ebp - 0x21c]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x220]
mov dword [esp + 4], 0x8005
mov dword [esp + 8], eax
mov eax, dword [0x42b014]
mov dword [esp], eax
mov eax, dword [ebp - 0x22c]
call eax
sub esp, 0x14
mov dword [ebp - 0x238], eax
mov eax, 0x76b
call fcn.00401310
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x238]
mov dword [esp], edx
call fcn.00401ac0
lea eax, [ebp - 0x218]
mov dword [ebp - 0x218], 8
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], 8
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x220]
mov dword [esp], eax
mov eax, dword [ebp - 0x228]
call eax
sub esp, 0x1c
mov dword [ebp - 0x228], eax
mov eax, 0x76f
call fcn.00401310
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x228]
mov dword [esp], edx
call fcn.00401ac0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x21c]
mov dword [esp], eax
mov eax, dword [ebp - 0x224]
call eax
sub esp, 0x10
mov dword [ebp - 0x228], eax
mov eax, 0x772
call fcn.00401310
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x228]
mov dword [esp], edx
call fcn.00401ac0
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x218], 8
mov dword [esp + 0x14], ecx
mov ecx, dword [sym.imp.advapi32.dll_CryptDecrypt]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x220]
mov dword [esp], eax
mov dword [ebp - 0x238], ecx
call ecx
sub esp, 0x18
mov dword [ebp - 0x228], eax
mov eax, 0x776
call fcn.00401310
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x228]
mov dword [esp], edx
call fcn.00401ac0
lea eax, [ebp - 0x213]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x21c]
mov dword [esp], eax
mov eax, dword [ebp - 0x224]
call eax
sub esp, 0x10
mov dword [ebp - 0x228], eax
mov eax, 0x779
call fcn.00401310
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x228]
mov dword [esp], edx
call fcn.00401ac0
lea eax, [ebp - 0x212]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 6
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x21c]
mov dword [esp], eax
mov eax, dword [ebp - 0x224]
call eax
sub esp, 0x10
mov dword [ebp - 0x228], eax
mov eax, 0x77b
call fcn.00401310
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x228]
mov dword [esp], edx
call fcn.00401ac0
lea eax, [ebp - 0x20c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 9
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x21c]
mov dword [esp], eax
mov eax, dword [ebp - 0x224]
call eax
sub esp, 0x10
mov dword [ebp - 0x224], eax
mov eax, 0x77d
call fcn.00401310
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x224]
mov dword [esp], edx
call fcn.00401ac0
lea eax, [ebp - 0x218]
mov dword [ebp - 0x218], 8
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x220]
mov dword [esp], eax
mov ecx, dword [ebp - 0x238]
call ecx
sub esp, 0x18
mov esi, eax
mov eax, 0x781
call fcn.00401310
mov eax, dword [edi + 0x34]
mov dword [esp], esi
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
call fcn.00401ac0
lea eax, [ebp - 0x218]
mov dword [ebp - 0x218], 0x100
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], 2
mov eax, dword [ebp - 0x21c]
mov dword [esp], eax
mov eax, dword [ebp - 0x230]
call eax
sub esp, 0x14
mov esi, eax
mov eax, 0x785
call fcn.00401310
mov eax, dword [ebp - 0x218]
test esi, esi
mov dword [esp + 0xc], eax
mov edx, dword [edi + 0x34]
mov dword [esp + 4], str._08lx__dwLen__ld_n
mov dword [esp + 8], edx
setne dl
cmp eax, 8
sete al
movzx eax, al
and eax, edx
mov dword [esp], eax
call fcn.00401ac0
mov eax, 0x788
call fcn.00401310
cmp dword [ebp - 0x214], 0x3b0a22ef
je 0x4085f9
mov dword [esp + 8], 8
mov dword [esp + 4], 0x418e94
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_memcmp]
or eax, dword [0x42b050]
sete al
movzx eax, al
mov dword [esp], eax
mov dword [esp + 4], str.Hash_does_not_match._n
mov ebx, dword fs:[0x18]
call fcn.00401ac0
mov eax, dword [ebp - 0x21c]
mov dword [esp], eax
mov eax, dword [ebp - 0x234]
call eax
sub esp, 4
mov esi, eax
mov eax, 0x78c
call fcn.00401310
mov eax, dword [ebx + 0x34]
mov dword [esp], esi
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
call fcn.00401ac0
mov eax, dword [ebp - 0x220]
mov esi, dword [sym.imp.advapi32.dll_CryptDestroyKey]
mov dword [esp], eax
call esi
sub esp, 4
mov edi, eax
mov eax, 0x78f
call fcn.00401310
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str._08lx_n
mov dword [esp], edi
mov dword [esp + 8], eax
call fcn.00401ac0
mov ecx, 0x38
lea edx, [ebp - 0x220]
mov eax, 0x6801
call fcn.00407220
test eax, eax
je 0x407d36
lea eax, [ebp - 0x21c]
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov eax, dword [ebp - 0x220]
mov dword [esp + 4], 0x8005
mov dword [esp + 8], eax
mov eax, dword [0x42b014]
mov dword [esp], eax
mov eax, dword [ebp - 0x22c]
call eax
sub esp, 0x14
mov edi, eax
mov eax, 0x796
call fcn.00401310
mov edx, dword [ebx + 0x34]
test edi, edi
je 0x40862d
mov ecx, dword [0x42b050]
xor eax, eax
test ecx, ecx
sete al
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 4], str._08lx_n
call fcn.00401ac0
mov eax, dword [ebp - 0x220]
mov dword [esp], eax
call esi
sub esp, 4
mov ebx, eax
mov eax, 0x79b
call fcn.00401310
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], str._08lx_n
mov dword [esp + 8], eax
call fcn.00401ac0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp dword [ebp - 0x210], 0x4948abd0
mov eax, 1
jne 0x40847d
jmp 0x4084a2
cmp dword [ebp - 0x210], 0xade03111
mov eax, 1
jne 0x407fcd
jmp 0x407ff2
xor eax, eax
cmp dword [ebx + 0x34], 0x80090003
sete al
jmp 0x4085a6