Function at 0x1003529b
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.10044f70
mov eax, dword [0x10083adc]
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.10044b80
push esi
lea eax, [ebp - 0x60]
push 0x100614b0
push eax
call fcn.10044ec8
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 0x1003536d
mov edi, 0xf0000008
push edi
push 0x18
push ebx
push ebx
lea eax, [ebp - 0x74]
push eax
call esi
test eax, eax
jne 0x1003536d
push 0xf0000010
push 0x18
push ebx
push ebx
lea eax, [ebp - 0x74]
push eax
call esi
test eax, eax
jne 0x10035354
push str.Error_during_CryptAcquireContext_CRYPT_DELETEKEYSETCRYPT_VERIFYCONTEXT__n
jmp 0x10035491
push edi
push 0x18
push ebx
push ebx
lea eax, [ebp - 0x74]
push eax
call esi
test eax, eax
jne 0x1003536d
push str.Error_during_CryptAcquireContext_CRYPT_NEWKEYSETCRYPT_VERIFYCONTEXT__n
jmp 0x10035491
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 0x1003538f
push str.Error_during_CryptCreateHash__n
jmp 0x10035491
cmp dword [ebp + 0x18fac], 2
push ebx
jne 0x10035450
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 0x1003546a
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 0x100355db
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 0x100355db
push dword [ebp - 0x70]
call fcn.10047ad3
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 0x10035442
xor esi, esi
cmp dword [ebp - 0x70], ebx
jbe 0x10035439
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.10044ec8
add dword [ebp - 0x6c], 2
add esp, 0xc
inc esi
cmp esi, dword [ebp - 0x70]
jb 0x1003541a
push dword [ebp - 0x64]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
cmp edi, ebx
je 0x100355db
push edi
jmp 0x100355d5
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 0x10035471
push str.Error_during_CryptHashData.__n
jmp 0x10035491
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 0x1003549c
push str.Error_during_CryptDeriveKey__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x100355db
lea eax, [ebp - 0x60]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x100354a2
sub eax, edx
mov edi, eax
lea eax, [edi + 0x400]
push eax
call fcn.10047ad3
mov esi, eax
pop ecx
cmp esi, ebx
je 0x100355c5
push edi
push ebx
push esi
call fcn.10044b80
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 0x100354f3
push str.Error_during_CRYPT_MODE_CBC__n
jmp 0x100355ca
lea eax, [ebp - 0x60]
cmp dword [ebp + 0x18fac], ebx
je 0x10035574
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10035501
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 0x10035516
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 0x10035548
push str.Error_during_CryptEncrypt.__n
jmp 0x100355ca
mov eax, dword [ebp - 0x6c]
xor edi, edi
mov byte [eax], bl
cmp dword [ebp - 0x68], ebx
jbe 0x100355d0
movzx eax, byte [edi + esi]
push eax
push dword [ebp - 0x6c]
push str._s_02x
push dword [ebp - 0x6c]
call fcn.10044ec8
add esp, 0x10
inc edi
cmp edi, dword [ebp - 0x68]
jb 0x10035554
jmp 0x100355d0
push esi
push eax
call fcn.10040a54
pop ecx
lea eax, [ebp - 0x60]
pop ecx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10035583
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 0x100355ad
push str.Error_during_CryptDecrypt.__n
jmp 0x100355ca
push dword [ebp - 0x68]
mov edi, dword [ebp - 0x6c]
push esi
push edi
call fcn.100460b0
mov eax, dword [ebp - 0x68]
add esp, 0xc
mov byte [edi + eax], bl
jmp 0x100355d0
push str.Out_of_memory.__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp esi, ebx
je 0x100355db
push esi
call fcn.100469c3
pop ecx
cmp dword [ebp - 0x64], ebx
je 0x100355fb
push dword [ebp - 0x64]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
test eax, eax
jne 0x100355f8
push str.Error_during_CryptDestroyHash._n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [ebp - 0x64], ebx
cmp dword [ebp - 0x78], ebx
je 0x10035618
push dword [ebp - 0x78]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
test eax, eax
jne 0x10035618
push str.Error_during_CryptDestroyKey__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp dword [ebp - 0x74], ebx
je 0x10035636
push ebx
push dword [ebp - 0x74]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
test eax, eax
jne 0x10035636
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.10044b6f
add ebp, 0x18fa4
leave
ret