Function at 0x596527
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x18]
sub esp, 0x24
cmp dword [ebp + 0x1c], 0
mov ecx, dword [ebp + 0x10]
push ebx
push esi
lea esi, [eax + 1]
movzx eax, byte [eax]
push edi
je 0x59674b
movzx ebx, byte [esi]
movzx edx, byte [esi + 3]
shl ebx, 8
or ebx, eax
mov edi, dword [ebp + 0xc]
movzx eax, byte [esi + 1]
shl eax, 0x10
or ebx, eax
movzx eax, byte [esi + 2]
shl eax, 0x18
or ebx, eax
movzx eax, byte [esi + 4]
shl eax, 8
or edx, eax
movzx eax, byte [esi + 5]
shl eax, 0x10
or edx, eax
movzx eax, byte [esi + 6]
shl eax, 0x18
dec esi
or edx, eax
mov dword [ebp - 0x1c], esi
add ecx, 0xfffffff8
mov dword [ebp + 0x1c], edx
mov dword [ebp - 0x14], esi
mov dword [ebp - 0xc], ecx
js 0x59665e
mov esi, dword [ebp + 8]
lea eax, [ecx + 8]
shr eax, 3
mov dword [ebp + 0x10], eax
imul eax, eax, 0xfffffff8
add ecx, eax
mov dword [ebp - 0xc], ecx
movzx eax, byte [esi + 1]
movzx edx, byte [esi]
movzx ecx, byte [esi + 4]
shl eax, 8
or edx, eax
movzx eax, byte [esi + 2]
shl eax, 0x10
push dword [ebp + 0x14]
or edx, eax
movzx eax, byte [esi + 3]
shl eax, 0x18
or edx, eax
movzx eax, byte [esi + 5]
shl eax, 8
xor edx, ebx
or ecx, eax
mov dword [ebp - 0x24], edx
movzx eax, byte [esi + 6]
shl eax, 0x10
or ecx, eax
movzx eax, byte [esi + 7]
shl eax, 0x18
add esi, 8
or ecx, eax
lea eax, [ebp - 0x24]
xor ecx, dword [ebp + 0x1c]
push eax
mov dword [ebp - 0x20], ecx
call fcn.00596b36
mov ebx, dword [ebp - 0x24]
mov eax, ebx
mov edx, dword [ebp - 0x20]
shr eax, 8
mov byte [edi], bl
mov byte [edi + 1], al
mov eax, ebx
shr eax, 0x10
mov byte [edi + 2], al
mov eax, ebx
shr eax, 0x18
mov byte [edi + 3], al
mov eax, edx
shr eax, 8
mov byte [edi + 4], dl
mov byte [edi + 5], al
mov eax, edx
shr eax, 0x10
mov byte [edi + 6], al
mov eax, edx
shr eax, 0x18
mov byte [edi + 7], al
add edi, 8
sub dword [ebp + 0x10], 1
pop ecx
pop ecx
mov dword [ebp + 0x1c], edx
jne 0x5965ac
mov ecx, dword [ebp - 0xc]
mov dword [ebp + 0x10], esi
mov esi, dword [ebp - 0x1c]
mov eax, dword [ebp + 0x10]
jmp 0x596661
mov eax, dword [ebp + 8]
cmp ecx, 0xfffffff8
je 0x596733
mov edx, dword [ebp - 0xc]
add eax, 8
add ecx, eax
add edx, 7
xor eax, eax
mov dword [ebp - 0x1c], edx
mov dword [ebp + 0x10], eax
mov dword [ebp - 4], eax
cmp edx, 7
ja case.default.0x596685
jmp dword [edx*4 + 0x5969bb]
dec ecx
movzx eax, byte [ecx]
shl eax, 0x18
mov dword [ebp + 0x10], eax
dec ecx
movzx eax, byte [ecx]
shl eax, 0x10
or dword [ebp + 0x10], eax
dec ecx
movzx eax, byte [ecx]
shl eax, 8
or dword [ebp + 0x10], eax
dec ecx
movzx eax, byte [ecx]
or dword [ebp + 0x10], eax
dec ecx
movzx eax, byte [ecx]
shl eax, 0x18
mov dword [ebp - 4], eax
dec ecx
movzx eax, byte [ecx]
shl eax, 0x10
or dword [ebp - 4], eax
dec ecx
movzx eax, byte [ecx]
shl eax, 8
or dword [ebp - 4], eax
movzx eax, byte [ecx - 1]
mov ecx, dword [ebp - 4]
or ecx, eax
mov eax, dword [ebp + 0x10]
jmp 0x5966df
mov ecx, eax
xor eax, dword [ebp + 0x1c]
xor ecx, ebx
push dword [ebp + 0x14]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x24]
push eax
mov dword [ebp - 0x24], ecx
call fcn.00596b36
mov ebx, dword [ebp - 0x24]
mov eax, ebx
mov edx, dword [ebp - 0x20]
shr eax, 8
mov byte [edi], bl
mov byte [edi + 1], al
mov eax, ebx
shr eax, 0x10
mov byte [edi + 2], al
mov eax, ebx
shr eax, 0x18
mov byte [edi + 3], al
mov eax, edx
shr eax, 8
mov byte [edi + 4], dl
mov byte [edi + 5], al
mov eax, edx
shr eax, 0x10
mov byte [edi + 6], al
mov eax, edx
pop ecx
shr eax, 0x18
pop ecx
mov byte [edi + 7], al
inc esi
mov dword [ebp - 0x10], esi
inc esi
mov eax, esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0xc], esi
add esi, 2
add eax, 4
jmp 0x59695e
mov edi, esi
movzx ebx, byte [edi]
movzx edx, byte [edi + 3]
shl ebx, 8
or ebx, eax
movzx eax, byte [edi + 1]
shl eax, 0x10
or ebx, eax
movzx eax, byte [edi + 2]
shl eax, 0x18
or ebx, eax
movzx eax, byte [edi + 4]
shl eax, 8
or edx, eax
movzx eax, byte [edi + 5]
shl eax, 0x10
or edx, eax
movzx eax, byte [edi + 6]
shl eax, 0x18
dec edi
or edx, eax
mov dword [ebp - 0xc], edi
add ecx, 0xfffffff8
mov dword [ebp + 0x1c], edx
mov dword [ebp - 0x14], edi
mov dword [ebp - 4], ecx
js 0x596870
lea eax, [ecx + 8]
shr eax, 3
mov dword [ebp - 8], eax
imul eax, eax, 0xfffffff8
add ecx, eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], ecx
mov ecx, dword [ebp + 8]
mov dword [ebp + 0x10], eax
movzx eax, byte [ecx + 1]
movzx edi, byte [ecx]
movzx esi, byte [ecx + 4]
shl eax, 8
or edi, eax
movzx eax, byte [ecx + 2]
shl eax, 0x10
push dword [ebp + 0x14]
or edi, eax
movzx eax, byte [ecx + 3]
shl eax, 0x18
or edi, eax
movzx eax, byte [ecx + 5]
shl eax, 8
or esi, eax
mov dword [ebp - 0x24], edi
movzx eax, byte [ecx + 6]
shl eax, 0x10
or esi, eax
movzx eax, byte [ecx + 7]
shl eax, 0x18
add ecx, 8
or esi, eax
mov dword [ebp - 0x10], ecx
lea eax, [ebp - 0x24]
mov dword [ebp - 0x20], esi
push eax
call fcn.005969fb
mov edx, dword [ebp - 0x20]
xor edx, dword [ebp + 0x1c]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x24]
xor ecx, ebx
mov ebx, dword [ebp + 0x10]
mov eax, ecx
shr eax, 8
mov byte [ebx], cl
mov byte [ebx + 1], al
mov eax, ecx
shr eax, 0x10
mov byte [ebx + 2], al
mov eax, edx
shr ecx, 0x18
mov byte [ebx + 3], cl
mov ecx, dword [ebp - 0x10]
mov byte [ebx + 4], dl
shr eax, 8
mov byte [ebx + 5], al
mov eax, edx
shr eax, 0x10
shr edx, 0x18
mov byte [ebx + 6], al
mov byte [ebx + 7], dl
add ebx, 8
sub dword [ebp - 8], 1
mov edx, esi
mov dword [ebp + 0x10], ebx
mov ebx, edi
mov dword [ebp + 0x1c], edx
jne 0x5967b6
mov edi, dword [ebp - 0xc]
mov esi, ecx
mov ecx, dword [ebp - 4]
jmp 0x596879
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [ebp + 0x10], eax
cmp ecx, 0xfffffff8
je 0x59694d
movzx eax, byte [esi + 1]
movzx ecx, byte [esi]
movzx edx, byte [esi + 4]
push dword [ebp + 0x14]
shl eax, 8
or ecx, eax
movzx eax, byte [esi + 2]
shl eax, 0x10
or ecx, eax
movzx eax, byte [esi + 3]
shl eax, 0x18
or ecx, eax
movzx eax, byte [esi + 5]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x24], ecx
movzx ecx, byte [esi + 7]
shl eax, 8
or edx, eax
shl ecx, 8
movzx eax, byte [esi + 6]
or ecx, eax
lea eax, [ebp - 0x24]
shl ecx, 0x10
or edx, ecx
push eax
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x20], edx
call fcn.005969fb
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x24]
pop ecx
xor eax, ebx
mov ebx, dword [ebp - 0x20]
xor ebx, dword [ebp + 0x1c]
pop ecx
lea ecx, [edx + 8]
mov dword [ebp - 8], eax
add ecx, dword [ebp + 0x10]
add edx, 7
cmp edx, 7
ja case.default.0x5968f8
jmp dword [edx*4 + 0x5969db]
dec ecx
mov eax, ebx
shr eax, 0x18
mov byte [ecx], al
dec ecx
mov eax, ebx
shr eax, 0x10
mov byte [ecx], al
dec ecx
mov eax, ebx
shr eax, 8
mov byte [ecx], al
dec ecx
mov byte [ecx], bl
mov edx, dword [ebp - 8]
dec ecx
mov eax, edx
shr eax, 0x18
mov byte [ecx], al
jmp 0x59692a
mov edx, dword [ebp - 8]
dec ecx
mov eax, edx
shr eax, 0x10
mov byte [ecx], al
jmp 0x596937
mov edx, dword [ebp - 8]
dec ecx
mov eax, edx
shr eax, 8
mov byte [ecx], al
jmp 0x596944
mov edx, dword [ebp - 8]
mov byte [ecx - 1], dl
mov ebx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
inc edi
mov dword [ebp - 0x10], edi
inc edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x18], edi
lea esi, [edi + 2]
lea eax, [esi + 2]
mov edi, dword [ebp - 0x14]
mov ecx, edx
mov dword [ebp - 4], ebx
shr dword [ebp - 4], 0x18
mov dword [ebp + 0x1c], ebx
shr dword [ebp + 0x1c], 0x10
mov byte [edi], bl
mov edi, dword [ebp - 0x10]
mov dword [ebp - 0x1c], eax
mov eax, edx
mov dword [ebp + 0x10], ebx
mov dword [ebp - 8], edx
shr dword [ebp - 8], 8
shr eax, 0x18
shr ecx, 0x10
shr dword [ebp + 0x10], 8
mov ebx, dword [ebp + 0x10]
mov byte [edi], bl
mov edi, dword [ebp - 0xc]
mov ebx, dword [ebp + 0x1c]
mov byte [edi], bl
mov edi, dword [ebp - 0x18]
mov ebx, dword [ebp - 4]
mov byte [edi + 1], bl
mov byte [esi], dl
mov edx, dword [ebp - 8]
mov byte [esi + 1], dl
mov edx, dword [ebp - 0x1c]
pop edi
pop esi
pop ebx
mov byte [edx], cl
mov byte [edx + 1], al
leave
ret