Function at 0x10224a74
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x14
mov eax, dword [esp + 0x48]
mov esi, dword [esp + 0x3c]
mov dword [eax], 0
push esi
call fcn.10146454
add esp, 4
mov ebp, eax
test eax, eax
jne 0x10224cf9
mov ecx, dword [esp + 0x38]
mov edi, dword [esp + 0x2c]
mov ebp, 0x20012
mov eax, ecx
and ecx, 7
shr eax, 3
cmp ecx, 1
sbb eax, 0xffffffff
cmp eax, edi
jne 0x10224cf9
imul ecx, esi, 0x64
add eax, 0xfffffffe
mov ebx, dword [ecx + 0x10483e24]
lea ecx, [ebx + ebx]
cmp ecx, eax
jae 0x10224cf9
push edi
call fcn.10071f14
add esp, 4
mov ebp, eax
push edi
call fcn.10071f14
add esp, 4
mov edi, eax
push ebx
call fcn.10071f14
add esp, 4
mov edx, eax
test ebp, ebp
je 0x10224b03
test edi, edi
je 0x10224b03
test edx, edx
jne 0x10224b38
test ebp, ebp
je 0x10224b14
push ebp
mov esi, edx
call fcn.1007274c
mov edx, esi
add esp, 4
test edi, edi
je 0x10224b25
push edi
mov esi, edx
call fcn.1007274c
mov edx, esi
add esp, 4
mov ebp, 0xc
test edx, edx
je 0x10224cf9
push edx
jmp 0x10224cf1
mov eax, dword [esp + 0x28]
mov dword [esp + 4], ebp
xor ebp, ebp
mov dword [esp + 0xc], edi
cmp byte [eax], 0
jne 0x10224cd8
mov ebp, eax
inc eax
push ebx
push eax
push edx
mov dword [esp + 0xc], edx
call fcn.100e01c4
add esp, 0xc
mov eax, dword [esp + 0x2c]
mov edi, ebx
not edi
add edi, eax
lea eax, [ebp + ebx + 1]
push edi
push eax
mov ebp, dword [esp + 0xc]
push ebp
call fcn.100e01c4
add esp, 0xc
mov eax, dword [esp + 0x2c]
mov dword [esp + 8], eax
push ebx
push dword [esp + 0x10]
push edi
push ebp
push esi
call fcn.1008d584
mov edx, dword [esp + 0x14]
add esp, 0x14
mov ebp, eax
test eax, eax
jne 0x10224cd8
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0xc]
test ebx, ebx
je 0x10224bbd
xor eax, eax
mov cl, byte [edi + eax]
xor byte [edx + eax], cl
inc eax
cmp eax, ebx
jne 0x10224bb2
mov eax, edi
mov edi, dword [esp + 0x10]
push edi
push eax
push ebx
push edx
push esi
call fcn.1008d584
mov edx, dword [esp + 0x14]
add esp, 0x14
mov ebp, eax
test eax, eax
jne 0x10224cd8
mov ebp, dword [esp + 4]
mov eax, dword [esp + 0xc]
test edi, edi
je 0x10224bf8
xor ecx, ecx
mov dl, byte [eax + ecx]
xor byte [ebp + ecx], dl
inc ecx
cmp ecx, edi
jne 0x10224bec
mov eax, dword [esp + 0x2c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x30]
test eax, eax
je 0x10224c21
lea ecx, [esp + 8]
push ecx
mov ebp, dword [esp + 4]
push ebp
push dword [esp + 0x3c]
push eax
push esi
call fcn.10181c54
mov edx, ebp
jmp 0x10224c36
lea eax, [esp + 8]
push eax
mov edi, dword [esp + 4]
push edi
push 0
push ebp
push esi
call fcn.10181c54
mov edx, edi
add esp, 0x14
mov ebp, eax
test eax, eax
jne 0x10224cd8
push ebx
push dword [esp + 8]
push edx
call fcn.102535a4
add esp, 0xc
xor ebp, ebp
test eax, eax
je 0x10224c5c
mov edx, dword [esp]
jmp 0x10224cd8
mov ecx, dword [esp + 0x10]
mov dword [esp + 8], ebx
cmp ebx, ecx
jb 0x10224c6d
mov edx, dword [esp]
jmp 0x10224c83
mov eax, dword [esp + 4]
mov edx, dword [esp]
cmp byte [eax + ebx], 0
jne 0x10224c83
inc ebx
cmp ebx, ecx
mov dword [esp + 8], ebx
jb 0x10224c74
mov ebp, 0x20005
cmp ebx, ecx
je 0x10224cd8
mov eax, dword [esp + 4]
cmp byte [eax + ebx], 1
jne 0x10224cd8
mov edi, dword [esp + 0x44]
mov esi, ecx
inc ebx
mov ebp, 0x20004
mov eax, esi
mov dword [esp + 8], ebx
sub eax, ebx
cmp eax, dword [edi]
mov dword [edi], eax
ja 0x10224cd8
mov ecx, dword [esp + 4]
add ecx, ebx
push eax
push ecx
push dword [esp + 0x48]
call fcn.100e01c4
mov edx, dword [esp + 0xc]
add esp, 0xc
mov eax, dword [esp + 0x48]
add dword [esp + 8], esi
xor ebp, ebp
mov dword [eax], 1
push edx
call fcn.1007274c
add esp, 4
push dword [esp + 0xc]
call fcn.1007274c
add esp, 4
push dword [esp + 4]
call fcn.1007274c
add esp, 4
mov eax, ebp
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret