Function at 0x10013840
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xe4
mov eax, dword [0x1002f104]
xor eax, esp
mov dword [esp + 0xe0], eax
cmp dword [esp + 0x100], 1
mov eax, dword [esp + 0xe8]
push ebx
mov ebx, dword [esp + 0x100]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xf4]
push ebp
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x100]
push esi
mov esi, dword [esp + 0x100]
mov dword [esp + 0x24], eax
jb 0x10005cc7
mov ebp, dword [esp + 0xf8]
test ebp, ebp
je 0x10005cc7
test esi, esi
je 0x10005cc7
test ebx, ebx
je 0x10005cc7
cmp ebx, 0x400
ja 0x10005cc7
cmp esi, 0x100000
ja 0x10005cc7
lea eax, [esi + 4]
push eax
push 1
mov dword [esp + 0x28], eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
je 0x10005cc7
lea ecx, [ebx + 0x1f]
xor edx, edx
shr ecx, 5
lea eax, [ebx - 1]
add eax, ecx
mov dword [esp + 0x28], ecx
div ecx
push edi
push esi
push dword [esp + 0x18]
mov edi, eax
push dword [esp + 0x20]
call sub.VCRUNTIME140.dll_memcpy
lea eax, [esp + 0x1c]
push eax
call fcn.10003670
push ebp
push dword [esp + 0x30]
push dword [esp + 0x28]
call sub.libcrypto_3.dll_EVP_DigestUpdate
push 0
lea eax, [esp + 0xd0]
push eax
push dword [esp + 0x34]
call sub.libcrypto_3.dll_EVP_DigestFinal
push dword [esp + 0x38]
call sub.libcrypto_3.dll_EVP_MD_CTX_free
mov edx, dword [esp + 0x44]
add esp, 0x2c
mov ecx, 1
add edx, esi
mov dword [esp + 0x14], ecx
mov ebp, ebx
mov dword [esp + 0x1c], edx
nop word [eax + eax]
mov eax, ecx
mov byte [edx + 3], cl
shr eax, 0x18
mov byte [edx], al
mov eax, ecx
shr eax, 0x10
mov byte [edx + 1], al
mov eax, ecx
shr eax, 8
mov byte [edx + 2], al
lea eax, [esp + 0x10]
push eax
call fcn.10003670
push dword [esp + 0x28]
push dword [esp + 0x20]
push dword [esp + 0x1c]
call sub.libcrypto_3.dll_EVP_DigestUpdate
push 0
lea eax, [esp + 0x84]
push eax
push dword [esp + 0x28]
call sub.libcrypto_3.dll_EVP_DigestFinal
push dword [esp + 0x2c]
call sub.libcrypto_3.dll_EVP_MD_CTX_free
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x94]
push eax
lea eax, [esp + 0xd8]
push eax
call fcn.10005780
movups xmm0, xmmword [esp + 0x5c]
mov eax, dword [esp + 0x13c]
add esp, 0x2c
movups xmmword [esp + 0x50], xmm0
movups xmm0, xmmword [esp + 0x40]
movups xmmword [esp + 0x60], xmm0
cmp eax, 1
jbe 0x10005c50
lea esi, [eax - 1]
lea eax, [esp + 0x10]
push eax
call fcn.10003670
push 0x20
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x1c]
call sub.libcrypto_3.dll_EVP_DigestUpdate
push 0
lea eax, [esp + 0x84]
push eax
push dword [esp + 0x28]
call sub.libcrypto_3.dll_EVP_DigestFinal
push dword [esp + 0x2c]
call sub.libcrypto_3.dll_EVP_MD_CTX_free
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x94]
push eax
lea eax, [esp + 0xd8]
push eax
call fcn.10005780
add esp, 0x2c
xor eax, eax
nop word [eax + eax]
movups xmm0, xmmword [esp + eax + 0x50]
movups xmm1, xmmword [esp + eax + 0x30]
pxor xmm1, xmm0
movups xmmword [esp + eax + 0x50], xmm1
add eax, 0x10
cmp eax, 0x20
jb 0x10005c30
sub esi, 1
jne 0x10005bd5
cmp edi, ebx
mov eax, ebx
cmovb eax, edi
xor ecx, ecx
mov edi, eax
test edi, edi
je 0x10005c7c
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x28]
dec edx
cmp edx, ebp
jae 0x10005c7c
mov al, byte [esp + ecx + 0x50]
inc ecx
mov byte [edx + esi], al
add edx, dword [esp + 0x2c]
cmp ecx, edi
jb 0x10005c68
mov edx, dword [esp + 0x1c]
sub ebx, ecx
mov ecx, dword [esp + 0x14]
inc ecx
mov dword [esp + 0x14], ecx
test ebx, ebx
jne 0x10005b40
lea eax, [esp + 0x50]
push 0x20
push eax
call fcn.10013a30
push dword [esp + 0x20]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xe0]
xor ecx, esp
call fcn.100227df
add esp, 0xe4
ret
mov ecx, dword [esp + 0xec]
or eax, 0xffffffff
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100227df
add esp, 0xe4
ret
jmp 0x10005a20