Function at 0x473890
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xfc
mov esi, dword [esp + 0x114]
mov ebx, dword [esp + 0x110]
mov edi, dword [esp + 0x11c]
cmp esi, 0x7ff
jbe 0x473b70
call sym.adb.exe_EVP_sha256
mov dword [esp], eax
mov dword [esp + 0x30], eax
call sym.adb.exe_EVP_MD_size
mov ebp, eax
add esi, 0x3f
and esi, 0xffffffc0
mov ecx, dword [esp + 0x118]
test ecx, ecx
je 0x4738f6
xor eax, eax
cmp edi, ebp
jb 0x473b60
cmp ebp, edi
cmovbe edi, ebp
test edi, edi
jne 0x473bb8
call sym.adb.exe_BN_CTX_new
test eax, eax
mov edi, eax
mov dword [esp + 0x40], eax
je 0x473b40
mov dword [esp], eax
call sym.adb.exe_BN_CTX_start
call sym.adb.exe_BN_MONT_CTX_new
test eax, eax
mov dword [esp + 0x48], eax
je 0x473b40
mov dword [esp], edi
call sym.adb.exe_BN_CTX_get
mov dword [esp], edi
mov dword [esp + 0x2c], eax
call sym.adb.exe_BN_CTX_get
mov dword [esp], edi
mov dword [esp + 0x28], eax
call sym.adb.exe_BN_CTX_get
mov dword [esp], edi
mov dword [esp + 0x4c], eax
call sym.adb.exe_BN_CTX_get
mov dword [esp], edi
mov dword [esp + 0x20], eax
call sym.adb.exe_BN_CTX_get
mov dword [esp], edi
mov dword [esp + 0x64], eax
call sym.adb.exe_BN_CTX_get
mov dword [esp], edi
mov dword [esp + 0x6c], eax
call sym.adb.exe_BN_CTX_get
mov dword [esp], edi
mov dword [esp + 0x24], eax
call sym.adb.exe_BN_CTX_get
test eax, eax
mov edi, eax
mov dword [esp + 0x5c], eax
je 0x473b48
lea eax, [esi - 1]
mov esi, eax
mov dword [esp + 0x68], eax
call sym.adb.exe_BN_value_one
mov dword [esp + 8], esi
mov dword [esp], edi
mov dword [esp + 4], eax
call sym.adb.exe_BN_lshift
test eax, eax
je 0x473b48
mov eax, dword [esp + 0x68]
mov edx, 0xcccccccd
mov dword [esp + 0x60], 0
lea esi, [esp + 0xb0]
lea edi, [esp + 0xd0]
mov dword [esp + 0x110], ebx
mul edx
lea eax, [ebp*8]
mov dword [esp + 0x54], eax
mov dword [esp + 0x50], edx
shr dword [esp + 0x50], 7
mov eax, dword [esp + 0x60]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [esp + 0x128]
mov dword [esp], eax
call sym.adb.exe_BN_GENCB_call
test eax, eax
je 0x473b48
mov edx, dword [esp + 0x118]
xor eax, eax
test edx, edx
sete al
mov dword [esp + 0x34], eax
je 0x473f3d
mov dword [esp + 0x118], 0
lea edx, [esp + 0x70]
test ebp, ebp
mov dword [esp + 0x44], 0xffffffff
jne 0x473ec8
mov eax, dword [esp + 0x30]
lea ebx, [esp + 0x90]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 4], ebp
mov dword [esp], edx
call sym.adb.exe_EVP_Digest
test eax, eax
je 0x473b48
mov eax, dword [esp + 0x30]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], edi
mov dword [esp + 0x10], eax
mov dword [esp + 4], ebp
mov dword [esp], esi
call sym.adb.exe_EVP_Digest
test eax, eax
je 0x473b48
xor eax, eax
test ebp, ebp
je 0x473ace
lea esi, [esi]
movzx edx, byte [edi + eax]
xor byte [ebx + eax], dl
add eax, 1
cmp eax, ebp
jne 0x473ac0
mov eax, dword [esp + 0x44]
or byte [esp + 0x90], 0x80
or byte [esp + eax + 0x90], 1
mov eax, dword [esp + 0x20]
mov dword [esp + 4], ebp
mov dword [esp], ebx
mov dword [esp + 8], eax
call sym.adb.exe_BN_bin2bn
test eax, eax
je 0x473b48
mov eax, dword [esp + 0x128]
mov dword [esp + 4], 0x32
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sym.adb.exe_BN_is_prime_fasttest_ex
cmp eax, 0
jg 0x473beb
jne 0x473b48
add dword [esp + 0x60], 1
jmp 0x4739ee
mov dword [esp + 0x48], 0
mov eax, dword [esp + 0x40]
test eax, eax
jne 0x473ba0
xor ebx, ebx
mov eax, dword [esp + 0x48]
mov dword [esp], eax
call sym.adb.exe_BN_MONT_CTX_free
mov eax, ebx
add esp, 0xfc
pop ebx
pop esi
pop edi
pop ebp
ret
call sym.adb.exe_EVP_sha1
mov dword [esp], eax
mov dword [esp + 0x30], eax
call sym.adb.exe_EVP_MD_size
cmp esi, 0x1ff
mov ebp, eax
ja 0x4738ce
mov esi, 0x200
jmp 0x4738d4
xor ebx, ebx
mov edi, dword [esp + 0x40]
mov dword [esp], edi
call sym.adb.exe_BN_CTX_end
mov dword [esp], edi
call sym.adb.exe_BN_CTX_free
jmp 0x473b52
mov dword [esp + 8], edi
mov edi, dword [esp + 0x118]
lea eax, [esp + 0x70]
mov dword [esp], eax
mov dword [esp + 4], edi
call sub.msvcrt.dll_memcpy
call sym.adb.exe_BN_CTX_new
test eax, eax
mov edi, eax
mov dword [esp + 0x40], eax
jne 0x473909
jmp 0x473b40
mov eax, dword [esp + 0x128]
mov dword [esp + 8], 0
mov dword [esp + 4], 2
mov dword [esp], eax
call sym.adb.exe_BN_GENCB_call
test eax, eax
je 0x473b48
mov eax, dword [esp + 0x128]
mov dword [esp + 8], 0
mov dword [esp + 4], 3
mov dword [esp], eax
call sym.adb.exe_BN_GENCB_call
test eax, eax
je 0x473b48
mov dword [esp + 0x58], 0
mov eax, dword [esp + 0x4c]
mov dword [esp], eax
call sym.adb.exe_BN_zero
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
lea esi, [esi]
mov ecx, dword [esp + 0x44]
cmp ecx, ebp
jae 0x473c9b
movzx eax, byte [esp + ecx + 0xb0]
mov byte [esp + 0x3f], al
add eax, 1
test al, al
mov byte [esp + ecx + 0xb0], al
jne 0x473c9b
mov eax, ecx
jmp 0x473c94
movzx ecx, byte [esi + eax]
lea edx, [ecx + 1]
test dl, dl
mov byte [esi + eax], dl
jne 0x473c9b
sub eax, 1
cmp eax, ebp
jb 0x473c86
mov eax, dword [esp + 0x30]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 4], ebp
mov dword [esp], esi
call sym.adb.exe_EVP_Digest
test eax, eax
je 0x473b48
mov eax, dword [esp + 0x2c]
mov dword [esp + 4], ebp
mov dword [esp], ebx
mov dword [esp + 8], eax
call sym.adb.exe_BN_bin2bn
test eax, eax
je 0x473b48
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x34]
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp], eax
call sym.adb.exe_BN_lshift
test eax, eax
je 0x473b48
mov eax, dword [esp + 0x2c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 4], eax
mov dword [esp], eax
call sym.adb.exe_BN_add
test eax, eax
je 0x473b48
add dword [esp + 0x38], 1
mov eax, dword [esp + 0x54]
add dword [esp + 0x34], eax
mov eax, dword [esp + 0x38]
cmp dword [esp + 0x50], eax
jge 0x473c60
mov eax, dword [esp + 0x68]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x4c]
mov dword [esp], eax
call sym.adb.exe_BN_mask_bits
test eax, eax
je 0x473b48
mov eax, dword [esp + 0x4c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x64]
mov dword [esp], eax
call sym.adb.exe_BN_copy
test eax, eax
je 0x473b48
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x5c]
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp], eax
call sym.adb.exe_BN_add
test eax, eax
je 0x473b48
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x2c]
mov dword [esp + 4], ecx
mov dword [esp], edx
call sym.adb.exe_BN_lshift1
test eax, eax
je 0x473b48
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x64]
mov dword [esp], 0
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
call sym.adb.exe_BN_div
test eax, eax
je 0x473b48
call sym.adb.exe_BN_value_one
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x2c]
mov dword [esp + 4], ecx
mov dword [esp], edx
mov dword [esp + 8], eax
call sym.adb.exe_BN_sub
test eax, eax
je 0x473b48
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x2c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 8], edx
mov dword [esp], eax
call sym.adb.exe_BN_sub
test eax, eax
je 0x473b48
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x24]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym.adb.exe_BN_cmp
test eax, eax
js 0x473e89
mov eax, dword [esp + 0x128]
mov dword [esp + 0xc], 1
mov dword [esp + 4], 0x32
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sym.adb.exe_BN_is_prime_fasttest_ex
cmp eax, 0
jg 0x473f62
jne 0x473b48
add dword [esp + 0x58], 1
cmp dword [esp + 0x58], 0x1000
je 0x473b34
mov eax, dword [esp + 0x58]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [esp + 0x128]
mov dword [esp], eax
call sym.adb.exe_BN_GENCB_call
test eax, eax
jne 0x473c41
jmp 0x473b48
mov dword [esp + 4], edx
mov dword [esp + 8], ebp
mov dword [esp], esi
mov dword [esp + 0x38], edx
call sub.msvcrt.dll_memcpy
mov edx, dword [esp + 0x38]
mov dword [esp + 8], ebp
mov dword [esp], edi
mov dword [esp + 4], edx
call sub.msvcrt.dll_memcpy
lea eax, [ebp - 1]
mov edx, dword [esp + 0x38]
cmp eax, ebp
mov ecx, eax
mov dword [esp + 0x44], eax
jae 0x473a4c
movzx eax, byte [esp + ebp + 0xaf]
mov byte [esp + 0x38], al
add eax, 1
test al, al
mov byte [esp + ecx + 0xb0], al
jne 0x473a4c
mov eax, ecx
jmp 0x473f31
add byte [esi + eax], 1
jne 0x473a4c
sub eax, 1
cmp eax, ebp
jb 0x473f27
jmp 0x473a4c
lea edx, [esp + 0x70]
mov dword [esp], edx
mov dword [esp + 4], ebp
mov dword [esp + 0x38], edx
call sym.adb.exe_RAND_bytes
mov edx, dword [esp + 0x38]
test eax, eax
jne 0x473a3c
jmp 0x473b48
mov eax, dword [esp + 0x128]
mov dword [esp + 8], 1
mov ebx, dword [esp + 0x110]
mov dword [esp + 4], 2
mov dword [esp], eax
call sym.adb.exe_BN_GENCB_call
test eax, eax
je 0x473b48
call sym.adb.exe_BN_value_one
mov dword [esp + 8], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x5c]
mov dword [esp], eax
call sym.adb.exe_BN_sub
test eax, eax
je 0x473b48
mov eax, dword [esp + 0x40]
mov dword [esp + 4], 0
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call sym.adb.exe_BN_div
test eax, eax
je 0x473b48
mov eax, dword [esp + 0x5c]
mov dword [esp + 4], 2
mov dword [esp], eax
call sym.adb.exe_BN_set_word
test eax, eax
je 0x473b48
mov eax, dword [esp + 0x40]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x48]
mov dword [esp], eax
call sym.adb.exe_BN_MONT_CTX_set
test eax, eax
je 0x473b48
mov ebp, dword [esp + 0x28]
mov esi, 2
mov edi, dword [esp + 0x5c]
mov eax, dword [esp + 0x48]
mov dword [esp + 4], edi
mov dword [esp], ebp
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 8], eax
call sym.adb.exe_BN_mod_exp_mont
test eax, eax
je 0x473b48
mov dword [esp], ebp
call sym.adb.exe_BN_is_one
test eax, eax
je 0x474098
call sym.adb.exe_BN_value_one
mov dword [esp + 4], edi
mov dword [esp], edi
mov dword [esp + 8], eax
call sym.adb.exe_BN_add
test eax, eax
je 0x473b48
add esi, 1
jmp 0x474036
mov eax, dword [esp + 0x128]
mov dword [esp + 8], 1
mov dword [esp + 4], 3
mov dword [esp], eax
call sym.adb.exe_BN_GENCB_call
test eax, eax
je 0x473ba0
mov eax, dword [ebx + 4]
mov dword [esp], eax
call sym.adb.exe_BN_free
mov eax, dword [ebx + 8]
mov dword [esp], eax
call sym.adb.exe_BN_free
mov eax, dword [ebx + 0xc]
mov dword [esp], eax
call sym.adb.exe_BN_free
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sym.adb.exe_BN_dup
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sym.adb.exe_BN_dup
mov dword [ebx + 8], eax
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call sym.adb.exe_BN_dup
mov edi, dword [ebx + 4]
test edi, edi
mov dword [ebx + 0xc], eax
je 0x473ba0
mov ebx, dword [ebx + 8]
test ebx, ebx
mov ebx, 0
je 0x473ba2
test eax, eax
je 0x473ba2
mov ecx, dword [esp + 0x120]
test ecx, ecx
je 0x474148
mov eax, dword [esp + 0x120]
mov edi, dword [esp + 0x58]
mov dword [eax], edi
mov edx, dword [esp + 0x124]
test edx, edx
je 0x474166
mov eax, dword [esp + 0x124]
mov ebx, 1
mov dword [eax], esi
jmp 0x473ba2
mov ebx, 1
jmp 0x473ba2