Function at 0x46d791
Capabilities:
Encrypt data via sspi

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x50
mov eax, dword [esp + 0x64]
lea ebx, [esp + 8]
mov edi, ecx
mov esi, edx
mov ecx, ebx
mov dword [edx + 0x78], eax
call fcn.0046d9f6
mov eax, dword [ebx]
cmp eax, 2
jne 0x46d7d3
mov ebx, dword [esp + 0xc]
mov ebp, dword [esp + 0x10]
cmp bl, 4
mov dword [esp + 8], ebx
mov dword [esp + 0xc], ebp
jne 0x46d950
jmp 0x46d9c6
test eax, eax
je 0x46d93c
mov eax, dword [esi + 0x40]
mov dword [esp + 4], edi
xor eax, dword [esi + 0x50]
or eax, dword [esi + 0x44]
jne 0x46d99b
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x6c]
mov edi, dword [esp + 0x14]
mov edx, dword [esp + 0x68]
mov ebp, dword [esp + 0x10]
mov dword [esp + 0x40], ecx
cmp eax, edi
mov ecx, edi
cmovb ecx, eax
mov dword [esp + 0x38], ecx
push 0x53c060
push eax
call fcn.004558a3
pop ecx
pop ecx
cmp edi, edx
jb 0x46d9e1
mov edi, dword [esp + 0x40]
mov dword [esp], eax
mov eax, edx
mov ebx, edx
mov edx, dword [esi + 0x50]
add eax, edi
add ebp, eax
cmp edx, ebp
jae 0x46d84d
mov edx, ebp
lea ecx, [esi + 0x48]
mov ebp, eax
call fcn.00417c03
mov edx, dword [esi + 0x50]
mov eax, ebp
mov ecx, dword [esi + 0x4c]
push 0x53c63c
push eax
push edi
mov ebp, eax
call fcn.004a1e6c
add esp, 0xc
mov ecx, eax
push ebx
push dword [esp + 4]
call fcn.0049eaed
pop eax
pop ecx
mov ecx, dword [esi + 0x4c]
mov edx, dword [esi + 0x50]
push 0x53c65c
push edi
call fcn.0046d6f7
pop ecx
pop ecx
test eax, eax
mov ecx, dword [esi + 0x4c]
mov dword [esp], eax
cmove edx, eax
mov dword [esp + 0x3c], edx
mov edx, dword [esi + 0x50]
push 0x53c66c
push ebp
push edi
call fcn.004a1e6c
add esp, 0xc
mov edi, edx
mov ecx, dword [esi + 0x4c]
mov edx, dword [esi + 0x50]
test eax, eax
mov ebx, eax
cmove edi, eax
push 0x53c67c
push ebp
call fcn.0046d740
pop ecx
pop ecx
mov ecx, dword [esp + 0x3c]
test eax, eax
cmove edx, eax
and dword [esp + 0x2c], 0
and dword [esp + 0x30], 0
and dword [esp + 0x34], 0
mov dword [esp + 8], ecx
mov ecx, dword [esp]
mov dword [esp + 0xc], 7
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], 6
mov dword [esp + 0x28], eax
lea eax, [esp + 0x44]
lea ecx, [esp + 8]
and dword [eax], 0
mov dword [eax + 4], 4
mov dword [eax + 8], ecx
push 0
push eax
push 0
push esi
call dword [sym.imp.secur32.dll_EncryptMessage]
test eax, eax
je 0x46d975
mov edi, dword [esp + 4]
mov ebp, eax
xor ebx, ebx
jmp 0x46d7bd
and dword [esp + 8], 0
mov ebp, 0x80090317
xor ebx, ebx
mov dword [esp + 0xc], 0x80090317
lea ecx, [esp + 8]
call fcn.0046cad4
cmp al, 0xd
jne 0x46d971
and dword [esi + 0x78], 0
lea eax, [esp + 8]
mov byte [edi], 5
push eax
call fcn.00441d62
pop eax
jmp 0x46d9d0
mov dword [edi], ebx
jmp 0x46d9c9
mov eax, dword [esp + 0x14]
add eax, dword [esp + 8]
add eax, dword [esp + 0x20]
cmp dword [esi + 0x50], eax
jb 0x46d989
mov dword [esi + 0x50], eax
mov eax, dword [esp + 0x38]
and dword [esi + 0x44], 0
and dword [esi + 0x40], 0
mov dword [esi + 0xa0], eax
lea edi, [esp + 8]
mov edx, esi
mov ecx, edi
call fcn.0046e4a8
cmp byte [edi], 4
jne 0x46d9b3
mov edi, dword [esp + 4]
jmp 0x46d9c0
mov ebx, dword [esp + 8]
mov edi, dword [esp + 4]
cmp bl, 4
jne 0x46d9d8
mov ebp, dword [esi + 0xa0]
mov byte [edi], 4
and dword [esi + 0x78], 0
mov dword [edi + 4], ebp
add esp, 0x50
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebp, dword [esp + 0xc]
jmp 0x46d7bd
push 0x3e
pop edx
mov ecx, str.assertion_failed:_buf.len_____sizes.cbMaximumMessage_as_usize
push 0x53c62c
call fcn.0050af40
pop eax
ud2