Function at 0x4060be
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, dword [ebp + 8]
xor edx, edx
cmp ebx, edx
mov dword [ebp - 4], edx
jne 0x4060d6
push 0xffffffffffffff9a
pop eax
jmp 0x406117
push esi
mov esi, dword [ebx + 0x9c]
cmp esi, edx
jne 0x4060e5
push 0xffffffffffffff9a
jmp 0x4060eb
cmp dword [esi], edx
jne 0x4060ee
push 0xffffffffffffff9c
pop eax
jmp 0x406116
mov ecx, dword [ebp + 0x10]
cmp ecx, edx
jne 0x4060f9
xor eax, eax
jmp 0x406116
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0x5c]
cmp ecx, eax
mov dword [esi + 0x14], ecx
jbe 0x40610c
mov dword [esi + 0x14], eax
cmp dword [esi + 0x14], edx
push edi
ja 0x40611f
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret
mov ebx, dword [ebp + 8]
xor edx, edx
cmp dword [esi + 8], edx
jne 0x4061f1
mov eax, dword [esi + 0x58]
cmp eax, edx
jbe 0x4061f1
mov edi, 0x4000
cmp eax, edi
mov dword [ebp - 8], edi
jae 0x406144
mov dword [ebp - 8], eax
mov edi, eax
mov eax, dword [esi + 0x88]
add eax, dword [esi + 0x3c]
push edx
push eax
push dword [esi + 0x80]
push dword [esi + 0x7c]
call dword [esi + 0x70]
add esp, 0x10
test eax, eax
jne 0x4062b1
push edi
push dword [esi]
push dword [esi + 0x80]
push dword [esi + 0x7c]
call dword [esi + 0x64]
add esp, 0x10
cmp eax, edi
jne 0x4062b1
cmp dword [ebx + 0xa0], 0
je 0x4061e1
xor ebx, ebx
test edi, edi
jbe 0x4061e1
mov ecx, dword [ebp + 8]
add ecx, 0xa4
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xac]
mov edx, dword [esi]
and eax, 0xfffd
or eax, 2
lea edi, [edx + ebx]
mov edx, eax
xor edx, 1
imul edx, eax
shr edx, 8
xor byte [edi], dl
mov eax, dword [esi]
movsx eax, byte [eax + ebx]
push eax
mov eax, dword [ebp + 8]
mov edi, dword [eax + 0xb0]
call fcn.004058a1
mov edx, dword [esi]
add esp, 4
mov byte [ebx + edx], al
inc ebx
cmp ebx, dword [ebp - 8]
jb 0x406198
mov edi, dword [ebp - 8]
mov eax, dword [esi]
add dword [esi + 0x3c], edi
sub dword [esi + 0x58], edi
mov dword [esi + 4], eax
mov dword [esi + 8], edi
xor edx, edx
cmp dword [esi + 0x84], edx
je 0x40624b
cmp dword [esi + 0x8c], edx
jne 0x40624b
mov eax, dword [esi + 0x10]
mov edi, dword [esi + 0x18]
mov dword [ebp - 8], eax
lea eax, [esi + 4]
push 2
push eax
call fcn.004031bb
mov ebx, dword [esi + 0x18]
sub ebx, edi
push ebx
push dword [ebp - 8]
mov dword [ebp - 0xc], eax
push dword [esi + 0x50]
call fcn.004020d9
sub dword [esi + 0x5c], ebx
add dword [ebp - 4], ebx
mov dword [esi + 0x50], eax
mov eax, dword [ebp - 0xc]
add esp, 0x14
cmp eax, 1
je 0x406112
test eax, eax
jne 0x406115
jmp 0x4062a2
mov eax, dword [esi + 8]
cmp eax, edx
jne 0x40625b
cmp dword [esi + 0x58], edx
je 0x406112
mov ebx, dword [esi + 0x14]
cmp ebx, eax
jb 0x406264
mov ebx, eax
xor eax, eax
test ebx, ebx
jbe 0x40627b
mov ecx, dword [esi + 4]
mov cl, byte [eax + ecx]
mov edx, dword [esi + 0x10]
mov byte [eax + edx], cl
inc eax
cmp eax, ebx
jb 0x40626a
push ebx
push dword [esi + 0x10]
push dword [esi + 0x50]
call fcn.004020d9
sub dword [esi + 0x5c], ebx
sub dword [esi + 8], ebx
sub dword [esi + 0x14], ebx
add dword [esi + 0x10], ebx
add dword [esi + 4], ebx
add dword [esi + 0x18], ebx
add esp, 0xc
add dword [ebp - 4], ebx
mov dword [esi + 0x50], eax
cmp dword [esi + 0x14], 0
ja 0x40611a
jmp 0x406112
or eax, 0xffffffff
jmp 0x406115