Function at 0x421570
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x48
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0xfcfdfeff
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 0xf
ja 0x4215f7
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 0x18]
mov edx, eax
and edx, 0xec9ac400
xor eax, 0xec9ac400
lea eax, [eax + edx*2]
xor eax, ecx
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
mov ecx, dword [esp]
mov byte [esp + ecx + 0x18], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 0x10
jb 0x4215c0
mov eax, dword [esp + 0x18]
mov ecx, dword [0x4477e0]
test ecx, ecx
je 0x421644
xor edx, edx
mov esi, dword [0x4477e4]
nop
nop
nop
cmp dword [esi + edx*8], 0xe4aa2089
je 0x421620
inc edx
cmp ecx, edx
jne 0x421610
jmp 0x421644
mov ecx, dword [esi + edx*8 + 4]
cmp ecx, eax
je 0x421644
lea eax, [esp + 0x14]
push eax
push 0
push 0
push 5
push 4
push dword [0x4477e8]
push ecx
call fcn.00438970
add esp, 0x1c
cmp eax, 0xc0000004
jne 0x42170c
push dword [esp + 0x14]
call fcn.00437070
add esp, 4
mov edi, eax
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x18], 0xfcfdfeff
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 0xf
ja 0x4216c7
mov eax, dword [esp]
mov edx, dword [esp]
movzx edx, byte [esp + edx + 0x18]
mov esi, eax
and esi, 0xec9ac400
xor eax, 0xec9ac400
lea eax, [eax + esi*2]
xor eax, edx
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
mov edx, dword [esp]
mov byte [esp + edx + 0x18], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 0x10
jb 0x421690
mov eax, dword [esp + 0x18]
mov edx, dword [0x4477e0]
test edx, edx
je 0x421737
mov dword [esp + 4], ecx
mov ecx, edi
xor esi, esi
mov edi, dword [0x4477e4]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp dword [edi + esi*8], 0xe4aa2089
je 0x421713
mov ebx, esi
and ebx, 1
xor esi, 1
lea esi, [esi + ebx*2]
cmp esi, edx
jb 0x4216f0
mov edi, ecx
jmp 0x421737
xor ebx, ebx
jmp 0x421a1d
mov edx, dword [edi + esi*8 + 4]
cmp edx, eax
mov edi, ecx
je 0x421737
push 0
push dword [esp + 8]
push edi
push 5
push 4
push dword [0x4477e8]
push edx
call fcn.00438970
add esp, 0x1c
xor ebx, ebx
test eax, eax
js 0x421a14
mov ecx, dword [edi]
xor eax, eax
mov edx, edi
nop
nop
nop
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 0x421750
test ebx, ebx
jns 0x421770
mov eax, 0xffffffff
push eax
call fcn.00408cc0
add esp, 4
mov ecx, eax
mov edx, dword [edi]
mov eax, edi
mov dword [esp + 0xc], ecx
mov edi, ecx
mov dword [esp + 0x38], eax
jmp 0x42179e
mov word [edi], 0xa
add edi, 2
mov edx, dword [eax]
test edx, edx
je 0x4217c3
mov ecx, dword [eax + edx + 0x3c]
add eax, edx
movzx edx, word [ecx]
test dx, dx
je 0x421790
add ecx, 2
nop
mov word [edi], dx
add edi, 2
movzx edx, word [ecx]
add ecx, 2
test dx, dx
jne 0x4217b0
jmp 0x421790
xor ebx, ebx
mov eax, dword [esp + 0xc]
cmp edi, eax
je 0x421a07
mov word [edi], 0
movzx ecx, word [eax]
test cx, cx
je 0x42182d
xor ebx, ebx
mov eax, dword [esp + 0xc]
jmp 0x4217fe
add ebx, esi
movzx ecx, word [eax + 2]
add eax, 2
test cx, cx
je 0x42182d
cmp eax, edi
jae 0x42182d
movzx edx, cx
xor ecx, ecx
cmp edx, 0x800
setb byte [esp + 4]
mov esi, 1
cmp edx, 0x80
jb 0x4217f0
movzx edx, byte [esp + 4]
mov cl, dl
xor ecx, 3
mov esi, ecx
jmp 0x4217f0
mov eax, ebx
and eax, 1
mov ecx, ebx
xor ecx, 1
lea eax, [ecx + eax*2]
push eax
call fcn.00408cc0
add esp, 4
mov dword [esp + 0x34], eax
mov edx, eax
test ebx, ebx
mov eax, dword [esp + 0xc]
jle 0x42194f
mov edx, dword [esp + 0x34]
lea ecx, [ebx + edx]
inc ecx
mov dword [esp + 0x3c], ecx
mov ecx, edx
add ecx, ebx
mov dword [esp + 0x40], ecx
jmp 0x42188b
mov byte [edx], cl
mov dword [esp + 4], 1
add eax, 2
add edx, dword [esp + 4]
cmp edx, dword [esp + 0x40]
jae 0x42194f
cmp eax, edi
jae 0x42194f
movzx ecx, word [eax]
test cx, cx
je 0x42194f
cmp cx, 0x7f
jbe 0x421870
mov dword [esp + 0x10], eax
mov eax, edx
not eax
add eax, dword [esp + 0x3c]
cmp eax, 2
jb 0x4218f0
movzx esi, cx
cmp esi, 0x7ff
ja 0x4218f0
mov eax, ecx
shr eax, 6
add al, 0xc0
mov byte [edx], al
and cl, 0x3f
or cl, 0x80
mov byte [edx + 1], cl
mov dword [esp + 4], 2
mov eax, dword [esp + 0x10]
jmp 0x42187a
mov dword [esp + 4], 0
cmp eax, 3
mov eax, dword [esp + 0x10]
jb 0x42187a
movzx eax, cx
mov dword [esp + 4], eax
mov eax, dword [esp + 4]
shr eax, 0xc
or al, 0xe0
mov byte [edx], al
mov eax, dword [esp + 0x10]
shr dword [esp + 4], 6
mov dword [esp + 0x30], edx
mov edx, dword [esp + 4]
and dl, 0x3f
or dl, 0x80
mov esi, dword [esp + 0x30]
mov byte [esi + 1], dl
mov edx, dword [esp + 0x30]
and cl, 0x3f
or cl, 0x80
mov byte [edx + 2], cl
mov dword [esp + 4], 3
jmp 0x42187a
mov byte [edx], 0
mov dword [esp + 0x18], 0xc4b9b3dc
mov dword [esp + 0x1c], 0x3a49b6c5
mov dword [esp + 0x20], 0x4b4e074b
mov word [esp + 0x24], 0xd14c
mov dword [esp + 0x26], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 0x11
ja 0x4219df
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 0x18]
lea edx, [eax + 0x7938317a]
lea esi, [eax + 0x7a]
or edx, esi
and esi, ecx
and edx, ecx
add edx, esi
add eax, ecx
add eax, 0x7938317a
sub eax, edx
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
mov ecx, eax
xor ecx, 0xa9
and eax, 0x29
lea eax, [ecx + eax*2]
inc al
mov ecx, dword [esp]
mov byte [esp + ecx + 0x18], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 0x12
jb 0x421990
lea eax, [esp + 0x18]
mov ecx, dword [ebp + 8]
push ebx
mov esi, dword [esp + 0x38]
push esi
push eax
call fcn.00409840
mov ebx, eax
push esi
call fcn.00408cd0
add esp, 4
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0xc]
jmp 0x421a0b
mov edi, dword [esp + 0x38]
push eax
call fcn.00408cd0
add esp, 4
push edi
call fcn.00437150
add esp, 4
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret