Function at 0x10022643
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov eax, 0x90
lea ebp, [esp - 0x60]
call fcn.1005ead0
mov eax, dword [0x100a4120]
xor eax, dword [ebp + 0x64]
push ebx
mov dword [ebp + 0x5c], eax
xor ebx, ebx
mov eax, 0x200
cmp ecx, eax
push esi
push edi
mov dword [ebp + 0x3c], ebx
mov dword [ebp + 0x40], ebx
mov dword [ebp + 0x38], 2
jge 0x1002267a
mov ecx, eax
lea eax, [ecx + 0x3f]
push 0x40
cdq
pop ecx
idiv ecx
push 0x14
mov esi, eax
pop eax
shl esi, 6
cmp dword [ebp + 0x70], eax
jge 0x10022693
mov dword [ebp + 0x6c], ebx
jle 0x10022698
mov dword [ebp + 0x70], eax
cmp dword [ebp + 0x6c], ebx
je 0x100226b2
cmp dword [ebp + 0x70], eax
jne 0x100226b2
push eax
push dword [ebp + 0x6c]
lea eax, [ebp - 0x1c]
push eax
call sub.MSVCR70.dll_memcpy
add esp, 0xc
call sym.LIBEAY32.dll_BN_CTX_new
mov edi, eax
cmp edi, ebx
je 0x10022b95
call sym.LIBEAY32.dll_BN_MONT_CTX_new
cmp eax, ebx
mov dword [ebp + 0x48], eax
je 0x10022b78
push edi
call sym.LIBEAY32.dll_BN_CTX_start
push edi
call sym.LIBEAY32.dll_BN_CTX_get
push edi
mov dword [ebp + 0x58], eax
call sym.LIBEAY32.dll_BN_CTX_get
push edi
mov dword [ebp + 0x30], eax
call sym.LIBEAY32.dll_BN_CTX_get
push edi
mov dword [ebp + 0x44], eax
call sym.LIBEAY32.dll_BN_CTX_get
push edi
mov dword [ebp + 0x4c], eax
call sym.LIBEAY32.dll_BN_CTX_get
push edi
mov dword [ebp + 0x50], eax
call sym.LIBEAY32.dll_BN_CTX_get
push edi
mov dword [ebp + 0x2c], eax
call sym.LIBEAY32.dll_BN_CTX_get
push edi
mov dword [ebp + 0x34], eax
call sym.LIBEAY32.dll_BN_CTX_get
add esp, 0x24
dec esi
mov ebx, eax
push esi
mov dword [ebp + 0x20], ebx
mov dword [ebp + 0x28], esi
call sym.LIBEAY32.dll_BN_value_one
push eax
push ebx
call sym.LIBEAY32.dll_BN_lshift
add esp, 0xc
test eax, eax
je 0x10022b78
push dword [ebp + 0x40]
push 0
push dword [ebp + 0x7c]
call sym.LIBEAY32.dll_BN_GENCB_call
add esp, 0xc
inc dword [ebp + 0x40]
test eax, eax
je 0x10022b78
xor esi, esi
cmp dword [ebp + 0x70], esi
jne 0x10022772
lea eax, [ebp - 0x1c]
push 0x14
push eax
call sym.LIBEAY32.dll_RAND_pseudo_bytes
pop ecx
pop ecx
inc esi
jmp 0x10022775
mov dword [ebp + 0x70], esi
push 0x14
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 8]
push eax
call sub.MSVCR70.dll_memcpy
push 0x14
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x30]
push eax
call sub.MSVCR70.dll_memcpy
add esp, 0x18
push 0x13
pop eax
inc byte [ebp + eax - 8]
jne 0x100227a2
dec eax
jns 0x10022799
push 0
call sym.LIBEAY32.dll_EVP_sha1
push eax
push 0
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp - 0x1c]
push 0x14
push eax
call sym.LIBEAY32.dll_EVP_Digest
add esp, 0x18
push 0
call sym.LIBEAY32.dll_EVP_sha1
push eax
push 0
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 8]
push 0x14
push eax
call sym.LIBEAY32.dll_EVP_Digest
add esp, 0x18
xor eax, eax
mov cl, byte [ebp + eax - 0x30]
xor byte [ebp + eax + 0xc], cl
inc eax
cmp eax, 0x14
jl 0x100227dc
push dword [ebp + 0x4c]
or byte [ebp + 0xc], 0x80
or byte [ebp + 0x1f], 1
lea eax, [ebp + 0xc]
push 0x14
push eax
call sym.LIBEAY32.dll_BN_bin2bn
add esp, 0xc
test eax, eax
je 0x10022b78
push dword [ebp + 0x7c]
push esi
push edi
push 0x32
push dword [ebp + 0x4c]
call sym.LIBEAY32.dll_BN_is_prime_fasttest_ex
add esp, 0x14
test eax, eax
jg 0x1002282c
je 0x10022740
jmp 0x10022b78
push 0
push 2
push dword [ebp + 0x7c]
call sym.LIBEAY32.dll_BN_GENCB_call
add esp, 0xc
test eax, eax
je 0x10022b78
push 0
push 3
push dword [ebp + 0x7c]
call sym.LIBEAY32.dll_BN_GENCB_call
add esp, 0xc
test eax, eax
je 0x10022b78
mov eax, dword [ebp + 0x28]
and dword [ebp + 0x54], 0
cdq
mov ecx, 0xa0
idiv ecx
mov dword [ebp + 0x24], eax
cmp dword [ebp + 0x54], 0
je 0x1002288a
push dword [ebp + 0x54]
push 0
push dword [ebp + 0x7c]
call sym.LIBEAY32.dll_BN_GENCB_call
add esp, 0xc
test eax, eax
je 0x10022b78
xor esi, esi
push esi
push dword [ebp + 0x44]
call sym.LIBEAY32.dll_BN_set_word
cmp dword [ebp + 0x24], esi
pop ecx
pop ecx
jl 0x1002291b
xor ebx, ebx
push 0x13
pop eax
inc byte [ebp + eax - 8]
jne 0x100228aa
dec eax
jns 0x100228a1
push 0
call sym.LIBEAY32.dll_EVP_sha1
push eax
push 0
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp - 8]
push 0x14
push eax
call sym.LIBEAY32.dll_EVP_Digest
push dword [ebp + 0x58]
lea eax, [ebp + 0xc]
push 0x14
push eax
call sym.LIBEAY32.dll_BN_bin2bn
add esp, 0x24
test eax, eax
je 0x10022b78
push ebx
push dword [ebp + 0x58]
push dword [ebp + 0x58]
call sym.LIBEAY32.dll_BN_lshift
add esp, 0xc
test eax, eax
je 0x10022b78
push dword [ebp + 0x58]
push dword [ebp + 0x44]
push dword [ebp + 0x44]
call sym.LIBEAY32.dll_BN_add
add esp, 0xc
test eax, eax
je 0x10022b78
inc esi
add ebx, 0xa0
cmp esi, dword [ebp + 0x24]
jle 0x1002289e
mov ebx, dword [ebp + 0x20]
push dword [ebp + 0x28]
push dword [ebp + 0x44]
call sym.LIBEAY32.dll_BN_mask_bits
test eax, eax
pop ecx
pop ecx
je 0x10022b78
push dword [ebp + 0x44]
push dword [ebp + 0x50]
call sym.LIBEAY32.dll_BN_copy
test eax, eax
pop ecx
pop ecx
je 0x10022b78
push ebx
push dword [ebp + 0x50]
push dword [ebp + 0x50]
call sym.LIBEAY32.dll_BN_add
add esp, 0xc
test eax, eax
je 0x10022b78
push dword [ebp + 0x4c]
mov esi, dword [ebp + 0x58]
push esi
call sym.LIBEAY32.dll_BN_lshift1
test eax, eax
pop ecx
pop ecx
je 0x10022b78
push edi
push esi
push dword [ebp + 0x50]
push dword [ebp + 0x2c]
push 0
call sym.LIBEAY32.dll_BN_div
add esp, 0x14
test eax, eax
je 0x10022b78
call sym.LIBEAY32.dll_BN_value_one
push eax
push dword [ebp + 0x2c]
push esi
call sym.LIBEAY32.dll_BN_sub
add esp, 0xc
test eax, eax
je 0x10022b78
push esi
push dword [ebp + 0x50]
mov esi, dword [ebp + 0x34]
push esi
call sym.LIBEAY32.dll_BN_sub
add esp, 0xc
test eax, eax
je 0x10022b78
push ebx
push esi
call sym.LIBEAY32.dll_BN_cmp
test eax, eax
pop ecx
pop ecx
jl 0x100229e6
push dword [ebp + 0x7c]
push 1
push edi
push 0x32
push esi
call sym.LIBEAY32.dll_BN_is_prime_fasttest_ex
add esp, 0x14
test eax, eax
jg 0x100229fb
jne 0x10022b78
inc dword [ebp + 0x54]
cmp dword [ebp + 0x54], 0x1000
jl 0x1002286c
jmp 0x10022740
push 1
push 2
push dword [ebp + 0x7c]
call sym.LIBEAY32.dll_BN_GENCB_call
add esp, 0xc
test eax, eax
je 0x10022b78
call sym.LIBEAY32.dll_BN_value_one
push eax
push esi
push ebx
call sym.LIBEAY32.dll_BN_sub
add esp, 0xc
test eax, eax
je 0x10022b78
push edi
push dword [ebp + 0x4c]
push ebx
push 0
push dword [ebp + 0x58]
call sym.LIBEAY32.dll_BN_div
add esp, 0x14
test eax, eax
je 0x10022b78
push 2
push ebx
call sym.LIBEAY32.dll_BN_set_word
test eax, eax
pop ecx
pop ecx
je 0x10022b78
push edi
push esi
push dword [ebp + 0x48]
call sym.LIBEAY32.dll_BN_MONT_CTX_set
add esp, 0xc
test eax, eax
je 0x10022b78
push dword [ebp + 0x48]
push edi
push esi
mov esi, dword [ebp + 0x30]
jmp 0x10022aaa
cmp dword [esi + 4], 1
jne 0x10022ac0
mov eax, dword [esi]
cmp dword [eax], 1
jne 0x10022ac0
cmp dword [esi + 0xc], 0
jne 0x10022ac0
call sym.LIBEAY32.dll_BN_value_one
push eax
push ebx
push ebx
call sym.LIBEAY32.dll_BN_add
add esp, 0xc
test eax, eax
je 0x10022b78
push dword [ebp + 0x48]
inc dword [ebp + 0x38]
push edi
push dword [ebp + 0x34]
push dword [ebp + 0x58]
push ebx
push esi
call sym.LIBEAY32.dll_BN_mod_exp_mont
add esp, 0x18
test eax, eax
jne 0x10022a75
jmp 0x10022b78
push 1
push 3
push dword [ebp + 0x7c]
call sym.LIBEAY32.dll_BN_GENCB_call
add esp, 0xc
test eax, eax
je 0x10022b78
mov esi, dword [ebp + 0x68]
mov eax, dword [esi + 0xc]
xor ebx, ebx
cmp eax, ebx
mov dword [ebp + 0x3c], 1
je 0x10022af1
push eax
call sym.LIBEAY32.dll_BN_free
pop ecx
mov eax, dword [esi + 0x10]
cmp eax, ebx
je 0x10022aff
push eax
call sym.LIBEAY32.dll_BN_free
pop ecx
mov eax, dword [esi + 0x14]
cmp eax, ebx
je 0x10022b0d
push eax
call sym.LIBEAY32.dll_BN_free
pop ecx
push dword [ebp + 0x34]
call sym.LIBEAY32.dll_BN_dup
push dword [ebp + 0x4c]
mov dword [esi + 0xc], eax
call sym.LIBEAY32.dll_BN_dup
push dword [ebp + 0x30]
mov dword [esi + 0x10], eax
call sym.LIBEAY32.dll_BN_dup
add esp, 0xc
cmp dword [esi + 0xc], ebx
mov dword [esi + 0x14], eax
je 0x10022b3f
cmp dword [esi + 0x10], ebx
je 0x10022b3f
cmp eax, ebx
jne 0x10022b44
mov dword [ebp + 0x3c], ebx
jmp 0x10022b78
cmp dword [ebp + 0x40], 1
jle 0x10022b60
cmp dword [ebp + 0x6c], ebx
je 0x10022b60
push 0x14
lea eax, [ebp - 0x1c]
push eax
push dword [ebp + 0x6c]
call sub.MSVCR70.dll_memcpy
add esp, 0xc
mov eax, dword [ebp + 0x74]
cmp eax, ebx
je 0x10022b6c
mov ecx, dword [ebp + 0x54]
mov dword [eax], ecx
mov eax, dword [ebp + 0x78]
cmp eax, ebx
je 0x10022b78
mov ecx, dword [ebp + 0x38]
mov dword [eax], ecx
push edi
call sym.LIBEAY32.dll_BN_CTX_end
push edi
call sym.LIBEAY32.dll_BN_CTX_free
cmp dword [ebp + 0x48], 0
pop ecx
pop ecx
je 0x10022b95
push dword [ebp + 0x48]
call sym.LIBEAY32.dll_BN_MONT_CTX_free
pop ecx
mov ecx, dword [ebp + 0x5c]
xor ecx, dword [ebp + 0x64]
mov eax, dword [ebp + 0x3c]
pop edi
pop esi
pop ebx
call fcn.1005eb3e
add ebp, 0x60
leave
ret