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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
xor edi, edi
mov esi, ecx
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], edi
cmp dword [ebp + 8], edi
je 0x1319108
mov ebx, dword [ebp + 0xc]
cmp ebx, edi
je 0x1319108
cmp dword [ebp + 0x10], edi
je 0x1319108
cmp dword [esi + 8], 4
je 0x1318e96
mov esi, 0x80049e2f
jmp 0x131911a
cmp dword [esi + 0x20], edi
je 0x1319101
cmp dword [esi + 0x24], edi
je 0x1319101
push 0x2c
call fcn.0103e496
pop ecx
test eax, eax
je 0x1318ec3
push dword [esi + 0x24]
mov ecx, eax
call fcn.013185f9
mov dword [ebp - 4], eax
jmp 0x1318ec6
and dword [ebp - 4], edi
cmp dword [ebp - 4], edi
jne 0x1318ed5
mov esi, 0x8007000e
jmp 0x131911a
mov eax, dword [ebx]
push 0
lea ecx, [ebp - 0x10]
push ecx
mov ecx, ebx
call dword [eax + 0x14]
mov esi, eax
test esi, esi
jne 0x131910d
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.0103e496
pop ecx
mov dword [ebp - 0x14], eax
test eax, eax
je 0x1318f89
mov edx, dword [ebx]
push eax
lea eax, [ebp - 0x10]
push eax
mov ecx, ebx
call dword [edx + 0x14]
mov esi, eax
test esi, esi
jne 0x131910d
mov eax, dword [ebp - 0x14]
mov ecx, 0x1032110
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1318f4f
test dx, dx
je 0x1318f4b
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1318f4f
add eax, 4
add ecx, 4
test dx, dx
jne 0x1318f29
xor eax, eax
jmp 0x1318f54
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x13190fa
mov eax, dword [ebx]
push 0
lea ecx, [ebp - 0xc]
push ecx
mov ecx, ebx
call dword [eax + 0x1c]
mov esi, eax
test esi, esi
jne 0x131910d
mov eax, dword [ebp - 0xc]
add eax, 0xc
push eax
mov dword [ebp - 0x1c], eax
call fcn.0103e496
mov edi, eax
pop ecx
test edi, edi
jne 0x1318f93
mov esi, 0x8007000e
jmp 0x131910d
xor eax, eax
mov word [edi + 2], ax
mov eax, dword [ebp + 8]
lea ebx, [edi + 0xc]
mov byte [edi], 1
mov byte [edi + 1], 2
mov ecx, 0x10320b8
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1318fd1
test dx, dx
je 0x1318fcd
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1318fd1
add eax, 4
add ecx, 4
test dx, dx
jne 0x1318fab
xor eax, eax
jmp 0x1318fd6
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x1318ff0
mov eax, dword [ebp - 4]
mov dword [edi + 4], 0x660e
mov dword [eax + 8], 1
jmp 0x1319086
mov eax, dword [ebp + 8]
mov ecx, 0x1032060
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x131901e
test dx, dx
je 0x131901a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x131901e
add eax, 4
add ecx, 4
test dx, dx
jne 0x1318ff8
xor eax, eax
jmp 0x1319023
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x131903a
mov eax, dword [ebp - 4]
mov dword [edi + 4], 0x660f
mov dword [eax + 8], 2
jmp 0x1319086
mov eax, dword [ebp + 8]
mov ecx, 0x1032008
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1319068
test dx, dx
je 0x1319064
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1319068
add eax, 4
add ecx, 4
test dx, dx
jne 0x1319042
xor eax, eax
jmp 0x131906d
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x13190fa
mov eax, dword [ebp - 4]
mov dword [edi + 4], 0x6610
mov dword [eax + 8], 3
mov ecx, dword [ebp + 0xc]
push ebx
lea edx, [ebp - 0xc]
mov dword [edi + 8], 0xa400
mov eax, dword [ecx]
push edx
call dword [eax + 0x1c]
mov esi, eax
test esi, esi
jne 0x131910d
push dword [ebp - 0xc]
push ebx
mov ebx, dword [ebp - 0x18]
mov ecx, ebx
call fcn.01317bcc
mov esi, eax
test esi, esi
jne 0x131910d
lea eax, [ebp - 8]
push eax
push 0x40
push dword [ebx + 0x20]
push dword [ebp - 0x1c]
push edi
push dword [ebx + 0x24]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x13190e6
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x13190e2
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
jmp 0x131910d
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov dword [eax + 0x20], ecx
mov ecx, dword [ebp + 0x10]
and dword [ebp - 8], 0
mov dword [ecx], eax
jmp 0x131911a
mov esi, 0x80049e5b
jmp 0x131910d
mov esi, 0x80049e51
jmp 0x131911a
mov esi, 0x80070057
mov eax, dword [ebp - 4]
test eax, eax
je 0x131911a
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push dword [ebp - 0x14]
call fcn.0103e4a5
push edi
call fcn.0103e4a5
cmp dword [ebp - 8], 0
pop ecx
pop ecx
je 0x1319139
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0xc