Function at 0x12aaa2e
Capabilities:
Encrypt data using aes via winapi

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
xor ebx, ebx
push esi
push edi
mov esi, ecx
xor edi, edi
cmp dword [ebp + 8], ebx
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
je 0x12aacf0
cmp dword [ebp + 0xc], ebx
je 0x12aacf0
cmp dword [ebp + 0x10], ebx
je 0x12aacf0
cmp dword [esi + 8], 4
je 0x12aaa7c
mov esi, 0x80049e2f
jmp 0x12aad02
cmp dword [esi + 0x20], ebx
je 0x12aace9
cmp dword [esi + 0x24], ebx
je 0x12aace9
push 0x2c
call fcn.01043ba8
cmp eax, ebx
pop ecx
je 0x12aaaa9
push dword [esi + 0x24]
mov ecx, eax
call fcn.012aa1e1
mov dword [ebp - 4], eax
jmp 0x12aaaac
mov dword [ebp - 4], ebx
cmp dword [ebp - 4], ebx
jne 0x12aaabb
mov esi, 0x8007000e
jmp 0x12aad02
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
push ebx
lea edx, [ebp - 0x10]
push edx
call dword [eax + 0x14]
mov esi, eax
cmp esi, ebx
jne 0x12aacf5
mov eax, dword [ebp - 0x10]
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.01043ba8
cmp eax, ebx
pop ecx
mov dword [ebp - 0x14], eax
je 0x12aab70
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
push eax
lea eax, [ebp - 0x10]
push eax
call dword [edx + 0x14]
mov esi, eax
cmp esi, ebx
jne 0x12aacf5
mov eax, dword [ebp - 0x14]
mov ecx, 0x10210e8
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x12aab36
cmp dx, bx
je 0x12aab32
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x12aab36
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x12aab10
xor eax, eax
jmp 0x12aab3b
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x12aace2
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
push ebx
lea edx, [ebp - 0xc]
push edx
call dword [eax + 0x1c]
mov esi, eax
cmp esi, ebx
jne 0x12aacf5
mov eax, dword [ebp - 0xc]
add eax, 0xc
push eax
mov dword [ebp - 0x1c], eax
call fcn.01043ba8
mov edi, eax
cmp edi, ebx
pop ecx
jne 0x12aab7a
mov esi, 0x8007000e
jmp 0x12aacf5
mov eax, dword [ebp + 8]
mov byte [edi], 1
mov byte [edi + 1], 2
mov word [edi + 2], bx
mov ecx, 0x1021090
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x12aabb3
cmp dx, bx
je 0x12aabaf
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x12aabb3
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x12aab8d
xor eax, eax
jmp 0x12aabb8
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x12aabd2
mov eax, dword [ebp - 4]
mov dword [edi + 4], 0x660e
mov dword [eax + 8], 1
jmp 0x12aac68
mov eax, dword [ebp + 8]
mov ecx, 0x1021038
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x12aac00
cmp dx, bx
je 0x12aabfc
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x12aac00
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x12aabda
xor eax, eax
jmp 0x12aac05
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x12aac1c
mov eax, dword [ebp - 4]
mov dword [edi + 4], 0x660f
mov dword [eax + 8], 2
jmp 0x12aac68
mov eax, dword [ebp + 8]
mov ecx, 0x1020fe0
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x12aac4a
cmp dx, bx
je 0x12aac46
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x12aac4a
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x12aac24
xor eax, eax
jmp 0x12aac4f
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x12aace2
mov eax, dword [ebp - 4]
mov dword [edi + 4], 0x6610
mov dword [eax + 8], 3
mov ecx, dword [ebp + 0xc]
lea eax, [edi + 0xc]
push eax
lea eax, [ebp - 0xc]
mov dword [edi + 8], 0xa400
mov edx, dword [ecx]
push eax
call dword [edx + 0x1c]
mov esi, eax
cmp esi, ebx
jne 0x12aacf5
push dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
lea eax, [edi + 0xc]
push eax
call fcn.012a97b5
mov esi, eax
cmp esi, ebx
jne 0x12aacf5
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x18]
push 0x40
push dword [eax + 0x20]
push dword [ebp - 0x1c]
push edi
push dword [eax + 0x24]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x12aaccf
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x12aaccb
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
jmp 0x12aacf5
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov dword [eax + 0x20], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 8], ebx
mov dword [ecx], eax
jmp 0x12aad02
mov esi, 0x80049e5b
jmp 0x12aacf5
mov esi, 0x80049e51
jmp 0x12aad02
mov esi, 0x80070057
mov eax, dword [ebp - 4]
cmp eax, ebx
je 0x12aad02
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push dword [ebp - 0x14]
call fcn.01043bb7
push edi
call fcn.01043bb7
cmp dword [ebp - 8], ebx
pop ecx
pop ecx
je 0x12aad20
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0xc