Function at 0x405710
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x10
mov ecx, dword [esp + 0x18]
push ebx
mov ebx, dword [esp + 0x18]
xor eax, eax
push ebp
push esi
cmp ecx, eax
push edi
mov dword [esp + 0x1c], eax
mov dword [0x42a4b4], eax
mov dword [0x42a4b0], eax
mov dword [0x42a4ac], eax
mov dword [0x42a4a8], eax
mov dword [0x42a4a4], eax
lea ebp, [ebx + ecx]
je 0x405ae6
cmp ecx, 8
jb 0x405ae6
xor ecx, ecx
lea edi, [ebx + 1]
mov cl, byte [ebx]
mov dword [esp + 0x14], edi
mov esi, ecx
mov dword [esp + 0x18], 1
xor esi, 0x6a
je 0x405ae6
lea edx, [esi + edi + 1]
cmp edx, ebp
ja 0x405ae6
xor cl, cl
cmp esi, eax
jbe 0x4057a2
mov bl, byte [eax + edi]
mov dl, al
inc dl
xor bl, dl
mov dl, cl
xor bl, 0x6a
add cl, cl
shr dl, 7
add bl, dl
add cl, bl
inc eax
cmp eax, esi
jb 0x405782
mov ebx, dword [esp + 0x24]
mov eax, dword [0x42a7e8]
cmp cl, byte [eax + 0x1d]
jne 0x405ae6
lea ecx, [esp + 0x18]
lea edx, [esp + 0x14]
push ecx
push esi
push edx
call fcn.004055d0
add esp, 0xc
test eax, eax
je 0x405ae6
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
xor eax, eax
mov esi, edx
mov dword [0x42a4b4], ecx
mov al, byte [ecx]
and esi, 0xff
xor eax, esi
xor eax, 0x6a
inc ecx
mov dword [esp + 0x14], ecx
inc edx
lea ecx, [eax + ecx + 1]
mov dword [esp + 0x18], edx
cmp ecx, ebp
ja 0x405ae6
lea edx, [esp + 0x18]
push edx
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.004055d0
add esp, 0xc
test eax, eax
je 0x405ae6
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
xor eax, eax
mov esi, edx
mov dword [0x42a4b0], ecx
mov al, byte [ecx]
and esi, 0xff
xor eax, esi
xor eax, 0x6a
inc ecx
mov dword [esp + 0x14], ecx
inc edx
lea ecx, [eax + ecx + 1]
mov dword [esp + 0x18], edx
cmp ecx, ebp
ja 0x405ae6
lea edx, [esp + 0x18]
push edx
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.004055d0
add esp, 0xc
test eax, eax
je 0x405ae6
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
xor eax, eax
mov esi, edx
mov dword [0x42a4a8], ecx
mov al, byte [ecx]
and esi, 0xff
xor eax, esi
xor eax, 0x6a
inc ecx
mov dword [esp + 0x14], ecx
inc edx
lea ecx, [eax + ecx + 1]
mov dword [esp + 0x18], edx
cmp ecx, ebp
ja 0x405ae6
lea edx, [esp + 0x18]
push edx
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.004055d0
add esp, 0xc
test eax, eax
je 0x405ae6
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x28]
mov ecx, eax
sub ecx, ebx
cmp edx, ecx
je 0x405ade
mov cl, byte [eax]
mov ebx, dword [esp + 0x18]
xor cl, bl
xor cl, 0x6a
inc eax
inc ebx
cmp cl, 0x10
mov byte [esp + 0x13], cl
je 0x4058ea
test cl, 4
je 0x40593a
test cl, 4
mov esi, 0x10
je 0x405912
xor edx, edx
mov ecx, ebx
mov dl, byte [eax]
and ecx, 0xff
mov esi, edx
xor esi, ecx
xor esi, 0x6a
inc eax
inc ebx
cmp esi, 0x10
jb 0x405ae6
lea edi, [esi + eax + 1]
cmp edi, ebp
ja 0x405ae6
push ebx
push eax
call fcn.00405620
add esp, 8
test eax, eax
je 0x405ae6
mov cl, byte [esp + 0x13]
mov eax, edi
lea ebx, [ebx + esi + 1]
test cl, 1
je 0x405998
xor ecx, ecx
mov edx, ebx
mov dword [0x42a4ac], eax
mov cl, byte [eax]
and edx, 0xff
xor ecx, edx
xor ecx, 0x6a
inc eax
inc ebx
mov dword [esp + 0x14], eax
test ecx, ecx
mov dword [esp + 0x18], ebx
je 0x405ae6
add eax, ecx
cmp eax, ebp
ja 0x405ae6
lea edx, [esp + 0x18]
lea eax, [esp + 0x14]
push edx
push ecx
push eax
call fcn.004055d0
add esp, 0xc
test eax, eax
je 0x405ae6
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
mov cl, byte [esp + 0x13]
test cl, 2
je 0x4059f6
xor ecx, ecx
mov edx, ebx
mov dword [0x42a4a4], eax
mov cl, byte [eax]
and edx, 0xff
xor ecx, edx
xor ecx, 0x6a
inc eax
inc ebx
mov dword [esp + 0x14], eax
test ecx, ecx
mov dword [esp + 0x18], ebx
je 0x405ae6
add eax, ecx
cmp eax, ebp
ja 0x405ae6
lea edx, [esp + 0x18]
lea eax, [esp + 0x14]
push edx
push ecx
push eax
call fcn.004055d0
add esp, 0xc
test eax, eax
je 0x405ae6
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
mov cl, byte [esp + 0x13]
test cl, 0x20
je 0x405a47
xor ecx, ecx
mov edx, ebx
mov cl, byte [eax]
and edx, 0xff
xor ecx, edx
xor ecx, 0x6a
inc eax
mov dword [esp + 0x14], eax
add eax, ecx
inc ebx
cmp eax, ebp
mov dword [esp + 0x18], ebx
ja 0x405ae6
lea edx, [esp + 0x18]
lea eax, [esp + 0x14]
push edx
push ecx
push eax
call fcn.004055d0
add esp, 0xc
test eax, eax
je 0x405ae6
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
mov cl, byte [esp + 0x13]
test cl, 0x40
je 0x405a90
xor ecx, ecx
mov edx, ebx
mov cl, byte [eax]
and edx, 0xff
xor ecx, edx
xor ecx, 0x6a
inc eax
mov dword [esp + 0x14], eax
add eax, ecx
inc ebx
cmp eax, ebp
mov dword [esp + 0x18], ebx
ja 0x405ae6
lea edx, [esp + 0x18]
lea eax, [esp + 0x14]
push edx
push ecx
push eax
call fcn.004055d0
add esp, 0xc
test eax, eax
je 0x405ae6
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
mov cl, byte [esp + 0x13]
test cl, cl
jns 0x405ad0
xor ecx, ecx
mov edx, ebx
mov cl, byte [eax]
and edx, 0xff
xor ecx, edx
xor ecx, 0x6a
inc eax
mov dword [esp + 0x14], eax
add eax, ecx
inc ebx
cmp eax, ebp
mov dword [esp + 0x18], ebx
ja 0x405ae6
lea edx, [esp + 0x18]
lea eax, [esp + 0x14]
push edx
push ecx
push eax
call fcn.004055d0
add esp, 0xc
test eax, eax
je 0x405ae6
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
sub eax, edx
cmp ecx, eax
jne 0x405ae6
mov dword [esp + 0x1c], 1
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret