Function at 0x405310
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc
mov ecx, dword [esp + 0x14]
push ebx
mov ebx, dword [esp + 0x14]
xor eax, eax
push ebp
push esi
cmp ecx, eax
push edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
mov dword [0x427220], eax
mov dword [0x42721c], eax
mov dword [0x427218], eax
mov dword [0x427214], eax
mov dword [0x427210], eax
lea ebp, [ebx + ecx]
je 0x4056f9
cmp ecx, 8
jb 0x4056f9
xor ecx, ecx
lea edi, [ebx + 1]
mov cl, byte [ebx]
mov dword [esp + 0x10], edi
mov esi, ecx
mov dword [esp + 0x14], 1
xor esi, 0x6a
je 0x4056f9
lea edx, [esi + edi + 1]
cmp edx, ebp
ja 0x4056f9
xor cl, cl
cmp esi, eax
jbe 0x4053aa
mov bl, byte [eax + edi]
mov dl, al
inc dl
xor bl, dl
mov dl, cl
xor bl, 0x6a
shr dl, 7
add bl, dl
shl cl, 1
add cl, bl
inc eax
cmp eax, esi
jb 0x40538a
mov ebx, dword [esp + 0x20]
mov eax, dword [0x427550]
cmp cl, byte [eax + 0x1d]
jne 0x4056f9
lea ecx, [esp + 0x14]
lea edx, [esp + 0x10]
push ecx
push esi
push edx
call fcn.004051d0
add esp, 0xc
test eax, eax
je 0x4056f9
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
xor eax, eax
mov esi, edx
mov dword [0x427220], ecx
mov al, byte [ecx]
and esi, 0xff
xor eax, esi
xor eax, 0x6a
inc ecx
mov dword [esp + 0x10], ecx
inc edx
lea ecx, [eax + ecx + 1]
mov dword [esp + 0x14], edx
cmp ecx, ebp
ja 0x4056f9
lea edx, [esp + 0x14]
push edx
push eax
lea eax, [esp + 0x18]
push eax
call fcn.004051d0
add esp, 0xc
test eax, eax
je 0x4056f9
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
xor eax, eax
mov esi, edx
mov dword [0x42721c], ecx
mov al, byte [ecx]
and esi, 0xff
xor eax, esi
xor eax, 0x6a
inc ecx
mov dword [esp + 0x10], ecx
inc edx
lea ecx, [eax + ecx + 1]
mov dword [esp + 0x14], edx
cmp ecx, ebp
ja 0x4056f9
lea edx, [esp + 0x14]
push edx
push eax
lea eax, [esp + 0x18]
push eax
call fcn.004051d0
add esp, 0xc
test eax, eax
je 0x4056f9
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
xor eax, eax
mov esi, edx
mov dword [0x427214], ecx
mov al, byte [ecx]
and esi, 0xff
xor eax, esi
xor eax, 0x6a
inc ecx
mov dword [esp + 0x10], ecx
inc edx
lea ecx, [eax + ecx + 1]
mov dword [esp + 0x14], edx
cmp ecx, ebp
ja 0x4056f9
lea edx, [esp + 0x14]
push edx
push eax
lea eax, [esp + 0x18]
push eax
call fcn.004051d0
add esp, 0xc
test eax, eax
je 0x4056f9
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x24]
mov ecx, eax
sub ecx, ebx
cmp edx, ecx
je 0x4056f1
mov bl, byte [eax]
mov ecx, dword [esp + 0x14]
xor bl, cl
xor bl, 0x6a
inc eax
inc ecx
cmp bl, 0x10
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
je 0x4054f6
test bl, 4
je 0x40555c
test bl, 4
mov esi, 0x10
je 0x405526
xor edx, edx
mov dl, byte [eax]
mov esi, edx
mov edx, ecx
and edx, 0xff
xor esi, edx
xor esi, 0x6a
inc eax
inc ecx
cmp esi, 0x10
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
jb 0x4056f9
lea edx, [esi + eax + 1]
cmp edx, ebp
ja 0x4056f9
push ecx
push eax
call fcn.00405220
add esp, 8
test eax, eax
je 0x4056f9
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
lea eax, [eax + esi + 1]
lea ecx, [ecx + esi + 1]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
test bl, 1
je 0x4055b6
xor edx, edx
mov esi, ecx
mov dword [0x427218], eax
mov dl, byte [eax]
and esi, 0xff
xor edx, esi
xor edx, 0x6a
inc eax
inc ecx
mov dword [esp + 0x10], eax
test edx, edx
mov dword [esp + 0x14], ecx
je 0x4056f9
add eax, edx
cmp eax, ebp
ja 0x4056f9
lea ecx, [esp + 0x14]
push ecx
push edx
lea edx, [esp + 0x18]
push edx
call fcn.004051d0
add esp, 0xc
test eax, eax
je 0x4056f9
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
test bl, 2
je 0x405610
xor edx, edx
mov esi, ecx
mov dword [0x427210], eax
mov dl, byte [eax]
and esi, 0xff
xor edx, esi
xor edx, 0x6a
inc eax
inc ecx
mov dword [esp + 0x10], eax
test edx, edx
mov dword [esp + 0x14], ecx
je 0x4056f9
add eax, edx
cmp eax, ebp
ja 0x4056f9
lea ecx, [esp + 0x14]
push ecx
push edx
lea edx, [esp + 0x18]
push edx
call fcn.004051d0
add esp, 0xc
test eax, eax
je 0x4056f9
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
test bl, 0x20
je 0x40565d
xor edx, edx
mov esi, ecx
mov dl, byte [eax]
and esi, 0xff
xor edx, esi
xor edx, 0x6a
inc eax
mov dword [esp + 0x10], eax
add eax, edx
inc ecx
cmp eax, ebp
mov dword [esp + 0x14], ecx
ja 0x4056f9
lea ecx, [esp + 0x14]
push ecx
push edx
lea edx, [esp + 0x18]
push edx
call fcn.004051d0
add esp, 0xc
test eax, eax
je 0x4056f9
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
test bl, 0x40
je 0x4056a2
xor edx, edx
mov esi, ecx
mov dl, byte [eax]
and esi, 0xff
xor edx, esi
xor edx, 0x6a
inc eax
mov dword [esp + 0x10], eax
add eax, edx
inc ecx
cmp eax, ebp
mov dword [esp + 0x14], ecx
ja 0x4056f9
lea ecx, [esp + 0x14]
push ecx
push edx
lea edx, [esp + 0x18]
push edx
call fcn.004051d0
add esp, 0xc
test eax, eax
je 0x4056f9
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
test bl, 0x80
je 0x4056e3
xor edx, edx
mov esi, ecx
mov dl, byte [eax]
and esi, 0xff
xor edx, esi
xor edx, 0x6a
inc eax
mov dword [esp + 0x10], eax
add eax, edx
inc ecx
cmp eax, ebp
mov dword [esp + 0x14], ecx
ja 0x4056f9
lea ecx, [esp + 0x14]
push ecx
push edx
lea edx, [esp + 0x18]
push edx
call fcn.004051d0
add esp, 0xc
test eax, eax
je 0x4056f9
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
sub eax, edx
cmp ecx, eax
jne 0x4056f9
mov dword [esp + 0x18], 1
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret