Function at 0x46fc70
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x7c
mov edx, dword [esp + 0x9c]
mov eax, dword [esp + 0x98]
mov ebx, dword [esp + 0x90]
mov edi, dword [esp + 0xa0]
test edx, edx
cmove edx, dword [esp + 0x98]
cmp dword [esp + 0xa4], 0xffffffff
mov dword [esp + 0x20], 0
mov ebp, dword [eax + 4]
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
je 0x46fdb0
cmp dword [esp + 0xa4], 0xfffffffe
je 0x46fcde
jl 0x46fdc0
mov eax, dword [ebx + 4]
mov dword [esp + 0x14], edx
mov dword [esp], eax
call dbg.BN_num_bits
mov dword [esp], ebx
mov ebx, 0xff
lea esi, [eax - 1]
and esi, 7
call sym.adb.exe_RSA_size
mov ecx, esi
mov edx, dword [esp + 0x14]
shl ebx, cl
movzx ecx, byte [edi]
test ebx, ecx
jne 0x46fde0
test esi, esi
je 0x46fd86
lea ecx, [ebp + 1]
cmp eax, ecx
jle 0x46fd93
mov ecx, dword [esp + 0xa4]
lea ecx, [ebp + ecx + 1]
cmp eax, ecx
jle 0x46fd93
cmp byte [edi + eax - 1], 0xbc
je 0x46fe00
mov dword [esp + 0x10], 0x213
mov dword [esp + 0xc], str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
mov dword [esp + 8], 0x7f
mov dword [esp + 4], 0
xor ebx, ebx
xor edi, edi
mov dword [esp], 4
lea esi, [esp + 0x20]
call dbg.ERR_put_error
mov dword [esp], ebx
call dbg.OPENSSL_free
mov dword [esp], esi
call dbg.EVP_MD_CTX_cleanup
add esp, 0x7c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
sub eax, 1
add edi, 1
lea ecx, [ebp + 1]
cmp eax, ecx
jg 0x46fd1e
mov dword [esp + 0x10], 0x20f
mov dword [esp + 0xc], str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
mov dword [esp + 8], 0x71
jmp 0x46fd50
mov dword [esp + 0xa4], ebp
jmp 0x46fcde
mov dword [esp + 0x10], 0x1ff
mov dword [esp + 0xc], str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
mov dword [esp + 8], 0x8a
jmp 0x46fd50
mov dword [esp + 0x10], 0x206
mov dword [esp + 0xc], str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
mov dword [esp + 8], 0x7a
jmp 0x46fd50
mov ecx, ebp
not ecx
add eax, ecx
mov dword [esp + 0x18], edx
lea edx, [edi + eax]
mov dword [esp], eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x14], eax
call sym.adb.exe_OPENSSL_malloc
mov edx, dword [esp + 0x18]
test eax, eax
mov ebx, eax
je 0x470051
mov dword [esp + 4], edx
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
mov dword [esp], ebp
call dbg.PKCS1_MGF1
test eax, eax
je 0x46fff0
mov edx, dword [esp + 0x14]
xor eax, eax
mov ecx, dword [esp + 0x14]
test edx, edx
jle 0x46fe63
movzx edx, byte [edi + eax]
xor byte [ebx + eax], dl
add eax, 1
cmp ecx, eax
jne 0x46fe55
test esi, esi
jne 0x46ffd3
movzx edx, byte [ebx]
test dl, dl
jne 0x47006b
mov eax, dword [esp + 0x14]
cmp eax, 1
jle 0x470000
lea ecx, [eax - 1]
xor eax, eax
jmp 0x46fe98
cmp eax, ecx
je 0x470000
add eax, 1
movzx edx, byte [ebx + eax]
test dl, dl
je 0x46fe90
add eax, 1
mov dword [esp + 0x18], eax
cmp dl, 1
jne 0x470000
mov eax, dword [esp + 0xa4]
test eax, eax
js 0x46fed3
mov eax, dword [esp + 0x14]
sub eax, dword [esp + 0x18]
cmp eax, dword [esp + 0xa4]
jne 0x470037
mov eax, dword [esp + 0x98]
lea esi, [esp + 0x20]
xor edi, edi
mov dword [esp + 8], 0
mov dword [esp], esi
mov dword [esp + 4], eax
call sym.adb.exe_EVP_DigestInit_ex
test eax, eax
je 0x46fd6c
mov eax, dword [esp + 0x20]
mov dword [esp + 8], 8
mov dword [esp + 4], 0x572e64
mov dword [esp], esi
call dword [eax + 0x10]
mov eax, dword [esp + 0x94]
mov dword [esp + 8], ebp
mov dword [esp], esi
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
call dword [eax + 0x10]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov dword [esp], esi
sub eax, edx
mov dword [esp + 8], eax
mov eax, edx
add eax, ebx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
call dword [eax + 0x10]
lea edx, [esp + 0x30]
mov dword [esp + 8], 0
mov dword [esp + 4], edx
mov dword [esp], esi
mov dword [esp + 0x14], edx
call dbg.EVP_DigestFinal_ex
test eax, eax
je 0x46fd6c
test ebp, ebp
mov di, 1
mov edx, dword [esp + 0x14]
je 0x46fd6c
mov eax, dword [esp + 0x1c]
mov dword [esp + 8], ebp
mov dword [esp], edx
mov dword [esp + 4], eax
call sym._memcmp
test eax, eax
je 0x46fd6c
mov dword [esp + 0x10], 0x239
xor di, di
mov dword [esp + 0xc], str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
mov dword [esp + 8], 0x69
mov dword [esp + 4], 0
mov dword [esp], 4
call dbg.ERR_put_error
jmp 0x46fd6c
mov ecx, 8
mov edx, 0xff
sub ecx, esi
sar edx, cl
and dl, byte [ebx]
mov byte [ebx], dl
jmp 0x46fe6e
xor edi, edi
lea esi, [esp + 0x20]
jmp 0x46fd6c
mov dword [esp + 0x10], 0x22a
mov dword [esp + 0xc], str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
mov dword [esp + 8], 0x8b
mov dword [esp + 4], 0
xor edi, edi
mov dword [esp], 4
lea esi, [esp + 0x20]
call dbg.ERR_put_error
jmp 0x46fd6c
mov dword [esp + 0x10], 0x22e
mov dword [esp + 0xc], str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
mov dword [esp + 8], 0x8a
jmp 0x470018
mov dword [esp + 0x10], 0x21a
mov dword [esp + 0xc], str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
mov dword [esp + 8], 0x41
jmp 0x470018
mov dword [esp + 0x18], 1
jmp 0x46feaa