Function at 0x421ed0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], edi
mov dword [ebp - 4], esi
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x14]
mov eax, dword [eax + 8]
cmp eax, 5
jl 0x422329
cmp eax, 0x11
jg 0x422222
mov eax, dword [ebp + 0x10]
test byte [eax + 0x165], 0x20
je 0x421f7f
cmp dword [ebp + 0xc], 1
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
je 0x422338
mov eax, dword [ebp + 0xc]
mov edx, eax
shr edx, 0x1f
add edx, eax
sar edx, 1
test edx, edx
mov dword [ebp - 0x14], edx
jle 0x422213
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], ecx
xor edx, edx
lea eax, [esi + ebx]
mov dword [ebp - 0x18], eax
lea edi, [esi + ecx]
xor esi, esi
xor eax, eax
mov dword [ebp - 0x1c], edi
mov edi, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x10], esi
movzx esi, byte [edx + edi]
mov edi, dword [ebp - 0x1c]
movzx ebx, byte [eax + edi - 1]
mov byte [edx + ecx], bl
movzx ecx, byte [eax + edi - 1]
xor esi, ebx
mov ebx, dword [ebp - 0x18]
xor ecx, esi
mov esi, dword [ebp - 0x10]
mov byte [esi + ebx - 1], cl
dec esi
dec eax
inc edx
cmp edx, dword [ebp - 0x14]
jl 0x421f47
jmp 0x422213
cmp dword [ebp + 0xc], 1
je 0x422342
cmp dword [ebp + 0xc], 2
je 0x422191
cmp dword [ebp + 0xc], 4
jne 0x422022
mov eax, dword [ebp + 8]
mov esi, dword [eax]
mov edx, esi
and edx, 3
jne 0x421fad
mov eax, dword [esi]
jmp 0x421fcf
and esi, 0xfffffffc
test edx, edx
je 0x421fc2
mov eax, dword [esi + 4]
mov ecx, edx
neg ecx
shl ecx, 3
shl eax, cl
jmp 0x421fc4
xor eax, eax
mov esi, dword [esi]
shl edx, 3
mov ecx, edx
shr esi, cl
or eax, esi
mov edx, ebx
and edx, 3
jne 0x421fdd
mov dword [ebx], eax
jmp 0x422213
and ebx, 0xfffffffc
lea edi, [edx*8]
mov ecx, edi
mov esi, 0xffffffff
shl esi, cl
test edx, edx
je 0x422011
mov ecx, dword [ebx + 4]
mov dword [ebp - 0x24], esi
and ecx, esi
neg edx
shl edx, 3
mov esi, ecx
mov ecx, edx
mov edx, eax
shr edx, cl
or esi, edx
mov dword [ebx + 4], esi
mov esi, dword [ebp - 0x24]
not esi
and esi, dword [ebx]
mov ecx, edi
shl eax, cl
or esi, eax
mov dword [ebx], esi
jmp 0x422213
cmp dword [ebp + 0xc], 8
jne 0x42217b
mov eax, dword [ebp + 8]
mov eax, dword [eax]
test al, 3
jne 0x422042
mov edx, dword [eax]
mov esi, dword [eax + 4]
mov dword [ebp - 0x10], edx
jmp 0x4220cb
mov edx, eax
and edx, 0xfffffff8
mov dword [ebp - 0x20], edx
and eax, 7
je 0x422083
mov esi, dword [edx + 8]
mov dword [ebp - 0x24], esi
mov esi, dword [edx + 0xc]
mov edi, eax
neg edi
lea ecx, [edi*8 + 0x40]
cmp ecx, 0x1f
ja 0x422075
mov edx, dword [ebp - 0x24]
shld esi, edx, cl
shl edx, cl
mov dword [ebp - 0x10], edx
jmp 0x422088
mov esi, dword [ebp - 0x24]
shl esi, cl
mov dword [ebp - 0x10], 0
jmp 0x422088
xor esi, esi
mov dword [ebp - 0x10], esi
mov edi, dword [ebp - 0x20]
mov edx, dword [edi]
mov dword [ebp - 0x24], edx
mov edx, dword [edi + 4]
shl eax, 3
cmp eax, 0x1f
ja 0x4220af
mov edi, dword [ebp - 0x24]
mov ecx, eax
shrd edi, edx, cl
mov eax, edx
shr eax, cl
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], eax
jmp 0x4220bf
mov dword [ebp - 0x20], 0
mov ecx, eax
mov eax, edx
shr eax, cl
mov dword [ebp - 0x24], eax
or esi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x10]
or eax, dword [ebp - 0x24]
mov dword [ebp - 0x10], eax
test bl, 3
jne 0x4220dd
mov eax, dword [ebp - 0x10]
mov dword [ebx], eax
mov dword [ebx + 4], esi
jmp 0x422213
mov edx, ebx
and edx, 0xfffffff8
and ebx, 7
lea ecx, [ebx*8]
mov eax, 0xffffffff
shl eax, cl
mov dword [ebp - 0x14], ecx
test ebx, ebx
je 0x42214e
mov ecx, dword [edx + 0xc]
mov dword [ebp - 0x1c], esi
mov esi, dword [edx + 8]
mov dword [ebp - 0x24], ecx
and esi, eax
mov dword [ebp - 0x20], esi
mov esi, dword [ebp - 0x1c]
neg ebx
lea ecx, [ebx*8 + 0x40]
cmp ecx, 0x1f
ja 0x42212e
mov ebx, dword [ebp - 0x10]
shrd ebx, esi, cl
mov dword [ebp - 0x18], ebx
mov edi, esi
shr edi, cl
mov dword [ebp - 0x1c], edi
jmp 0x42213c
mov dword [ebp - 0x1c], 0
mov ebx, esi
shr ebx, cl
mov dword [ebp - 0x18], ebx
mov ecx, dword [ebp - 0x20]
or ecx, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x24]
or ebx, dword [ebp - 0x1c]
mov dword [edx + 8], ecx
mov dword [edx + 0xc], ebx
not eax
and eax, dword [edx]
cmp dword [ebp - 0x14], 0x1f
ja 0x422165
mov ecx, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x10]
shld esi, ebx, cl
shl ebx, cl
jmp 0x42216f
mov ecx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x10]
shl esi, cl
xor ebx, ebx
or eax, ebx
mov dword [edx], eax
mov dword [edx + 4], esi
jmp 0x422213
push dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push dword [eax]
push ebx
call fcn.004a2e20
add esp, 0xc
jmp 0x422213
mov eax, dword [ebp + 8]
mov edx, dword [eax]
mov esi, edx
and esi, 0xfffffffe
and edx, 1
je 0x4221b3
movsx eax, word [esi + 2]
mov edi, edx
neg edi
lea ecx, [edi*8 + 0x10]
shl eax, cl
jmp 0x4221b5
xor eax, eax
movzx esi, word [esi]
shl edx, 3
mov ecx, edx
shr esi, cl
mov edi, 0xffffffff
or eax, esi
mov esi, ebx
and esi, 0xfffffffe
and ebx, 1
lea edx, [ebx*8]
mov ecx, edx
shl edi, cl
test ebx, ebx
je 0x422203
movzx ecx, word [esi + 2]
mov dword [ebp - 0x24], edi
and ecx, edi
mov dword [ebp - 0x20], ecx
movzx edi, ax
neg ebx
lea ecx, [ebx*8 + 0x10]
shr edi, cl
mov ebx, dword [ebp - 0x20]
or ebx, edi
mov edi, dword [ebp - 0x24]
mov word [esi + 2], bx
movzx ebx, word [esi]
not edi
and ebx, edi
mov ecx, edx
shl eax, cl
or ebx, eax
mov word [esi], bx
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
xor eax, eax
mov esp, ebp
pop ebp
ret
cmp eax, 0x19
jl 0x422329
cmp eax, 0x1f
jle 0x422251
cmp eax, 0x32
jl 0x42223f
cmp eax, 0x34
jle 0x422251
jmp 0x422329
cmp eax, 0x28
jl 0x422329
cmp eax, 0x30
jg 0x422329
mov edx, dword [eax*4 + 0x4c3f9c]
mov eax, dword [ebp + 0x10]
movsx esi, byte [eax + 0x150]
cmp edx, 0xffffffff
je 0x422293
mov eax, dword [ebp + 8]
mov eax, dword [eax]
lea ecx, [esi*4]
mov edi, esi
shl edi, 5
sub edi, ecx
mov edx, dword [edi + edx*4 + 0x4c4160]
test edx, edx
je 0x4222a5
push ebx
push 0
push eax
call edx
add esp, 0xc
cmp eax, 1
je 0x4222c7
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov eax, 0x5f
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0xc], 4
mov edx, dword [eax]
mov dword [ebx], edx
je 0x4222c7
cmp dword [ebp + 0xc], 8
mov edx, dword [eax + 4]
mov dword [ebx + 4], edx
je 0x4222c7
mov edx, dword [eax + 8]
mov dword [ebx + 8], edx
mov eax, dword [eax + 0xc]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp + 0x10]
test byte [eax + 0x165], 0x20
je 0x422329
test esi, esi
je 0x4222e7
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
cmp eax, 0x34
je 0x4222e7
cmp eax, 0x32
jne 0x422329
mov edx, dword [ebp + 0xc]
mov eax, edx
shr eax, 0x1f
add eax, edx
sar eax, 1
test eax, eax
jle 0x422329
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x24], eax
xor esi, esi
add edx, ebx
xor ecx, ecx
mov dword [ebp - 0x20], edx
mov edi, dword [ebp - 0x20]
movzx edx, byte [ebx]
movzx eax, byte [ecx + edi - 1]
xor edx, eax
mov dword [ebp - 0x1c], edx
mov byte [ebx], al
mov al, byte [ebp - 0x1c]
mov edx, edi
inc ebx
xor byte [ecx + edx - 1], al
dec ecx
inc esi
cmp esi, dword [ebp - 0x24]
jl 0x422306
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
xor eax, eax
mov esp, ebp
pop ebp
ret
movzx eax, byte [ecx]
mov byte [ebx], al
jmp 0x422213
mov esi, dword [ebp + 8]
mov edi, dword [esi]
movzx eax, byte [edi]
mov byte [ebx], al
jmp 0x422213