Function at 0x470080
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov ebx, dword [esp + 0x60]
mov eax, dword [esp + 0x6c]
mov ebp, dword [esp + 0x70]
mov ecx, dword [ebx + 4]
mov esi, dword [eax + 4]
test ebp, ebp
cmove ebp, dword [esp + 0x6c]
mov eax, dword [ecx + 4]
cmp eax, 0
jle 0x47019e
mov edx, dword [ecx]
jmp 0x4700b9
sub eax, 1
je 0x4701a4
mov edi, dword [edx + eax*4 - 4]
test edi, edi
je 0x4700b0
mov dword [esp], ecx
call dbg.BN_num_bits
mov dword [esp], ebx
sub eax, 1
mov dword [esp + 0x24], eax
and dword [esp + 0x24], 7
call sym.adb.exe_RSA_size
mov edx, dword [esp + 0x24]
test edx, edx
mov dword [esp + 0x20], eax
jne 0x4700fc
mov eax, dword [esp + 0x64]
sub dword [esp + 0x20], 1
mov byte [eax], 0
add eax, 1
mov dword [esp + 0x64], eax
lea eax, [esi + 2]
cmp dword [esp + 0x20], eax
jb 0x470210
cmp dword [esp + 0x74], 0xffffffff
je 0x470230
cmp dword [esp + 0x74], 0xfffffffe
mov edi, dword [esp + 0x74]
je 0x470347
test edi, edi
js 0x470367
mov eax, dword [esp + 0x20]
sub eax, esi
mov dword [esp + 0x28], eax
sub eax, 2
cmp edi, eax
ja 0x47035a
test edi, edi
jne 0x4701e6
xor ebx, ebx
mov eax, dword [esp + 0x6c]
mov dword [esp + 8], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
mov dword [esp + 4], eax
lea eax, [esp + 0x30]
mov dword [esp], eax
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
call sym.adb.exe_EVP_DigestInit_ex
test eax, eax
jne 0x470237
lea eax, [esp + 0x30]
xor ebp, ebp
mov dword [esp], eax
call dbg.EVP_MD_CTX_cleanup
jmp 0x4701d4
jne 0x4700c1
mov dword [esp + 0x10], 0x256
mov dword [esp + 0xc], str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
mov dword [esp + 8], 0x78
mov dword [esp + 4], 0
xor ebx, ebx
xor ebp, ebp
mov dword [esp], 4
call dbg.ERR_put_error
mov dword [esp], ebx
call dbg.OPENSSL_free
add esp, 0x4c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], edi
call sym.adb.exe_OPENSSL_malloc
test eax, eax
mov ebx, eax
je 0x470384
mov ecx, 0x572780
mov edx, edi
call sym._RAND_bytes_with_additional_data.part.87
jmp 0x47014a
mov dword [esp + 0x10], 0x263
mov dword [esp + 0xc], str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
mov dword [esp + 8], 0x71
jmp 0x4701bc
mov edi, esi
jmp 0x47012b
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x30]
mov dword [esp], ecx
mov dword [esp + 8], 8
mov dword [esp + 4], 0x572e64
sub eax, 1
mov dword [esp + 0x2c], eax
add eax, dword [esp + 0x64]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x30]
call dword [eax + 0x10]
mov eax, dword [esp + 0x68]
lea ecx, [esp + 0x30]
mov dword [esp], ecx
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov eax, dword [esp + 0x30]
call dword [eax + 0x10]
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x30]
mov dword [esp], ecx
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
call dword [eax + 0x10]
mov eax, dword [esp + 0x28]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
lea eax, [esp + 0x30]
mov dword [esp], eax
call dbg.EVP_DigestFinal_ex
test eax, eax
je 0x47018e
lea eax, [esp + 0x30]
mov dword [esp], eax
call dbg.EVP_MD_CTX_cleanup
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x64]
mov dword [esp + 4], ebp
xor ebp, ebp
mov dword [esp], esi
call dbg.PKCS1_MGF1
test eax, eax
je 0x4701d4
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x64]
sub eax, esi
sub edx, edi
lea edx, [edx + eax - 2]
xor byte [edx], 1
test edi, edi
je 0x470312
xor eax, eax
movzx ecx, byte [ebx + eax]
xor byte [edx + eax + 1], cl
add eax, 1
cmp eax, edi
jne 0x470303
mov eax, dword [esp + 0x24]
test eax, eax
je 0x470330
mov edi, dword [esp + 0x64]
mov ecx, 8
mov eax, 0xff
sub ecx, dword [esp + 0x24]
sar eax, cl
and byte [edi], al
mov eax, dword [esp + 0x64]
mov ebp, 1
mov edi, dword [esp + 0x20]
mov byte [eax + edi - 1], 0xbc
jmp 0x4701d4
mov eax, dword [esp + 0x20]
sub edi, esi
add edi, eax
sub eax, esi
mov dword [esp + 0x28], eax
jmp 0x470140
mov dword [esp + 0x10], 0x278
jmp 0x470218
mov dword [esp + 0x10], 0x271
mov dword [esp + 0xc], str.external_boringssl_src_crypto_fipsmodule_rsa_padding.c
mov dword [esp + 8], 0x8a
jmp 0x4701bc
mov dword [esp + 0x10], 0x27f
xor ebp, ebp
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 0x4701d4