Function at 0x6fb09997
Capabilities:
Encrypt or decrypt via wincrypt
Generate random numbers via winapi
Hash data via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
push ebx
xor ebx, ebx
test byte [ebp + 0x2c], 4
push esi
push edi
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x1c], 0x14
mov dword [ebp - 0x14], ebx
je 0x6fb099d8
lea eax, [ebp - 0x24]
push ebx
push eax
mov eax, dword [0x6fb12240]
push dword [ebp + 8]
mov dword [ebp - 0x24], 1
call dword [eax + 0xc]
push 0x6fb120f4
push dword [0x6fb120f0]
push 0x6fb120ec
push dword [0x6fb120e8]
push dword [0x6fb120e4]
call fcn.6fb0a64c
mov edi, eax
cmp edi, ebx
je 0x6fb09d71
lea eax, [ebp - 0x20]
push ebx
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x54]
push eax
push dword [ebp + 8]
call fcn.6fb0a7d3
mov esi, eax
cmp esi, ebx
jne 0x6fb09d8f
lea eax, [ebp - 0x68]
push eax
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call fcn.6fb0cd04
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
lea eax, [ebp - 0x34]
push eax
push 0x10
push edi
call ebx
test eax, eax
je 0x6fb09d71
lea eax, [ebp - 4]
push eax
push 0x8004
push edi
lea eax, [ebp - 0x34]
push 0x10
push eax
lea eax, [ebp - 0x68]
push 0x14
push eax
call fcn.6fb0a311
test eax, eax
je 0x6fb09d71
cmp dword [ebp + 0x20], 0
je 0x6fb09a8a
push 0
push dword [ebp + 0x24]
push dword [ebp + 0x20]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x6fb09d71
lea eax, [ebp - 0xc]
push eax
push 4
push dword [ebp - 4]
push dword [0x6fb120e8]
push edi
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
je 0x6fb09d71
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0xc]
push edi
call fcn.6fb0a45d
mov esi, eax
test esi, esi
jne 0x6fb09d8f
lea eax, [ebp - 0x44]
push eax
push 0x10
push edi
call ebx
test eax, eax
je 0x6fb09d71
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x44]
push dword [0x6fb120f0]
push edi
push 0x10
push eax
lea eax, [ebp - 0x68]
push 0x14
push eax
call fcn.6fb0a311
test eax, eax
je 0x6fb09d71
cmp dword [ebp + 0x20], esi
je 0x6fb09b1e
push esi
push dword [ebp + 0x24]
push dword [ebp + 0x20]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x6fb09d71
mov eax, dword [ebp + 0x18]
mov ebx, dword [sym.imp.KERNEL32.dll_LocalAlloc]
add eax, 0x10
push eax
push esi
mov dword [ebp + 0x20], eax
call ebx
test eax, eax
mov dword [ebp - 0x10], eax
jne 0x6fb09b3f
push 0xe
jmp 0x6fb09cca
mov ecx, dword [ebp + 0x18]
mov esi, dword [ebp + 0x14]
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
cmp dword [ebp + 0x1c], 0
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp + 0x10]
mov dword [esi], 0x18
jne 0x6fb09b68
xor eax, eax
jmp 0x6fb09b75
push dword [ebp + 0x1c]
call fcn.6fb0d464
pop ecx
lea eax, [eax + eax + 2]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0x20]
add ecx, edx
lea eax, [ecx + eax + 0x5c]
add dword [esi], eax
push dword [esi]
push 0
call ebx
mov ecx, dword [ebp + 0xc]
mov ebx, eax
lea esi, [ebp - 0x54]
mov dword [ecx], eax
mov dword [ebx], 1
add ebx, 4
mov eax, dword [ebp + 0x2c]
mov edi, ebx
add ebx, 0x10
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [ebp + 0x1c]
mov dword [ebx], eax
mov dword [ebp + 8], ebx
add ebx, 4
test esi, esi
jne 0x6fb09bbb
xor eax, eax
jmp 0x6fb09bc6
push esi
call fcn.6fb0d464
pop ecx
lea eax, [eax + eax + 2]
mov dword [ebx], eax
add ebx, 4
test esi, esi
jne 0x6fb09bd3
xor ecx, ecx
jmp 0x6fb09bde
push esi
call fcn.6fb0d464
pop ecx
lea ecx, [eax + eax + 2]
mov eax, ecx
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
cmp dword [ebp + 0x1c], eax
rep movsb byte es:[edi], byte [esi]
je 0x6fb09c02
push dword [ebp + 0x1c]
call fcn.6fb0d464
pop ecx
lea eax, [eax + eax + 2]
add ebx, eax
mov eax, dword [0x6fb120e8]
push 4
lea esi, [ebp - 0x34]
pop ecx
mov dword [ebx], eax
mov eax, dword [0x6fb120ec]
add ebx, ecx
push 0x10
mov dword [ebx], eax
add ebx, ecx
pop eax
mov dword [ebx], eax
add ebx, ecx
mov edi, ebx
add ebx, eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edx, dword [ebp - 8]
mov dword [ebx], edx
mov esi, dword [ebp - 0x18]
add ebx, ecx
mov ecx, dword [ebp - 8]
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add ebx, dword [ebp - 8]
mov ecx, dword [0x6fb120f0]
lea esi, [ebp - 0x44]
mov dword [ebx], ecx
mov ecx, dword [0x6fb120f4]
add ebx, 4
mov dword [ebx], ecx
add ebx, 4
mov ecx, dword [ebp + 0x2c]
mov dword [ebx], eax
add ebx, 4
mov edi, ebx
and ecx, 3
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
add ebx, eax
cmp cl, 1
movsd dword es:[edi], dword [esi]
jne 0x6fb09cd0
mov ecx, dword [ebp + 0x28]
test ecx, ecx
je 0x6fb09c91
cmp dword [ecx], eax
jne 0x6fb09c91
mov eax, dword [ecx + 4]
test eax, 0xfffffffe
je 0x6fb09c95
push 0x57
jmp 0x6fb09cca
mov edx, eax
and edx, 2
cmp dl, 2
jne 0x6fb09cd0
test al, 1
je 0x6fb09cad
mov esi, 0x52d
jmp 0x6fb09d8f
push 0x240001
push 0x6fb01728
push dword [ecx + 0xc]
push dword [ecx + 8]
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 1
je 0x6fb09cd0
push 5
pop esi
jmp 0x6fb09d8f
mov edi, dword [ebp + 0x20]
lea eax, [ebp + 0x18]
push edi
push eax
push dword [ebp - 0x10]
push 0
push 1
push 0
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x6fb09d1f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0x80090010
jne 0x6fb09d8f
call fcn.6fb08906
test eax, eax
jne 0x6fb09d8f
mov eax, dword [ebp + 0x2c]
mov ecx, dword [ebp + 8]
or eax, 0x10000000
mov dword [ecx], eax
mov dword [ebp + 0x18], edi
mov eax, dword [ebp + 0x18]
mov esi, dword [ebp - 0x10]
mov ecx, eax
mov dword [ebx], eax
add ebx, 4
mov edx, ecx
mov edi, ebx
add ebx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp + 0xc]
mov ecx, ebx
mov eax, dword [esi]
sub ecx, eax
push ecx
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x6fb09d71
lea eax, [ebp - 0x1c]
add ebx, 4
push 0
push eax
push ebx
push 2
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
jne 0x6fb09d7b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x6fb09d8f
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp + 0x10]
mov dword [ebx - 4], eax
mov eax, dword [ebp - 0x1c]
add eax, ebx
sub eax, dword [esi]
xor esi, esi
mov dword [ecx], eax
xor eax, eax
lea edi, [ebp - 0x68]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
lea edi, [ebp - 0x34]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFree]
stosd dword es:[edi], eax
mov edi, dword [ebp - 0x14]
test edi, edi
je 0x6fb09dc7
mov ecx, dword [ebp - 0x20]
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
push dword [ebp - 0x14]
call ebx
xor edi, edi
cmp dword [ebp - 0xc], edi
je 0x6fb09dd7
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
cmp dword [ebp - 4], edi
je 0x6fb09de5
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
cmp dword [ebp - 0x10], edi
je 0x6fb09def
push dword [ebp - 0x10]
call ebx
cmp dword [ebp - 0x18], edi
je 0x6fb09df9
push dword [ebp - 0x18]
call ebx
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0x28