Function at 0x421620
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x40
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0xa050407
mov dword [esp + 0x14], 0
mov byte [esp + 0x18], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 8
ja 0x4216af
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 0x10]
lea edx, [eax + ecx]
add edx, 0xdc030fd5
add eax, 0xdc030fd5
and eax, ecx
add eax, eax
mov ecx, eax
xor ecx, edx
not eax
and eax, edx
add eax, eax
sub eax, ecx
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
mov ecx, eax
or ecx, 0x2c
and eax, 0x2c
add eax, ecx
inc al
mov ecx, dword [esp]
mov byte [esp + ecx + 0x10], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 9
jb 0x421660
mov eax, dword [esp + 0x10]
mov ecx, dword [0x4489e0]
test ecx, ecx
je 0x42170e
xor edx, edx
mov esi, dword [0x4489e4]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp dword [esi + edx*8], 0x8bca30fc
je 0x4216ea
mov edi, edx
and edi, 1
xor edx, 1
lea edx, [edx + edi*2]
cmp edx, ecx
jb 0x4216d0
jmp 0x42170e
mov ecx, dword [esi + edx*8 + 4]
cmp ecx, eax
je 0x42170e
lea eax, [esp + 0xc]
push eax
push 0
push 0
push 5
push 4
push dword [0x4489e8]
push ecx
call fcn.00439450
add esp, 0x1c
cmp eax, 0xc0000004
jne 0x4217d2
push dword [esp + 0xc]
call fcn.00437740
add esp, 4
mov edi, eax
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x10], 0xa050407
mov dword [esp + 0x14], 0
mov byte [esp + 0x18], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 8
ja 0x42179f
nop
mov eax, dword [esp]
mov edx, dword [esp]
movzx edx, byte [esp + edx + 0x10]
lea esi, [eax + edx]
add esi, 0xdc030fd5
add eax, 0xdc030fd5
and eax, edx
add eax, eax
mov edx, eax
xor edx, esi
not eax
and eax, esi
add eax, eax
sub eax, edx
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
mov edx, eax
or edx, 0x2c
and eax, 0x2c
add eax, edx
inc al
mov edx, dword [esp]
mov byte [esp + edx + 0x10], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 9
jb 0x421750
mov eax, dword [esp + 0x10]
mov edx, dword [0x4489e0]
test edx, edx
je 0x4217fa
mov ebx, edi
xor esi, esi
mov edi, dword [0x4489e4]
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp dword [edi + esi*8], 0x8bca30fc
je 0x4217d9
inc esi
cmp edx, esi
jne 0x4217c0
mov edi, ebx
jmp 0x4217fa
xor ebx, ebx
jmp 0x421aad
mov edx, dword [edi + esi*8 + 4]
cmp edx, eax
mov edi, ebx
je 0x4217fa
push 0
push ecx
push edi
push 5
push 4
push dword [0x4489e8]
push edx
call fcn.00439450
add esp, 0x1c
xor ebx, ebx
test eax, eax
js 0x421aa4
mov ecx, dword [edi]
xor eax, eax
mov edx, edi
nop
nop
nop
nop
nop
nop
lea esi, [edx + ecx]
mov ecx, dword [edx + ecx]
add eax, 0x208
add ebx, 0x104
mov edx, esi
test ecx, ecx
jne 0x421810
test ebx, ebx
jns 0x421830
mov eax, 0xffffffff
push eax
call fcn.00408c90
add esp, 4
mov esi, eax
mov edx, dword [edi]
mov dword [esp + 4], edi
mov eax, edi
mov edi, esi
jmp 0x42185e
mov word [edi], 0xa
add edi, 2
mov edx, dword [eax]
test edx, edx
je 0x421883
mov ecx, dword [eax + edx + 0x3c]
add eax, edx
movzx edx, word [ecx]
test dx, dx
je 0x421850
add ecx, 2
nop
mov word [edi], dx
add edi, 2
movzx edx, word [ecx]
add ecx, 2
test dx, dx
jne 0x421870
jmp 0x421850
cmp edi, esi
mov dword [esp + 0x30], esi
je 0x4219d2
mov word [edi], 0
movzx ecx, word [esi]
test cx, cx
je 0x4219dd
xor ebx, ebx
mov eax, esi
jmp 0x4218c7
mov ecx, ebx
and ecx, 1
xor ebx, 1
lea ebx, [ebx + ecx*2]
movzx ecx, word [eax + 2]
add eax, 2
test cx, cx
je 0x4218f5
cmp eax, edi
jae 0x4218f5
cmp cx, 0x7f
jbe 0x4218b0
movzx ecx, cx
cmp ecx, 0x7ff
ja 0x4218f0
add ebx, 2
jmp 0x4218bb
add ebx, 3
jmp 0x4218bb
lea esi, [ebx + 1]
push esi
call fcn.00408c90
add esp, 4
test ebx, ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], eax
jle 0x4219f7
lea ecx, [eax + ebx]
mov dword [esp + 0x38], ecx
add esi, eax
mov ebx, eax
mov edx, dword [esp + 0x30]
mov dword [esp + 0x34], esi
jmp 0x421946
mov byte [ebx], cl
mov esi, 1
add edx, 2
add ebx, esi
cmp ebx, dword [esp + 0x38]
jae 0x4219f9
cmp edx, edi
jae 0x4219f9
movzx ecx, word [edx]
test cx, cx
je 0x4219f9
cmp cx, 0x7f
jbe 0x421930
mov eax, ebx
not eax
add eax, dword [esp + 0x34]
cmp eax, 2
jb 0x4219a0
movzx esi, cx
cmp esi, 0x7ff
ja 0x4219a0
mov eax, ecx
shr eax, 6
add al, 0xc0
mov byte [ebx], al
and cl, 0x3f
or cl, 0x80
mov byte [ebx + 1], cl
mov esi, 2
jmp 0x421937
xor esi, esi
cmp eax, 3
jb 0x421937
movzx esi, cx
mov eax, esi
shr eax, 0xc
or al, 0xe0
mov byte [ebx], al
mov eax, esi
shr eax, 6
and al, 0x3f
or al, 0x80
mov byte [ebx + 1], al
and cl, 0x3f
or cl, 0x80
mov byte [ebx + 2], cl
mov esi, 3
jmp 0x421937
xor ebx, ebx
mov edi, dword [esp + 4]
jmp 0x421a98
mov dword [esp + 0x2c], 0
push 1
call fcn.00408c90
add esp, 4
mov ebx, eax
mov dword [esp + 0x28], eax
jmp 0x4219f9
mov ebx, eax
mov edi, dword [esp + 4]
mov byte [ebx], 0
mov dword [esp + 0x10], 0xbeb1b3d6
mov dword [esp + 0x14], 0x405150bd
mov dword [esp + 0x18], 0x53540f53
mov word [esp + 0x1c], 0xd556
mov dword [esp + 0x1e], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 0x11
ja 0x421a77
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 0x10]
lea edx, [eax + 0x7b]
add eax, ecx
and edx, ecx
add edx, edx
sub eax, edx
add eax, 0x85e85a7b
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
add al, 0xa3
mov ecx, dword [esp]
mov byte [esp + ecx + 0x10], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 0x12
jb 0x421a40
lea eax, [esp + 0x10]
mov ecx, dword [ebp + 8]
push dword [esp + 0x2c]
mov esi, dword [esp + 0x2c]
push esi
push eax
call fcn.004096e0
mov ebx, eax
push esi
call fcn.00408ca0
add esp, 4
push dword [esp + 0x30]
call fcn.00408ca0
add esp, 4
push edi
call fcn.00437830
add esp, 4
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret