Function at 0x59a7a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 0x18]
movzx ecx, byte [eax + 1]
movzx edx, byte [eax + 4]
push ebx
push esi
lea esi, [eax + 1]
shl edx, 0x18
movzx eax, byte [eax]
shl eax, 8
or ecx, eax
movzx eax, byte [esi + 1]
shl ecx, 0x10
shl eax, 8
or ecx, eax
movzx eax, byte [esi + 2]
or ecx, eax
cmp dword [ebp + 0x1c], 0
push edi
mov dword [ebp - 8], ecx
je 0x59a9da
movzx eax, byte [esi + 4]
mov ebx, dword [ebp + 0x10]
mov edi, dword [ebp + 8]
shl eax, 0x10
or edx, eax
movzx eax, byte [esi + 5]
shl eax, 8
or edx, eax
lea eax, [esi + 6]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
movzx eax, byte [eax]
or edx, eax
lea eax, [ebx - 8]
mov dword [ebp - 4], edx
mov dword [ebp + 0x10], eax
test eax, eax
js 0x59a8db
mov ecx, dword [ebp + 0x10]
shr ebx, 3
mov eax, ebx
neg eax
lea ecx, [ecx + eax*8]
mov dword [ebp + 0x10], ecx
nop dword [eax + eax]
movzx edx, byte [edi]
movzx eax, byte [edi + 1]
movzx ecx, byte [edi + 4]
shl eax, 0x10
push dword [ebp + 0x14]
shl edx, 0x18
or edx, eax
shl ecx, 0x18
movzx eax, byte [edi + 2]
shl eax, 8
or edx, eax
movzx eax, byte [edi + 3]
or edx, eax
movzx eax, byte [edi + 5]
xor edx, dword [ebp - 8]
shl eax, 0x10
or ecx, eax
mov dword [ebp - 0x24], edx
movzx eax, byte [edi + 6]
shl eax, 8
or ecx, eax
movzx eax, byte [edi + 7]
or ecx, eax
add edi, 8
xor ecx, dword [ebp - 4]
lea eax, [ebp - 0x24]
push eax
mov dword [ebp - 0x20], ecx
call fcn.0059b030
mov ecx, dword [ebp - 0x24]
add esp, 8
mov edx, dword [ebp - 0x20]
mov eax, ecx
shr eax, 0x18
mov byte [esi], al
mov eax, ecx
shr eax, 0x10
mov byte [esi + 1], al
mov eax, ecx
shr eax, 8
mov byte [esi + 2], al
mov eax, edx
shr eax, 0x18
mov byte [esi + 4], al
mov eax, edx
shr eax, 0x10
mov byte [esi + 5], al
mov eax, edx
shr eax, 8
mov byte [esi + 3], cl
mov byte [esi + 6], al
mov byte [esi + 7], dl
add esi, 8
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
sub ebx, 1
jne 0x59a830
mov eax, dword [ebp + 0x10]
cmp eax, 0xfffffff8
je 0x59a999
lea ecx, [edi + 8]
xor ebx, ebx
add ecx, eax
xor edi, edi
add eax, 7
cmp eax, 7
ja case.default.0x59a8f5
jmp dword [eax*4 + 0x59ac30]
movzx edi, byte [ecx - 1]
dec ecx
movzx eax, byte [ecx - 1]
dec ecx
shl eax, 8
or edi, eax
movzx eax, byte [ecx - 1]
dec ecx
shl eax, 0x10
or edi, eax
movzx eax, byte [ecx - 1]
dec ecx
shl eax, 0x18
or edi, eax
movzx ebx, byte [ecx - 1]
dec ecx
movzx eax, byte [ecx - 1]
dec ecx
shl eax, 8
or ebx, eax
movzx eax, byte [ecx - 1]
dec ecx
shl eax, 0x10
or ebx, eax
movzx eax, byte [ecx - 1]
shl eax, 0x18
or ebx, eax
push dword [ebp + 0x14]
xor ebx, dword [ebp - 8]
lea eax, [ebp - 0x24]
xor edi, edx
mov dword [ebp - 0x24], ebx
push eax
mov dword [ebp - 0x20], edi
call fcn.0059b030
mov ecx, dword [ebp - 0x24]
add esp, 8
mov edx, dword [ebp - 0x20]
mov eax, ecx
shr eax, 0x18
mov byte [esi], al
mov eax, ecx
shr eax, 0x10
mov byte [esi + 1], al
mov eax, ecx
shr eax, 8
mov byte [esi + 2], al
mov eax, edx
shr eax, 0x18
mov byte [esi + 4], al
mov eax, edx
shr eax, 0x10
mov byte [esi + 5], al
mov eax, edx
shr eax, 8
mov dword [ebp - 4], edx
mov byte [esi + 3], cl
mov byte [esi + 6], al
mov byte [esi + 7], dl
mov edi, dword [ebp - 0xc]
mov ebx, edx
add edi, 0xfffffffa
shr ebx, 0x10
mov esi, edx
shr esi, 0x18
lea eax, [edi + 4]
mov dword [ebp - 0x14], eax
mov eax, edx
shr eax, 8
mov dword [ebp + 0x10], eax
mov eax, ecx
shr eax, 8
mov dword [ebp - 8], eax
mov eax, ecx
shr eax, 0x10
mov dword [ebp - 0x10], eax
mov eax, ecx
shr eax, 0x18
mov dword [ebp + 0x1c], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
jmp 0x59abf1
lea eax, [esi + 4]
mov ecx, eax
mov dword [ebp - 0x14], eax
mov ebx, ecx
mov dword [ebp - 0x1c], ebx
movzx eax, byte [ecx]
shl eax, 0x10
or edx, eax
movzx eax, byte [ecx + 1]
shl eax, 8
or edx, eax
lea eax, [ebx + 2]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0xc], eax
movzx eax, byte [eax]
or edx, eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 4], edx
lea ecx, [eax - 8]
mov dword [ebp - 0x10], ecx
test ecx, ecx
js 0x59aaff
shr eax, 3
mov dword [ebp + 0x10], eax
neg eax
lea ecx, [ecx + eax*8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], ecx
mov dword [ebp + 0x1c], eax
nop
movzx edi, byte [ebx]
movzx eax, byte [ebx + 1]
movzx esi, byte [ebx + 4]
shl eax, 0x10
push dword [ebp + 0x14]
shl edi, 0x18
or edi, eax
shl esi, 0x18
movzx eax, byte [ebx + 2]
shl eax, 8
or edi, eax
movzx eax, byte [ebx + 3]
or edi, eax
movzx eax, byte [ebx + 5]
shl eax, 0x10
or esi, eax
mov dword [ebp - 0x24], edi
movzx eax, byte [ebx + 6]
shl eax, 8
or esi, eax
movzx eax, byte [ebx + 7]
or esi, eax
add ebx, 8
lea eax, [ebp - 0x24]
mov dword [ebp - 0x18], ebx
push eax
mov dword [ebp - 0x20], esi
call fcn.0059ac70
mov ebx, dword [ebp + 0x1c]
add esp, 8
mov ecx, dword [ebp - 0x24]
xor ecx, dword [ebp - 8]
inc dword [ebp + 0x1c]
mov eax, ecx
shr eax, 0x18
mov byte [ebx], al
mov eax, ecx
mov ebx, dword [ebp + 0x1c]
inc dword [ebp + 0x1c]
mov edx, dword [ebp - 0x20]
xor edx, dword [ebp - 4]
shr eax, 0x10
mov byte [ebx], al
mov eax, ecx
mov ebx, dword [ebp + 0x1c]
shr eax, 8
mov byte [ebx], al
mov eax, ebx
inc eax
mov ebx, dword [ebp - 0x18]
mov dword [ebp + 0x1c], eax
mov byte [eax], cl
mov ecx, eax
mov eax, edx
shr eax, 0x18
mov byte [ecx + 1], al
mov eax, edx
shr eax, 0x10
mov byte [ecx + 2], al
mov eax, edx
shr eax, 8
mov byte [ecx + 4], dl
mov edx, esi
mov byte [ecx + 3], al
add ecx, 5
sub dword [ebp + 0x10], 1
mov dword [ebp + 0x1c], ecx
mov ecx, edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
jne 0x59aa30
mov esi, dword [ebp + 0x1c]
jmp 0x59ab05
mov esi, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
cmp dword [ebp - 0x10], 0xfffffff8
je 0x59abc1
movzx edi, byte [ebx]
movzx eax, byte [ebx + 1]
movzx edx, byte [ebx + 4]
movzx ecx, byte [ebx + 6]
push dword [ebp + 0x14]
shl eax, 0x10
shl edi, 0x18
or edi, eax
shl edx, 0x18
movzx eax, byte [ebx + 2]
shl eax, 8
or edi, eax
shl ecx, 8
movzx eax, byte [ebx + 3]
or edi, eax
movzx eax, byte [ebx + 5]
shl eax, 0x10
or edx, eax
mov dword [ebp - 0x24], edi
movzx eax, byte [ebx + 7]
or ecx, eax
lea eax, [ebp - 0x24]
or edx, ecx
push eax
mov dword [ebp + 0x10], edx
mov dword [ebp - 0x20], edx
call fcn.0059ac70
mov eax, dword [ebp - 0x10]
add esp, 8
mov edx, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x20]
xor edx, dword [ebp - 8]
xor ebx, dword [ebp - 4]
lea ecx, [eax + 8]
add eax, 7
add ecx, esi
cmp eax, 7
ja case.default.0x59ab80
jmp dword [eax*4 + 0x59ac50]
dec ecx
mov byte [ecx], bl
dec ecx
mov eax, ebx
shr eax, 8
mov byte [ecx], al
dec ecx
mov eax, ebx
shr eax, 0x10
mov byte [ecx], al
dec ecx
shr ebx, 0x18
mov byte [ecx], bl
dec ecx
mov byte [ecx], dl
dec ecx
mov eax, edx
shr eax, 8
mov byte [ecx], al
dec ecx
mov eax, edx
shr eax, 0x10
mov byte [ecx], al
shr edx, 0x18
mov byte [ecx - 1], dl
mov edx, dword [ebp + 0x10]
mov ecx, edi
mov dword [ebp - 4], edx
mov edi, dword [ebp - 0xc]
mov eax, edx
shr eax, 8
mov ebx, edx
mov dword [ebp + 0x10], eax
mov esi, edx
mov eax, ecx
shr ebx, 0x10
shr eax, 8
mov edx, ecx
mov dword [ebp - 8], eax
add edi, 0xfffffffa
mov eax, ecx
shr esi, 0x18
shr eax, 0x10
shr edx, 0x18
mov dword [ebp - 0x10], eax
mov dword [ebp + 0x1c], edx
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x18], esi
mov esi, edi
mov byte [edx - 7], al
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 4]
mov byte [edi], al
mov eax, dword [ebp - 8]
mov byte [edi + 1], al
mov eax, dword [ebp - 0x14]
mov byte [esi + 2], cl
mov ecx, dword [ebp - 0x18]
mov byte [esi + 3], cl
mov ecx, dword [ebp - 0x1c]
mov byte [eax], bl
mov eax, dword [ebp + 0x10]
pop edi
pop esi
mov byte [ecx + 1], al
mov byte [ecx + 2], dl
pop ebx
mov esp, ebp
pop ebp
ret