Function at 0x4671d0
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb4
mov eax, dword [0x5b706c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x58af04
push 0x644
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
mov esi, ecx
mov dword [ebp - 0x9c], 0
push 2
mov edi, 1
mov dword [ebp - 0xac], esi
push esi
xor ebx, ebx
mov dword [ebp - 0x98], edi
call fcn.00475430
add esp, 0x14
cmp dword [esi + 0x2c], ebx
je 0x467cac
mov ecx, dword [esi + 0x40]
test ecx, ecx
je 0x467cac
lea eax, [ecx + 0x90]
mov dword [ebp - 0xa0], eax
test eax, eax
je 0x46724e
mov eax, dword [eax]
test eax, eax
je 0x46724e
mov eax, dword [eax + 4]
jmp 0x467250
xor eax, eax
mov edx, dword [ecx + 8]
mov dword [ebp - 0x8c], edx
mov edx, dword [esi + 0x7c]
mov dword [ebp - 0x94], edx
cmp edx, dword [ecx + 8]
jae 0x46729e
push dword [ebp - 0x8c]
push edx
push str.in_msglen___d____minlen___d_
push 0x651
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
push 1
push esi
call fcn.00475430
add esp, 0x1c
mov eax, 0xffff8e80
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051e9d8
mov esp, ebp
pop ebp
ret
cmp eax, 7
jne 0x467320
mov eax, dword [esi + 0x70]
lea edi, [ebp - 0xa4]
push edi
push eax
push edx
push eax
push dword [ecx + 0xc]
lea edx, [ecx + 0x28]
mov dword [ebp - 0xa4], ebx
mov ecx, dword [ebp - 0xa0]
xor ebx, ebx
call fcn.0047c6d0
mov edi, eax
add esp, 0x14
test edi, edi
je 0x467302
push edi
push str.mbedtls_cipher_crypt
push 0x663
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
lea edx, [ebx + 1]
mov ecx, esi
call fcn.004754f0
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051e9d8
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x7c]
cmp ecx, dword [ebp - 0xa4]
je 0x4679bc
push str.should_never_happen
push 0x669
jmp 0x467cb6
cmp eax, 6
je 0x4677c9
cmp eax, 8
je 0x4677c9
cmp eax, 2
jne 0x4677ba
xor ebx, ebx
mov dword [ebp - 0xa0], ebx
cmp dword [esi + 0x14], eax
jl 0x467355
mov ebx, dword [ecx + 0xc]
mov eax, ebx
mov dword [ebp - 0x8c], ebx
jmp 0x46735e
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0x8c], eax
add eax, ebx
cmp edx, eax
jb 0x4677a4
mov eax, dword [ecx + 0x14]
inc eax
add eax, ebx
cmp edx, eax
jb 0x4677a4
mov eax, dword [esi + 0x70]
mov dword [ebp - 0x98], eax
mov eax, edx
mov edx, dword [esi + 0x2c]
mov dword [ebp - 0x90], eax
cmp dword [edx + 0x80], edi
jne 0x46754b
push str.using_encrypt_then_mac
push 0x6e5
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
push 3
push esi
call fcn.00475430
mov eax, dword [esi + 0x40]
add esp, 0x14
mov ecx, dword [esi + 0x60]
mov edx, dword [esi + 0x7c]
mov ebx, dword [ebp - 0x94]
mov eax, dword [eax + 0x14]
sub ebx, eax
sub edx, eax
mov dword [esi + 0x7c], edx
mov eax, dword [ecx]
mov dword [ebp - 0x24], eax
mov eax, dword [ecx + 4]
mov ecx, dword [esi + 0x64]
mov dword [ebp - 0x20], eax
push 0xd
mov ax, word [ecx]
mov word [ebp - 0x1c], ax
mov al, byte [ecx + 2]
mov ecx, esi
mov byte [ebp - 0x1a], al
mov eax, edx
shr eax, 8
mov byte [ebp - 0x19], al
lea eax, [ebp - 0x24]
push eax
push str.MACd_meta_data
mov byte [ebp - 0x18], dl
mov edx, 4
push 0x6ef
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
call fcn.00475580
mov ecx, dword [esi + 0x40]
lea edx, [ebp - 0x24]
add esp, 0x14
add ecx, 0x44
push 0xd
call fcn.00473350
mov ecx, dword [esi + 0x40]
add esp, 4
mov edx, dword [esi + 0x6c]
add ecx, 0x44
push dword [esi + 0x7c]
call fcn.00473350
mov ecx, dword [esi + 0x40]
lea edx, [ebp - 0x54]
add esp, 4
add ecx, 0x44
call fcn.00473380
mov ecx, dword [esi + 0x40]
add ecx, 0x44
call fcn.00473440
mov eax, dword [esi + 0x40]
mov edx, 4
mov ecx, esi
push dword [eax + 0x14]
mov eax, dword [esi + 0x6c]
add eax, dword [esi + 0x7c]
push eax
push str.message__mac
push 0x6f8
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
call fcn.00475580
mov eax, dword [esi + 0x40]
add esp, 0x14
mov edx, 4
mov ecx, esi
push dword [eax + 0x14]
lea eax, [ebp - 0x54]
push eax
push str.expected_mac
push 0x6fa
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
call fcn.00475580
mov eax, dword [esi + 0x6c]
add esp, 0x14
add eax, dword [esi + 0x7c]
xor edx, edx
mov dword [ebp - 0x8c], eax
mov eax, dword [esi + 0x40]
mov byte [ebp - 0x85], 0
cmp dword [eax + 0x14], edx
jbe 0x4674fa
mov edi, dword [ebp - 0x8c]
lea eax, [ebp - 0x54]
sub edi, eax
nop
lea ecx, [ebp - 0x54]
add ecx, edx
inc edx
movzx eax, byte [ecx + edi]
movzx ecx, byte [ecx]
xor ecx, eax
mov al, byte [ebp - 0x85]
or eax, ecx
mov byte [ebp - 0x85], al
mov eax, dword [esi + 0x40]
cmp edx, dword [eax + 0x14]
jb 0x4674d0
mov edi, 1
cmp byte [ebp - 0x85], 0
je 0x467533
push str.message_mac_does_not_match
push 0x6ff
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
push 1
push esi
call fcn.00475430
mov eax, 0xffff8e80
add esp, 0x14
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051e9d8
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x7c]
mov ecx, dword [esi + 0x40]
mov dword [ebp - 0x9c], 1
mov dword [ebp - 0x90], eax
jmp 0x467551
mov ebx, dword [ebp - 0x94]
mov edx, dword [ecx + 0xc]
mov dword [ebp - 0x8c], edx
xor edx, edx
div dword [ecx + 0xc]
test edx, edx
je 0x46757e
push dword [ebp - 0x8c]
push dword [ebp - 0x90]
push str.msglen___d_____ivlen___d____0
push 0x70d
jmp 0x467278
cmp dword [esi + 0x14], 2
jl 0x4675b6
mov eax, dword [ebp - 0x90]
xor edx, edx
sub eax, dword [ecx + 0xc]
sub ebx, dword [ecx + 0xc]
mov dword [esi + 0x7c], eax
cmp dword [ecx + 0xc], edx
jbe 0x4675b6
nop word [eax + eax]
mov eax, dword [esi + 0x6c]
mov ecx, dword [esi + 0x40]
mov al, byte [edx + eax]
mov byte [edx + ecx + 0x28], al
inc edx
mov eax, dword [esi + 0x40]
cmp edx, dword [eax + 0xc]
jb 0x4675a0
mov ecx, dword [esi + 0x40]
lea eax, [ebp - 0xa0]
push eax
mov eax, dword [ebp - 0x98]
push eax
push ebx
push eax
push dword [ecx + 0xc]
lea edx, [ecx + 0x28]
add ecx, 0x90
call fcn.0047c6d0
add esp, 0x14
mov dword [ebp - 0x8c], eax
test eax, eax
je 0x46761d
push eax
push str.mbedtls_cipher_crypt
push 0x725
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
mov edx, 1
mov ecx, esi
call fcn.004754f0
mov eax, dword [ebp - 0x8c]
add esp, 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051e9d8
mov esp, ebp
pop ebp
ret
cmp ebx, dword [ebp - 0xa0]
je 0x467634
push str.should_never_happen
push 0x72b
jmp 0x467cb6
mov ebx, dword [esi + 0x14]
cmp ebx, 2
jge 0x467658
mov ecx, dword [esi + 0x40]
push dword [ecx + 0xc]
lea eax, [ecx + 0xb8]
push eax
lea eax, [ecx + 0x28]
push eax
call fcn.00524840
mov ebx, dword [esi + 0x14]
add esp, 0xc
mov ecx, dword [esi + 0x7c]
mov eax, dword [esi + 0x70]
mov dword [ebp - 0xa8], eax
mov dword [ebp - 0x8c], ecx
movzx edx, byte [eax + ecx - 1]
mov eax, dword [esi + 0x40]
inc edx
mov dword [ebp - 0x94], edx
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x98], eax
add eax, edx
cmp ecx, eax
jae 0x46769b
cmp dword [ebp - 0x9c], 0
jne 0x46769b
xor edx, edx
xor edi, edi
mov dword [ebp - 0x94], edx
test ebx, ebx
jle 0x467795
xor eax, eax
sub ecx, edx
mov dword [ebp - 0x90], eax
dec ecx
xor esi, esi
lea ebx, [eax + 1]
lea eax, [edx + 1]
cmp dword [ebp - 0x8c], eax
mov eax, dword [ebp - 0x98]
cmovae esi, edi
mov dword [ebp - 0x98], 0
add eax, 0x4000
mov edi, ebx
cmp ecx, eax
sbb eax, eax
neg eax
and esi, eax
mov eax, esi
mov dword [ebp - 0xb0], esi
mov esi, dword [ebp - 0x94]
imul eax, ecx
mov ecx, dword [ebp - 0xa8]
inc ecx
add eax, ecx
mov dword [ebp - 0x8c], eax
nop
movzx eax, byte [eax + edi - 1]
xor edx, edx
cmp edi, esi
cmovbe edx, ebx
xor ecx, ecx
lea ebx, [esi - 1]
cmp eax, ebx
lea eax, [edi + 1]
sete cl
and ecx, edx
add dword [ebp - 0x90], ecx
cmp esi, eax
mov eax, dword [ebp - 0x8c]
sbb ebx, ebx
xor ecx, ecx
inc ebx
and ebx, edx
lea edx, [esi - 1]
movzx eax, byte [eax + edi]
cmp eax, edx
mov edx, dword [ebp - 0x98]
mov eax, dword [ebp - 0x8c]
cmove ecx, ebx
add edi, 2
add edx, ecx
mov dword [ebp - 0x98], edx
cmp edi, 0x100
jbe 0x467700
mov eax, dword [ebp - 0x90]
xor edi, edi
mov ebx, dword [ebp - 0x94]
add eax, edx
mov esi, dword [ebp - 0xac]
cmp eax, ebx
cmove edi, dword [ebp - 0xb0]
imul eax, edi, 0x1ff
mov ecx, dword [esi + 0x7c]
mov dword [ebp - 0x98], edi
and ebx, eax
sub ecx, ebx
mov dword [esi + 0x7c], ecx
jmp 0x4679bc
push str.should_never_happen
push 0x785
jmp 0x467cb6
push dword [ecx + 0x14]
push dword [ebp - 0x8c]
push edx
push str.msglen___d____max__ivlen__d___maclen___d___1______expl_IV__
push 0x6d4
jmp 0x4677fb
push str.should_never_happen
push 0x78f
jmp 0x467cb6
mov eax, dword [ecx]
mov edi, dword [ecx + 0xc]
sub edi, dword [ecx + 0x10]
mov ecx, ebx
test byte [eax + 0x24], 2
sete cl
lea ecx, [ecx*8 + 8]
lea eax, [ecx + edi]
mov dword [ebp - 0x90], ecx
cmp edx, eax
jae 0x467821
push ecx
push edi
push edx
push str.msglen___d____explicit_iv_len___d___taglen___d_
push 0x681
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
push 1
push esi
call fcn.00475430
add esp, 0x20
mov eax, 0xffff8e80
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051e9d8
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x70]
sub edx, ecx
mov ecx, dword [esi + 0x60]
sub edx, edi
mov dword [ebp - 0x9c], eax
mov dword [esi + 0x7c], edx
mov dword [ebp - 0x94], edx
mov eax, dword [ecx]
mov edx, dword [esi + 0x14]
mov dword [ebp - 0x14], eax
mov eax, dword [ecx + 4]
mov ecx, dword [esi + 0x10]
mov dword [ebp - 0x10], eax
mov al, byte [esi + 0x78]
mov byte [ebp - 0xc], al
lea eax, [ebp - 0xb]
push eax
mov eax, dword [esi]
mov eax, dword [eax + 0xcc]
shr eax, 1
and eax, 1
push eax
call fcn.0046d0c0
mov ecx, dword [ebp - 0x94]
mov edx, 4
mov eax, ecx
mov byte [ebp - 8], cl
shr eax, 8
mov ecx, esi
push 0xd
mov byte [ebp - 9], al
lea eax, [ebp - 0x14]
push eax
push str.additional_data_used_for_AEAD
push 0x692
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
call fcn.00475580
mov edx, dword [esi + 0x40]
add esp, 0x1c
mov eax, dword [edx + 0xc]
sub eax, dword [edx + 0x10]
push eax
push dword [esi + 0x6c]
lea eax, [edx + 0x28]
add eax, dword [edx + 0x10]
push eax
call fcn.00524840
mov eax, dword [esi + 0x40]
add esp, 0xc
mov edx, 4
mov ecx, esi
push dword [eax + 0xc]
add eax, 0x28
push eax
push str.IV_used
push 0x699
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
call fcn.00475580
mov eax, dword [ebp - 0x9c]
add esp, 0x14
mov edi, dword [ebp - 0x94]
mov edx, 4
add eax, edi
mov ecx, esi
mov dword [ebp - 0x8c], eax
push dword [ebp - 0x90]
push eax
push str.TAG_used
push 0x69a
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
call fcn.00475580
mov ecx, dword [esi + 0x40]
add esp, 0x14
mov eax, dword [ecx + 0x90]
mov edx, dword [ecx + 0xc]
mov eax, dword [eax + 4]
cmp eax, 6
jne 0x467963
mov eax, dword [ebp - 0x9c]
push eax
push eax
push dword [ebp - 0x90]
lea eax, [ebp - 0x14]
push dword [ebp - 0x8c]
push ecx
push eax
push edx
lea eax, [ecx + 0x28]
mov edx, edi
mov ecx, dword [ecx + 0xcc]
push eax
call fcn.00497be0
mov edi, eax
add esp, 0x20
cmp edi, 0xffffffee
jmp 0x46799f
cmp eax, 8
jne 0x467c69
push dword [ebp - 0x90]
mov eax, dword [ebp - 0x9c]
push dword [ebp - 0x8c]
push eax
push eax
push ecx
lea eax, [ebp - 0x14]
push eax
push edx
lea eax, [ecx + 0x28]
mov edx, edi
mov ecx, dword [ecx + 0xcc]
push eax
call fcn.00496be0
mov edi, eax
add esp, 0x20
cmp edi, 0xfffffff1
mov eax, 0xffff9d00
cmove edi, eax
test edi, edi
jne 0x467c6e
mov ecx, dword [esi + 0x7c]
mov dword [ebp - 0x9c], 1
push ecx
push dword [esi + 0x70]
mov edx, 4
mov ecx, esi
push str.raw_buffer_after_decryption
push 0x794
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
call fcn.00475580
mov eax, dword [ebp - 0x9c]
add esp, 0x14
test eax, eax
jne 0x467bb3
mov eax, dword [esi + 0x40]
mov eax, dword [eax + 0x14]
sub dword [esi + 0x7c], eax
mov eax, dword [esi + 0x68]
mov ecx, dword [esi + 0x7c]
shr ecx, 8
mov byte [eax], cl
mov ecx, dword [esi + 0x68]
mov al, byte [esi + 0x7c]
mov byte [ecx + 1], al
cmp dword [esi + 0x14], 0
jle 0x467ba4
mov ecx, dword [esi + 0x40]
mov edx, dword [esi + 0x60]
add ecx, 0x44
mov edi, dword [esi + 0x7c]
push 8
call fcn.00473350
mov ecx, dword [esi + 0x40]
add esp, 4
mov edx, dword [esi + 0x64]
add ecx, 0x44
push 3
call fcn.00473350
mov ecx, dword [esi + 0x40]
add esp, 4
mov edx, dword [esi + 0x68]
add ecx, 0x44
push 2
call fcn.00473350
mov ecx, dword [esi + 0x40]
add esp, 4
mov edx, dword [esi + 0x70]
add ecx, 0x44
push dword [esi + 0x7c]
call fcn.00473350
mov ecx, dword [esi + 0x40]
lea edx, [ebp - 0x84]
add esp, 4
add ecx, 0x44
call fcn.00473380
lea ecx, [ebx + 0x15]
mov ebx, dword [ebp - 0x98]
add ecx, edi
lea eax, [edi + 0x15]
imul edi, ebx, 0xff
shr ecx, 6
shr eax, 6
sub ecx, eax
and edi, ecx
add edi, 1
je 0x467ab8
mov eax, dword [esi + 0x40]
add eax, 0x44
je 0x467ab3
mov ecx, dword [eax]
test ecx, ecx
je 0x467ab3
push dword [esi + 0x70]
push dword [eax + 4]
mov eax, dword [ecx + 0x2c]
call eax
add esp, 8
sub edi, 1
jne 0x467a97
mov ecx, dword [esi + 0x40]
add ecx, 0x44
call fcn.00473440
mov eax, dword [esi + 0x40]
mov edx, 4
mov ecx, esi
push dword [eax + 0x14]
lea eax, [ebp - 0x84]
push eax
push str.expected_mac
push 0x7da
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
call fcn.00475580
mov eax, dword [esi + 0x40]
add esp, 0x14
mov edx, 4
mov ecx, esi
push dword [eax + 0x14]
mov eax, dword [esi + 0x70]
add eax, dword [esi + 0x7c]
push eax
push str.message__mac
push 0x7dc
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
call fcn.00475580
mov eax, dword [esi + 0x40]
xor edx, edx
mov edi, dword [esi + 0x70]
add esp, 0x14
add edi, dword [esi + 0x7c]
mov byte [ebp - 0x85], 0
cmp dword [eax + 0x14], edx
jbe 0x467b68
lea eax, [ebp - 0x84]
sub edi, eax
nop dword [eax + eax]
lea ecx, [ebp - 0x84]
add ecx, edx
inc edx
movzx eax, byte [ecx + edi]
movzx ecx, byte [ecx]
xor ecx, eax
mov al, byte [ebp - 0x85]
or eax, ecx
mov byte [ebp - 0x85], al
mov eax, dword [esi + 0x40]
cmp edx, dword [eax + 0x14]
jb 0x467b40
mov al, byte [ebp - 0x85]
xor ecx, ecx
test al, al
cmovne ebx, ecx
test ebx, ebx
je 0x467288
cmp dword [esi + 0x7c], 0
jne 0x467bc7
mov eax, dword [esi + 0xa4]
inc eax
mov dword [esi + 0xa4], eax
cmp eax, 3
jle 0x467bd1
push str.received_four_consecutive_empty_messages__possible_DoS_attack
push 0x802
jmp 0x46750d
push str.should_never_happen
push 0x7d6
jmp 0x467cb6
cmp eax, 1
je 0x467b7d
push str.should_never_happen
push 0x7f3
jmp 0x467cb6
mov dword [esi + 0xa4], 0
mov eax, dword [esi]
test byte [eax + 0xcc], 2
jne 0x467c3c
mov ecx, 8
mov edx, dword [esi]
mov eax, dword [edx + 0xcc]
and eax, 2
cmp ecx, eax
jbe 0x467bff
mov eax, dword [esi + 0x60]
add byte [eax + ecx - 1], 1
jne 0x467bfd
dec ecx
jmp 0x467be1
mov edx, dword [esi]
mov eax, dword [edx + 0xcc]
and eax, 2
cmp ecx, eax
jne 0x467c3c
push str.incoming_message_counter_would_wrap
push 0x818
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
push 1
push esi
call fcn.00475430
mov eax, 0xffff9480
add esp, 0x14
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051e9d8
mov esp, ebp
pop ebp
ret
push str.__decrypt_buf
push 0x81d
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
push 2
push esi
call fcn.00475430
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051e9d8
mov esp, ebp
pop ebp
ret
mov edi, 0xffff9f80
push edi
push str.mbedtls_cipher_auth_decrypt
push 0x6a7
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
mov edx, 1
mov ecx, esi
call fcn.004754f0
add esp, 0x10
cmp edi, 0xffff9d00
je 0x467288
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051e9d8
mov esp, ebp
pop ebp
ret
push str.should_never_happen
push 0x648
push str.c:projectswiperinstallerlibsmbedtls_2.7.0library_ssl_tls.c
push 1
push esi
call fcn.00475430
mov ecx, dword [ebp - 4]
add esp, 0x14
xor ecx, ebp
mov eax, 0xffff9400
pop edi
pop esi
pop ebx
call fcn.0051e9d8
mov esp, ebp
pop ebp
ret