Function at 0x1005a805
Capabilities:
Encrypt data via sspi

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x4c
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x10]
cmp dword [edi], 2
jne 0x1005a838
add edi, 4
mov ecx, esi
mov edx, edi
push ebx
push dword [ebp + 0x14]
push eax
call sym.__LT_tokio..net..tcp..stream..TcpStream_u20_as_u20_tokio..io..async_write..AsyncWrite_GT_::poll_write::h006597ac88e679b9
add esp, 0xc
jmp 0x1005a9a6
lea esi, [ebp - 0x40]
mov edx, edi
mov dword [edi + 0xa0], eax
mov ecx, esi
call sym.schannel::tls_stream::TlsStream_LT_S_GT_::initialize::h09b58c694f20cd72
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov edx, dword [esi + 8]
cmp eax, 2
je 0x1005a98c
test eax, eax
je 0x1005a985
mov esi, ecx
mov eax, dword [edi + 0x48]
mov ecx, dword [edi + 0x38]
xor ecx, eax
or ecx, dword [edi + 0x3c]
jne 0x1005a9d2
mov ecx, dword [ebp - 0x34]
cmp ebx, ecx
cmovb ecx, ebx
mov ebx, ecx
mov ecx, esi
add ecx, ebx
mov dword [ebp - 0x10], ebx
add edx, ecx
mov ebx, ecx
cmp eax, edx
jae 0x1005a89a
lea ecx, [edi + 0x40]
call sym.alloc::vec::Vec_LT_T_C_A_GT_::resize::h319274c7255c9d6c
mov eax, dword [edi + 0x48]
mov ecx, dword [edi + 0x44]
mov edx, eax
push 0x101b90a0
push ebx
push esi
call sym.__LT_alloc..vec..Vec_LT_T_C_A_GT__u20_as_u20_core..ops..index..IndexMut_LT_I_GT__GT_::index_mut::h48cc404eb18754f6
add esp, 0xc
mov ecx, eax
push 0x101b90b0
push dword [ebp - 0x10]
push dword [ebp + 0x14]
call sym.core::slice::__LT_impl_u20__u5b_T_u5d__GT_::copy_from_slice::h077a5a2d401f045f
add esp, 0xc
mov ecx, dword [edi + 0x44]
mov edx, dword [edi + 0x48]
push 0x101b90c0
push esi
call sym.__LT_alloc..vec..Vec_LT_T_C_A_GT__u20_as_u20_core..ops..index..IndexMut_LT_I_GT__GT_::index_mut::hb34d9ff47b0a8358
pop ecx
pop ecx
test eax, eax
mov ecx, dword [edi + 0x44]
mov dword [ebp - 0x4c], eax
cmove edx, eax
mov dword [ebp - 0x48], edx
mov edx, dword [edi + 0x48]
push 0x101b90d0
push ebx
push esi
call sym.__LT_alloc..vec..Vec_LT_T_C_A_GT__u20_as_u20_core..ops..index..IndexMut_LT_I_GT__GT_::index_mut::h48cc404eb18754f6
add esp, 0xc
mov esi, edx
mov ecx, dword [edi + 0x44]
mov edx, dword [edi + 0x48]
test eax, eax
mov dword [ebp - 0x44], eax
cmove esi, eax
push 0x101b90e0
push ebx
call sym.__LT_alloc..vec..Vec_LT_T_C_A_GT__u20_as_u20_core..ops..index..IndexMut_LT_I_GT__GT_::index_mut::h1094b8a2c4053b3d
pop ecx
pop ecx
mov ecx, dword [ebp - 0x48]
test eax, eax
cmove edx, eax
and dword [ebp - 0x1c], 0
and dword [ebp - 0x18], 0
and dword [ebp - 0x14], 0
mov dword [ebp - 0x40], ecx
mov ecx, dword [ebp - 0x4c]
mov dword [ebp - 0x3c], 7
mov dword [ebp - 0x38], ecx
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], 1
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], 6
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x58]
lea ecx, [ebp - 0x40]
and dword [eax], 0
mov dword [eax + 4], 4
mov dword [eax + 8], ecx
lea ecx, [edi + 0x68]
push 0
push eax
push 0
push ecx
call sub.secur32.dll_EncryptMessage
test eax, eax
je 0x1005a9b0
and dword [ebp - 0x40], 0
mov esi, dword [ebp + 8]
mov dword [ebp - 0x3c], eax
jmp 0x1005a995
mov edx, 0x80090317
xor ecx, ecx
mov esi, dword [ebp + 8]
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], edx
lea edx, [ebp - 0x40]
mov ecx, esi
call sym.tokio_tls::cvt::h599fae3395203a5a
and dword [edi + 0xa0], 0
mov eax, esi
add esp, 0x4c
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [ebp - 0x34]
add eax, dword [ebp - 0x40]
add eax, dword [ebp - 0x28]
cmp dword [edi + 0x48], eax
jb 0x1005a9c1
mov dword [edi + 0x48], eax
mov eax, dword [ebp - 0x10]
and dword [edi + 0x3c], 0
and dword [edi + 0x38], 0
mov dword [edi + 0xc4], eax
lea esi, [ebp - 0x40]
mov edx, edi
mov ecx, esi
call sym.schannel::tls_stream::TlsStream_LT_S_GT_::write_out::h5cc72b579a1f4d01
cmp byte [esi], 4
jne 0x1005a9e8
mov esi, dword [ebp + 8]
jmp 0x1005a9f2
mov eax, dword [ebp - 0x40]
mov esi, dword [ebp + 8]
cmp al, 4
jne 0x1005aa01
mov eax, dword [edi + 0xc4]
mov dword [ebp - 0x3c], eax
mov byte [ebp - 0x40], 4
jmp 0x1005a995
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], ecx
jmp 0x1005a995