Function at 0x46f410
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xbc
mov ebx, dword [esp + 0xec]
mov esi, dword [esp + 0xdc]
mov edi, dword [esp + 0xe0]
test ebx, ebx
je 0x46f6c1
mov ecx, dword [esp + 0xf0]
mov eax, dword [esp + 0xf0]
test ecx, ecx
cmove eax, dword [esp + 0xec]
mov dword [esp + 0xf0], eax
mov eax, dword [esp + 0xec]
mov ebx, dword [eax + 4]
lea eax, [ebx + 1]
mov dword [esp + 0x20], eax
add eax, eax
cmp eax, edi
ja 0x46f650
mov eax, ebx
not eax
add eax, edi
mov dword [esp], eax
mov dword [esp + 0x1c], eax
call sym.adb.exe_OPENSSL_malloc
test eax, eax
mov edi, eax
je 0x46f693
mov eax, dword [esp + 0x20]
mov edx, ebx
lea ebp, [esi + eax]
mov eax, dword [esp + 0xf0]
mov ecx, ebp
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
lea eax, [esp + 0x30]
call dbg.PKCS1_MGF1
test eax, eax
je 0x46f67e
test ebx, ebx
je 0x46f4d1
xor eax, eax
movzx edx, byte [esi + eax + 1]
xor byte [esp + eax + 0x30], dl
add eax, 1
cmp eax, ebx
jne 0x46f4c1
mov eax, dword [esp + 0xf0]
lea ecx, [esp + 0x30]
mov edx, dword [esp + 0x1c]
mov dword [esp], ebx
mov dword [esp + 4], eax
mov eax, edi
call dbg.PKCS1_MGF1
test eax, eax
je 0x46f67e
mov edx, dword [esp + 0x1c]
xor eax, eax
mov ecx, dword [esp + 0x1c]
test edx, edx
je 0x46f513
movzx edx, byte [ebp + eax]
xor byte [edi + eax], dl
add eax, 1
cmp eax, ecx
jne 0x46f504
mov eax, dword [esp + 0xec]
lea ebp, [esp + 0x70]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], ebp
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xe8]
mov dword [esp + 4], eax
mov eax, dword [esp + 0xe4]
mov dword [esp], eax
call dbg.EVP_Digest
test eax, eax
je 0x46f67e
mov dword [esp + 8], ebx
mov dword [esp + 4], ebp
mov dword [esp], edi
call dbg.CRYPTO_memcmp
movzx ecx, byte [esi]
lea edx, [eax - 1]
not eax
and edx, eax
lea eax, [ecx - 1]
not ecx
and eax, ecx
and eax, edx
cdq
cmp dword [esp + 0x1c], ebx
mov dword [esp + 0x28], edx
not dword [esp + 0x28]
jbe 0x46f652
xor esi, esi
mov ebp, 0xffffffff
mov dword [esp + 0x2c], edi
mov edi, dword [esp + 0x20]
mov dword [esp + 0x24], esi
jmp 0x46f5a6
add edi, 1
mov eax, dword [esp + 0x2c]
movzx eax, byte [eax + ebx]
mov ecx, eax
xor ecx, 1
movzx ecx, cl
lea edx, [ecx - 1]
not ecx
and edx, ecx
sar edx, 0x1f
mov ecx, edx
not edx
and ecx, ebp
and ebp, edx
lea edx, [eax - 1]
not eax
and edx, eax
mov esi, ecx
sar edx, 0x1f
not esi
not edx
and ecx, ebx
and dword [esp + 0x24], esi
and edx, ebp
or dword [esp + 0x24], ecx
mov ebx, edi
or dword [esp + 0x28], edx
cmp edi, dword [esp + 0x1c]
jne 0x46f5a3
mov eax, dword [esp + 0x28]
mov ebx, edi
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x2c]
or eax, ebp
jne 0x46f652
lea eax, [esi + 1]
sub ebx, eax
cmp ebx, dword [esp + 0xd8]
ja 0x46f6e5
test ebx, ebx
je 0x46f631
add eax, edi
mov dword [esp + 4], eax
mov eax, dword [esp + 0xd0]
mov dword [esp + 8], ebx
mov dword [esp], eax
call sym._memcpy
mov eax, dword [esp + 0xd4]
mov dword [eax], ebx
mov dword [esp], edi
call dbg.OPENSSL_free
mov eax, 1
jmp 0x46f688
xor edi, edi
mov dword [esp + 0x10], 0x1db
mov dword [esp + 0xc], str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
mov dword [esp + 8], 0x85
mov dword [esp + 4], 0
mov dword [esp], 4
call dbg.ERR_put_error
mov dword [esp], edi
call dbg.OPENSSL_free
xor eax, eax
add esp, 0xbc
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x10], 0x19c
mov dword [esp + 0xc], str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
mov dword [esp + 8], 0x41
mov dword [esp + 4], 0
mov dword [esp], 4
call dbg.ERR_put_error
jmp 0x46f67e
mov dword [esp + 4], dbg.EVP_sha1_init
mov dword [esp], 0x5bc5e0
call dbg.CRYPTO_once
mov dword [esp + 0xec], 0x5bc600
jmp 0x46f437
mov dword [esp + 0x10], 0x1cf
mov dword [esp + 0xc], str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
mov dword [esp + 8], 0x71
mov dword [esp + 4], 0
mov dword [esp], 4
call dbg.ERR_put_error
jmp 0x46f67e