Function at 0x10035421
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi
Encrypt or decrypt via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt
Print debug messages

Disassembly:
push ebp
lea ebp, [esp - 0x18fa4]
mov eax, 0x19024
call fcn.10045420
mov eax, dword [0x10084adc]
xor eax, ebp
mov dword [ebp + 0x18fa0], eax
mov eax, dword [ebp + 0x18fb0]
push ebx
push esi
mov esi, dword [ebp + 0x18fb4]
xor ebx, ebx
push edi
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp + 0x18fb8]
push 0x18fff
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x5f]
push ebx
push eax
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x68], ebx
mov byte [ebp - 0x60], bl
call fcn.10045030
push esi
lea eax, [ebp - 0x60]
push 0x100614c0
push eax
call fcn.10045378
mov esi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
add esp, 0x18
push 0xf0000000
push 0x18
push ebx
push ebx
lea eax, [ebp - 0x74]
push eax
call esi
test eax, eax
jne 0x100354f3
mov edi, 0xf0000008
push edi
push 0x18
push ebx
push ebx
lea eax, [ebp - 0x74]
push eax
call esi
test eax, eax
jne 0x100354f3
push 0xf0000010
push 0x18
push ebx
push ebx
lea eax, [ebp - 0x74]
push eax
call esi
test eax, eax
jne 0x100354da
push str.Error_during_CryptAcquireContext_CRYPT_DELETEKEYSETCRYPT_VERIFYCONTEXT__n
jmp 0x10035617
push edi
push 0x18
push ebx
push ebx
lea eax, [ebp - 0x74]
push eax
call esi
test eax, eax
jne 0x100354f3
push str.Error_during_CryptAcquireContext_CRYPT_NEWKEYSETCRYPT_VERIFYCONTEXT__n
jmp 0x10035617
lea eax, [ebp - 0x64]
push eax
push ebx
push ebx
push 0x800e
push dword [ebp - 0x74]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x10035515
push str.Error_during_CryptCreateHash__n
jmp 0x10035617
cmp dword [ebp + 0x18fac], 2
push ebx
jne 0x100355d6
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push dword [ebp - 0x70]
push dword [ebp - 0x64]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x100355f0
mov esi, dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
push ebx
lea eax, [ebp - 0x7c]
push eax
push ebx
push 4
push dword [ebp - 0x64]
mov dword [ebp - 0x7c], ebx
call esi
test eax, eax
je 0x10035761
push ebx
lea eax, [ebp - 0x70]
push eax
push ebx
push 2
push dword [ebp - 0x64]
mov dword [ebp - 0x70], ebx
call esi
test eax, eax
je 0x10035761
push dword [ebp - 0x70]
call fcn.10047f83
pop ecx
push ebx
mov edi, eax
lea eax, [ebp - 0x70]
push eax
push edi
push 2
push dword [ebp - 0x64]
call esi
test eax, eax
je 0x100355c8
xor esi, esi
cmp dword [ebp - 0x70], ebx
jbe 0x100355bf
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x6c], eax
movzx eax, byte [esi + edi]
push eax
push str._2.2x
push dword [ebp - 0x6c]
call fcn.10045378
add dword [ebp - 0x6c], 2
add esp, 0xc
inc esi
cmp esi, dword [ebp - 0x70]
jb 0x100355a0
push dword [ebp - 0x64]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
cmp edi, ebx
je 0x10035761
push edi
jmp 0x1003575b
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push dword [ebp - 0x7c]
push dword [ebp - 0x64]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x100355f7
push str.Error_during_CryptHashData.__n
jmp 0x10035617
lea eax, [ebp - 0x78]
push eax
push 1
push dword [ebp - 0x64]
push 0x6610
push dword [ebp - 0x74]
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
jne 0x10035622
push str.Error_during_CryptDeriveKey__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x10035761
lea eax, [ebp - 0x60]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10035628
sub eax, edx
mov edi, eax
lea eax, [edi + 0x400]
push eax
call fcn.10047f83
mov esi, eax
pop ecx
cmp esi, ebx
je 0x1003574b
push edi
push ebx
push esi
call fcn.10045030
add esp, 0xc
push ebx
lea eax, [ebp - 0x80]
push eax
push 4
push dword [ebp - 0x78]
xor edi, edi
inc edi
mov dword [ebp - 0x80], edi
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
jne 0x10035679
push str.Error_during_CRYPT_MODE_CBC__n
jmp 0x10035750
lea eax, [ebp - 0x60]
cmp dword [ebp + 0x18fac], ebx
je 0x100356fa
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10035687
sub eax, edx
mov dword [ebp - 0x68], eax
lea eax, [ebp - 0x60]
mov edx, esi
mov ecx, eax
sub edx, ecx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
cmp cl, bl
jne 0x1003569c
mov eax, dword [ebp - 0x68]
add eax, 0x400
push eax
lea eax, [ebp - 0x68]
push eax
push esi
push ebx
push edi
push ebx
push dword [ebp - 0x78]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x100356ce
push str.Error_during_CryptEncrypt.__n
jmp 0x10035750
mov eax, dword [ebp - 0x6c]
xor edi, edi
mov byte [eax], bl
cmp dword [ebp - 0x68], ebx
jbe 0x10035756
movzx eax, byte [edi + esi]
push eax
push dword [ebp - 0x6c]
push str._s_02x
push dword [ebp - 0x6c]
call fcn.10045378
add esp, 0x10
inc edi
cmp edi, dword [ebp - 0x68]
jb 0x100356da
jmp 0x10035756
push esi
push eax
call fcn.10040b0c
pop ecx
lea eax, [ebp - 0x60]
pop ecx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10035709
sub eax, edx
shr eax, 1
mov dword [ebp - 0x68], eax
lea eax, [ebp - 0x68]
push eax
push esi
push ebx
push edi
push ebx
push dword [ebp - 0x78]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x10035733
push str.Error_during_CryptDecrypt.__n
jmp 0x10035750
push dword [ebp - 0x68]
mov edi, dword [ebp - 0x6c]
push esi
push edi
call fcn.10046560
mov eax, dword [ebp - 0x68]
add esp, 0xc
mov byte [edi + eax], bl
jmp 0x10035756
push str.Out_of_memory.__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp esi, ebx
je 0x10035761
push esi
call fcn.10046e73
pop ecx
cmp dword [ebp - 0x64], ebx
je 0x10035781
push dword [ebp - 0x64]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
test eax, eax
jne 0x1003577e
push str.Error_during_CryptDestroyHash._n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [ebp - 0x64], ebx
cmp dword [ebp - 0x78], ebx
je 0x1003579e
push dword [ebp - 0x78]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
test eax, eax
jne 0x1003579e
push str.Error_during_CryptDestroyKey__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp dword [ebp - 0x74], ebx
je 0x100357bc
push ebx
push dword [ebp - 0x74]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
test eax, eax
jne 0x100357bc
push str.Error_during_CryptReleaseContext__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [ebp + 0x18fa0]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1004501f
add ebp, 0x18fa4
leave
ret