Function at 0x40c680
Capabilities:
Encode data using base64 via winapi
Hash data via bcrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4dfff6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x34
push edi
mov ecx, 0x5133b4
mov dword [ebp - 0x30], 0
call fcn.004ba18d
mov edi, dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x2c], eax
shr eax, 3
mov dword [ebp - 0x28], eax
test eax, eax
jne 0x40c6e3
mov eax, dword [ebp + 8]
pop edi
mov dword [eax], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push esi
xor esi, esi
mov dword [ebp - 4], 0
push esi
push esi
push 0x4e7a54
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x24], 0
push eax
mov dword [ebp - 0x30], 4
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x10], esi
call sub.bcrypt.dll_BCryptOpenAlgorithmProvider
test eax, eax
js 0x40c7aa
push esi
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], esi
push eax
push dword [ebp - 0x1c]
mov dword [ebp - 0x10], esi
call sub.bcrypt.dll_BCryptCreateHash
test eax, eax
js 0x40c7a0
push esi
push dword [ebp - 0x2c]
mov dword [ebp - 0x10], esi
push edi
push dword [ebp - 0x14]
call sub.bcrypt.dll_BCryptHashData
test eax, eax
js 0x40c798
push 0x10
call fcn.004ba212
mov edi, eax
add esp, 4
test edi, edi
je 0x40c764
xorps xmm0, xmm0
movups xmmword [edi], xmm0
jmp 0x40c766
xor edi, edi
push 0
push 0x10
push edi
push dword [ebp - 0x14]
mov esi, edi
mov dword [ebp - 0x10], esi
call sub.bcrypt.dll_BCryptFinishHash
test eax, eax
jns 0x40c798
xor esi, esi
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x10], esi
test edi, edi
je 0x40c798
push edi
call fcn.004ba21b
add esp, 4
mov dword [ebp - 0x10], esi
push dword [ebp - 0x14]
call sub.bcrypt.dll_BCryptDestroyHash
push 0
push dword [ebp - 0x1c]
call sub.bcrypt.dll_BCryptCloseAlgorithmProvider
mov dword [ebp - 0x38], esi
mov byte [ebp - 4], 2
test esi, esi
jne 0x40c7ca
mov eax, dword [ebp + 8]
mov dword [eax], esi
pop esi
pop edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 4]
xor edi, edi
mov edx, dword [esi]
or eax, 1
mov dword [ebp - 0x34], eax
or edx, 1
xor eax, eax
mov dword [ebp - 0x2c], edx
xor esi, esi
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x28], eax
jbe 0x40c8f3
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx + eax*8]
add edi, ecx
mov eax, dword [ebp - 0x20]
add eax, ecx
mov ecx, dword [ebp - 0x18]
imul eax, edx
rol eax, 0x10
imul eax, eax, 0xcf98b111
rol eax, 0x10
imul eax, eax, 0x87085b9f
rol eax, 0x10
imul eax, eax, 0x12ceb96d
rol eax, 0x10
imul edx, eax, 0x257e1d83
mov eax, edi
imul edi, dword [ebp - 0x2c]
rol eax, 0x10
imul eax, eax, 0x10fa9605
add esi, edx
mov dword [ebp - 0x1c], esi
sub edi, eax
mov eax, edi
shr eax, 0x10
imul esi, eax, 0x689b6b9f
imul eax, edi, 0x79f8a395
add esi, eax
mov eax, esi
rol eax, 0x10
imul eax, eax, 0xc3efea97
add esi, eax
mov eax, dword [ebp + 0xc]
add dword [ebp - 0x14], esi
mov ecx, dword [eax + ecx*8 + 4]
add esi, ecx
lea eax, [ecx + edx]
mov ecx, dword [ebp - 0x18]
imul eax, dword [ebp - 0x34]
inc ecx
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x18], ecx
rol eax, 0x10
imul eax, eax, 0xa27416f5
rol eax, 0x10
imul eax, eax, 0xd38396ff
rol eax, 0x10
imul eax, eax, 0x7c932b89
rol eax, 0x10
imul eax, eax, 0xbfa49f69
add dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
mov eax, esi
imul esi, dword [ebp - 0x34]
rol eax, 0x10
imul eax, eax, 0x3ce8ec25
sub esi, eax
mov eax, esi
imul edi, esi, 0x59c3af2d
mov esi, dword [ebp - 0x1c]
shr eax, 0x10
imul eax, eax, 0x2232e0f1
sub edi, eax
mov eax, edi
rol eax, 0x10
imul eax, eax, 0x35bd1ec9
add edi, eax
mov eax, dword [ebp - 0x14]
add eax, edi
mov dword [ebp - 0x14], eax
cmp ecx, dword [ebp - 0x28]
jl 0x40c7f7
xor edi, dword [ebp - 0x20]
xor eax, esi
mov dword [ebp - 0x3c], eax
lea eax, [ebp + 0xc]
push eax
push 0
push 0x40000001
push 8
lea eax, [ebp - 0x40]
mov dword [ebp - 0x40], edi
mov edi, dword [sym.imp.CRYPT32.dll_CryptBinaryToStringW]
push eax
mov dword [ebp + 0xc], 0
call edi
test eax, eax
je 0x40c96c
push dword [ebp + 0xc]
lea eax, [ebp - 0x34]
push eax
call fcn.0040c040
add esp, 8
mov esi, dword [eax]
mov dword [eax], 0
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40c949
push eax
call fcn.004ba21b
add esp, 4
lea eax, [ebp + 0xc]
push eax
push esi
push 0x40000001
push 8
lea eax, [ebp - 0x40]
push eax
call edi
test eax, eax
jne 0x40c96e
test esi, esi
je 0x40c96c
push esi
call fcn.004ba21b
add esp, 4
xor esi, esi
mov edi, dword [ebp + 8]
push dword [ebp - 0x10]
mov dword [edi], esi
call fcn.004ba21b
mov ecx, dword [ebp - 0xc]
add esp, 4
mov eax, edi
mov dword fs:[0], ecx
pop esi
pop edi
mov esp, ebp
pop ebp
ret