Function at 0x421330
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 + 0x34], 0
mov dword [esp + 0x10], 0xa8a9aeaf
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov word [esp + 0x1c], 0
mov dword [esp + 4], 0
mov eax, dword [esp + 4]
cmp eax, 0xd
ja 0x4213c4
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 4]
mov ecx, dword [esp + 4]
movzx edx, byte [esp + ecx + 0x10]
lea ecx, [eax + 0x58f5373a]
mov esi, ecx
xor esi, edx
and ecx, edx
add eax, 0x3a
and eax, edx
add eax, ecx
sub esi, eax
lea eax, [esi + ecx*2]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xc]
add al, 0x6a
mov ecx, dword [esp + 4]
mov byte [esp + ecx + 0x10], al
inc dword [esp + 4]
mov eax, dword [esp + 4]
cmp eax, 0xe
jb 0x421380
mov eax, dword [esp + 0x10]
mov ecx, dword [0x447460]
test ecx, ecx
je 0x421414
xor edx, edx
mov esi, dword [0x447464]
nop
nop
nop
nop
nop
nop
cmp dword [esi + edx*8], 0xe4aa2089
je 0x4213f0
inc edx
cmp ecx, edx
jne 0x4213e0
jmp 0x421414
mov ecx, dword [esi + edx*8 + 4]
cmp ecx, eax
je 0x421414
lea eax, [esp + 0x34]
push eax
push 0
push 0
push 5
push 4
push dword [0x447468]
push ecx
call fcn.00438760
add esp, 0x1c
cmp eax, 0xc0000004
jne 0x421573
push dword [esp + 0x34]
call fcn.00436cd0
add esp, 4
mov dword [esp + 8], eax
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x10], 0xa8a9aeaf
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov word [esp + 0x1c], 0
mov dword [esp + 4], 0
mov eax, dword [esp + 4]
cmp eax, 0xd
ja 0x4214b4
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 4]
mov edx, dword [esp + 4]
movzx esi, byte [esp + edx + 0x10]
lea edx, [eax + 0x58f5373a]
mov edi, edx
xor edi, esi
and edx, esi
add eax, 0x3a
and eax, esi
add eax, edx
sub edi, eax
lea eax, [edi + edx*2]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xc]
add al, 0x6a
mov edx, dword [esp + 4]
mov byte [esp + edx + 0x10], al
inc dword [esp + 4]
mov eax, dword [esp + 4]
cmp eax, 0xe
jb 0x421470
mov eax, dword [esp + 0x10]
mov edx, dword [0x447460]
test edx, edx
je 0x4214e2
xor esi, esi
mov edi, dword [0x447464]
nop
nop
nop
nop
nop
nop
cmp dword [edi + esi*8], 0xe4aa2089
je 0x4215e1
inc esi
cmp edx, esi
jne 0x4214d0
mov edi, dword [esp + 8]
xor ebx, ebx
test eax, eax
js 0x4217cc
mov ecx, dword [edi]
xor eax, eax
mov edx, edi
nop
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 0x421500
test ebx, ebx
jns 0x421520
mov eax, 0xffffffff
push eax
call fcn.00409080
add esp, 4
mov ecx, eax
mov edx, dword [edi]
mov eax, edi
mov dword [esp + 0x2c], ecx
mov edi, ecx
jmp 0x42154e
mov word [edi], 0xa
add edi, 2
mov edx, dword [eax]
test edx, edx
je 0x42157a
mov ecx, dword [eax + edx + 0x3c]
add eax, edx
movzx edx, word [ecx]
test dx, dx
je 0x421540
add ecx, 2
nop
mov word [edi], dx
add edi, 2
movzx edx, word [ecx]
add ecx, 2
test dx, dx
jne 0x421560
jmp 0x421540
xor ebx, ebx
jmp 0x4217d5
mov eax, dword [esp + 0x2c]
cmp edi, eax
je 0x4216e5
mov word [edi], 0
movzx ecx, word [eax]
test cx, cx
je 0x4216f0
xor esi, esi
jmp 0x4215b0
add edx, esi
mov esi, edx
movzx ecx, word [eax + 2]
add eax, 2
test cx, cx
je 0x42160d
cmp eax, edi
jae 0x42160d
mov edx, esi
movzx ebx, cx
xor ecx, ecx
cmp ebx, 0x800
setb byte [esp + 0x30]
mov esi, 1
cmp ebx, 0x80
jb 0x4215a0
movzx ebx, byte [esp + 0x30]
mov cl, bl
xor ecx, 3
mov esi, ecx
jmp 0x4215a0
mov edx, dword [edi + esi*8 + 4]
cmp edx, eax
mov edi, dword [esp + 8]
je 0x4214e6
push 0
push ecx
push edi
push 5
push 4
push dword [0x447468]
push edx
call fcn.00438760
add esp, 0x1c
jmp 0x4214e6
lea eax, [esi + 1]
mov dword [esp + 0x40], eax
push eax
call fcn.00409080
add esp, 4
test esi, esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x38], eax
jle 0x42170a
lea ecx, [eax + esi]
mov dword [esp + 0x30], ecx
add dword [esp + 0x40], eax
mov esi, eax
mov edx, dword [esp + 0x2c]
jmp 0x421656
mov byte [esi], cl
mov eax, 1
add edx, 2
add esi, eax
cmp esi, dword [esp + 0x30]
jae 0x42170c
cmp edx, edi
jae 0x42170c
movzx ecx, word [edx]
test cx, cx
je 0x42170c
cmp cx, 0x7f
jbe 0x421640
mov eax, esi
not eax
add eax, dword [esp + 0x40]
cmp eax, 2
jb 0x4216b0
movzx ebx, cx
cmp ebx, 0x7ff
ja 0x4216b0
mov eax, ecx
shr eax, 6
add al, 0xc0
mov byte [esi], al
mov eax, ecx
not eax
or eax, 0x3f
add eax, ecx
add al, 0x81
mov byte [esi + 1], al
mov eax, 2
jmp 0x421647
cmp eax, 3
mov eax, 0
jb 0x421647
movzx ebx, cx
mov eax, ebx
shr eax, 0xc
or al, 0xe0
mov byte [esi], al
shr ebx, 6
and bl, 0x3f
or bl, 0x80
mov byte [esi + 1], bl
and cl, 0x3f
or cl, 0x80
mov byte [esi + 2], cl
mov eax, 3
jmp 0x421647
xor ebx, ebx
mov edi, dword [esp + 8]
jmp 0x4217c3
mov dword [esp + 0x3c], 0
push 1
call fcn.00409080
add esp, 4
mov esi, eax
mov dword [esp + 0x38], eax
jmp 0x42170c
mov esi, eax
mov edi, dword [esp + 8]
mov byte [esi], 0
mov dword [esp + 0x10], 0xfee1e306
mov dword [esp + 0x14], 0xf0e1e0fd
mov dword [esp + 0x18], 0xe3e42fe3
mov word [esp + 0x1c], 0xa5e6
mov dword [esp + 0x1e], 0
mov dword [esp + 0x22], 0
mov word [esp + 0x26], 0
mov dword [esp + 4], 0
mov eax, dword [esp + 4]
cmp eax, 0x17
ja 0x42179e
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 4]
mov ecx, dword [esp + 4]
movzx ecx, byte [esp + ecx + 0x10]
mov edx, eax
and edx, 0xf02afff3
xor eax, 0xf02afff3
lea eax, [eax + edx*2]
xor eax, ecx
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xc]
add al, 0x5b
mov ecx, dword [esp + 4]
mov byte [esp + ecx + 0x10], al
inc dword [esp + 4]
mov eax, dword [esp + 4]
cmp eax, 0x18
jb 0x421760
lea eax, [esp + 0x10]
mov ecx, dword [ebp + 8]
push dword [esp + 0x3c]
mov esi, dword [esp + 0x3c]
push esi
push eax
call fcn.00409ad0
mov ebx, eax
push esi
call fcn.00409090
add esp, 4
mov eax, dword [esp + 0x2c]
push eax
call fcn.00409090
add esp, 4
push edi
call fcn.00436da0
add esp, 4
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret