Function at 0x1002b849
Capabilities:
Encrypt or decrypt data via bcrypt

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
xor eax, eax
mov ebx, edx
push edi
mov edi, ecx
mov dword [ebp - 0x10], eax
xor edx, edx
mov dword [ebp - 4], edi
mov esi, eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x14], eax
call fcn.10006785
mov eax, dword [section..data]
cmp eax, section..data
je 0x1002b8a0
test byte [eax + 0x1c], 2
je 0x1002b8a0
cmp byte [eax + 0x19], 5
jb 0x1002b8a0
push ecx
push dword [eax + 0x14]
mov edx, 0x10004d4c
mov ecx, 0x117
push dword [eax + 0x10]
call fcn.100068c8
test edi, edi
jne 0x1002b8f5
push 2
pop edx
call fcn.10006785
mov esi, 0x80100004
mov eax, dword [section..data]
cmp eax, section..data
je 0x1002bced
test byte [eax + 0x1c], 1
je 0x1002bced
cmp byte [eax + 0x19], 2
jb 0x1002bced
push 0x10001b5c
push ecx
mov ecx, 0x118
push dword [eax + 0x14]
mov edx, 0x10004d4c
push dword [eax + 0x10]
call fcn.1000696c
jmp 0x1002bced
test ebx, ebx
jne 0x1002b937
push 2
pop edx
call fcn.10006785
mov esi, 0x80100004
mov eax, dword [section..data]
cmp eax, section..data
je 0x1002bced
test byte [eax + 0x1c], 1
je 0x1002bced
cmp byte [eax + 0x19], 2
jb 0x1002bced
push 0x10002e08
push ecx
mov ecx, 0x119
jmp 0x1002b8e0
cmp dword [ebp + 8], esi
jne 0x1002b97d
push 2
pop edx
call fcn.10006785
mov esi, 0x80100004
mov eax, dword [section..data]
cmp eax, section..data
je 0x1002bced
test byte [eax + 0x1c], 1
je 0x1002bced
cmp byte [eax + 0x19], 2
jb 0x1002bced
push 0x10002e1c
push ecx
mov ecx, 0x11a
jmp 0x1002b8e0
cmp dword [ebp + 0xc], esi
jne 0x1002b9c3
push 2
pop edx
call fcn.10006785
mov esi, 0x80100004
mov eax, dword [section..data]
cmp eax, section..data
je 0x1002bced
test byte [eax + 0x1c], 1
je 0x1002bced
cmp byte [eax + 0x19], 2
jb 0x1002bced
push 0x10004c30
push ecx
mov ecx, 0x11b
jmp 0x1002b8e0
cmp dword [ebp + 0x10], esi
jne 0x1002ba09
push 2
pop edx
call fcn.10006785
mov esi, 0x80100004
mov eax, dword [section..data]
cmp eax, section..data
je 0x1002bced
test byte [eax + 0x1c], 1
je 0x1002bced
cmp byte [eax + 0x19], 2
jb 0x1002bced
push 0x10004c4c
push ecx
mov ecx, 0x11c
jmp 0x1002b8e0
push 0
push 0x10004c68
push 0x10004ca4
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
mov edi, eax
test edi, edi
jns 0x1002ba78
push 2
pop edx
call fcn.10006785
mov eax, 0x8010001f
mov esi, eax
mov ecx, dword [section..data]
cmp ecx, section..data
je 0x1002bced
test byte [ecx + 0x1c], 1
je 0x1002bced
cmp byte [ecx + 0x19], 2
jb 0x1002bced
push eax
push edi
push 0x10004cb0
push ecx
push ecx
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0x11d
call fcn.10025187
jmp 0x1002bced
push 0
push dword [ebp + 8]
lea eax, [ebp - 0xc]
push ebx
push 0
push 0
push eax
push dword [ebp - 0x10]
call dword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
mov edi, eax
mov ebx, 0xc000000d
cmp edi, ebx
jne 0x1002bae1
push 2
pop edx
call fcn.10006785
mov esi, 0x80100004
mov eax, dword [section..data]
cmp eax, section..data
je 0x1002bced
test byte [eax + 0x1c], 1
je 0x1002bced
cmp byte [eax + 0x19], 2
jb 0x1002bced
push esi
push ebx
push 0x10004cf4
push ecx
push ecx
push dword [eax + 0x14]
mov ecx, 0x11e
push dword [eax + 0x10]
jmp 0x1002ba6e
test edi, edi
jns 0x1002bb33
push 2
pop edx
call fcn.10006785
mov eax, 0x8010001f
mov esi, eax
mov ecx, dword [section..data]
cmp ecx, section..data
je 0x1002bced
test byte [ecx + 0x1c], 1
je 0x1002bced
cmp byte [ecx + 0x19], 2
jb 0x1002bced
push eax
push edi
push 0x10004cf4
push ecx
push ecx
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0x11f
jmp 0x1002ba6e
push 0
lea eax, [ebp - 0x14]
push eax
push 4
lea eax, [ebp - 8]
push eax
push 0x10004d10
push dword [ebp - 0xc]
call dword [sym.imp.bcrypt.dll_BCryptGetProperty]
mov edi, eax
test edi, edi
jns 0x1002bba1
push 2
pop edx
call fcn.10006785
mov eax, 0x8010001f
mov esi, eax
mov ecx, dword [section..data]
cmp ecx, section..data
je 0x1002bced
test byte [ecx + 0x1c], 1
je 0x1002bced
cmp byte [ecx + 0x19], 2
jb 0x1002bced
push eax
push edi
push 0x10004d28
push ecx
push ecx
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0x120
jmp 0x1002ba6e
cmp dword [ebp - 0x14], 4
je 0x1002bbfd
push 2
pop edx
call fcn.10006785
mov eax, 0x8010001f
mov esi, eax
mov ecx, dword [section..data]
cmp ecx, section..data
je 0x1002bced
test byte [ecx + 0x1c], 1
je 0x1002bced
cmp byte [ecx + 0x19], 2
jb 0x1002bced
push eax
push 0x10004ccc
push ecx
push dword [ecx + 0x14]
mov edx, 0x10004d4c
push dword [ecx + 0x10]
mov ecx, 0x121
call fcn.100069e8
jmp 0x1002bced
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 4]
call fcn.10025214
mov edi, eax
test edi, edi
jne 0x1002bc58
push 2
pop edx
call fcn.10006785
push 8
pop esi
mov eax, dword [section..data]
cmp eax, section..data
je 0x1002bced
test byte [eax + 0x1c], 1
je 0x1002bced
cmp byte [eax + 0x19], 2
jb 0x1002bced
push ecx
push dword [eax + 0x14]
mov edx, 0x10004d4c
mov ecx, 0x122
push dword [eax + 0x10]
call fcn.100068c8
jmp 0x1002bced
push dword [ebp - 8]
push 0
push edi
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x14]
push 0
push eax
push dword [ebp - 8]
push edi
push 0
push 0
push 0
push dword [ebp - 8]
push edi
push dword [ebp - 0xc]
call dword [sym.imp.bcrypt.dll_BCryptEncrypt]
mov ebx, eax
test ebx, ebx
jns 0x1002bd57
push 2
pop edx
call fcn.10006785
mov eax, 0x8010001f
mov esi, eax
mov ecx, dword [section..data]
cmp ecx, section..data
je 0x1002bccf
test byte [ecx + 0x1c], 1
je 0x1002bccf
cmp byte [ecx + 0x19], 2
jb 0x1002bccf
push eax
push ebx
push 0x10004d3c
push ecx
push ecx
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0x123
call fcn.10025187
mov ebx, dword [ebp - 4]
mov eax, dword [ebp - 8]
mov ecx, edi
test eax, eax
je 0x1002bce4
mov byte [ecx], 0
inc ecx
sub eax, 1
jne 0x1002bcdb
mov edx, edi
mov ecx, ebx
call fcn.10025232
cmp dword [ebp - 0xc], 0
je 0x1002bd00
push dword [ebp - 0xc]
call dword [sym.imp.bcrypt.dll_BCryptDestroyKey]
and dword [ebp - 0xc], 0
cmp dword [ebp - 0x10], 0
je 0x1002bd15
push 0
push dword [ebp - 0x10]
call dword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
and dword [ebp - 0x10], 0
xor edx, edx
inc edx
call fcn.10006785
mov ecx, dword [section..data]
cmp ecx, section..data
je 0x1002bd4e
test byte [ecx + 0x1c], 2
je 0x1002bd4e
cmp byte [ecx + 0x19], 5
jb 0x1002bd4e
push esi
push ecx
push dword [ecx + 0x14]
mov edx, 0x10004d4c
push dword [ecx + 0x10]
mov ecx, 0x126
call fcn.10006917
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0xc
cmp dword [ebp - 0x14], 3
jae 0x1002bdb3
push 2
pop edx
call fcn.10006785
mov eax, 0x8010001f
mov esi, eax
mov ecx, dword [section..data]
cmp ecx, section..data
je 0x1002bccf
test byte [ecx + 0x1c], 1
je 0x1002bccf
cmp byte [ecx + 0x19], 2
jb 0x1002bccf
push eax
push 0x10004ccc
push ecx
push dword [ecx + 0x14]
mov edx, 0x10004d4c
push dword [ecx + 0x10]
mov ecx, 0x124
call fcn.100069e8
jmp 0x1002bccf
mov ebx, dword [ebp - 4]
mov ecx, ebx
push 3
pop edx
call fcn.10025214
mov ecx, eax
test ecx, ecx
jne 0x1002be10
push 2
pop edx
call fcn.10006785
push 8
pop esi
mov eax, dword [section..data]
cmp eax, section..data
je 0x1002bcd2
test byte [eax + 0x1c], 1
je 0x1002bcd2
cmp byte [eax + 0x19], 2
jb 0x1002bcd2
push ecx
push dword [eax + 0x14]
mov edx, 0x10004d4c
mov ecx, 0x125
push dword [eax + 0x10]
call fcn.100068c8
jmp 0x1002bcd2
mov ax, word [edi]
mov word [ecx], ax
mov al, byte [edi + 2]
mov byte [ecx + 2], al
mov eax, dword [ebp + 0xc]
mov dword [eax], ecx
mov eax, dword [ebp + 0x10]
mov dword [eax], 3
jmp 0x1002bcd2