Function at 0x5a90c8
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [esp + 0x14]
mov eax, ebp
shr eax, 2
push esi
mov esi, ecx
mov dword [esp + 0x18], eax
add eax, 6
mov dword [esi + 0x38], eax
push edi
lea eax, [eax*4 + 4]
push eax
lea ecx, [esi + 0x3c]
mov dword [esp + 0x14], esi
call fcn.0058969c
mov ebx, dword [esi + 0x40]
mov esi, dword [esp + 0x18]
mov ecx, ebp
mov edx, ecx
shr ecx, 2
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x1c]
shl ecx, 2
sub ecx, ebp
mov edx, ecx
shr ecx, 2
xor eax, eax
lea edi, [ebx + ebp]
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [ebp + 3]
mov ecx, eax
and ecx, 3
sub eax, ecx
push eax
push ebx
push ebx
call fcn.0059de9c
add esp, 0xc
cmp ebp, 0x10
je 0x5a93f0
cmp ebp, 0x18
je 0x5a92d0
cmp ebp, 0x20
jne 0x5a94f9
mov ecx, dword [ebx + 0x1c]
mov edx, ecx
shr edx, 8
movzx edx, dl
mov edx, dword [edx*4 + 0x1008eba8]
mov ebp, dword [0x100903a8]
mov eax, ecx
shr eax, 0x18
mov eax, dword [eax*4 + 0x1008eba8]
and edx, 0xff0000
and eax, 0xff
xor eax, edx
mov edx, ecx
shr edx, 0x10
movzx edx, dl
mov edx, dword [edx*4 + 0x1008eba8]
movzx ecx, cl
and edx, 0xff000000
xor eax, edx
mov edx, dword [ecx*4 + 0x1008eba8]
mov ecx, dword [ebx]
and edx, 0xff00
xor eax, edx
xor eax, ecx
mov ecx, dword [ebx + 4]
xor eax, ebp
xor ecx, eax
mov dword [ebx + 0x20], eax
mov eax, dword [ebx + 8]
xor eax, ecx
mov dword [ebx + 0x24], ecx
mov ecx, dword [ebx + 0xc]
xor ecx, eax
mov dword [ebx + 0x28], eax
mov dword [ebx + 0x2c], ecx
mov esi, 4
mov ecx, dword [ebx + 0x2c]
mov edx, ecx
shr edx, 0x10
movzx eax, dl
mov eax, dword [eax*4 + 0x1008eba8]
mov edx, ecx
shr edx, 0x18
mov edx, dword [edx*4 + 0x1008eba8]
and edx, 0xff000000
mov ebp, dword [ebx + 0x10]
and eax, 0xff0000
xor eax, edx
mov edx, ecx
shr edx, 8
movzx edx, dl
mov edx, dword [edx*4 + 0x1008eba8]
and edx, 0xff00
xor eax, edx
movzx ecx, cl
mov edx, dword [ecx*4 + 0x1008eba8]
mov ecx, dword [ebx + 0x14]
and edx, 0xff
xor eax, edx
xor eax, ebp
mov dword [ebx + 0x30], eax
xor ecx, eax
mov eax, dword [ebx + 0x18]
mov dword [ebx + 0x34], ecx
xor eax, ecx
mov ecx, dword [ebx + 0x1c]
mov dword [ebx + 0x38], eax
xor ecx, eax
mov dword [ebx + 0x3c], ecx
mov ecx, dword [ebx + 0x3c]
add ebx, 0x20
mov edx, ecx
shr edx, 0x18
mov eax, dword [edx*4 + 0x1008eba8]
mov edx, ecx
shr edx, 8
movzx edx, dl
mov edx, dword [edx*4 + 0x1008eba8]
and edx, 0xff0000
and eax, 0xff
xor eax, edx
mov edx, ecx
shr edx, 0x10
movzx edx, dl
mov edx, dword [edx*4 + 0x1008eba8]
movzx ecx, cl
and edx, 0xff000000
xor eax, edx
mov edx, dword [ecx*4 + 0x1008eba8]
mov ecx, dword [ebx]
and edx, 0xff00
xor eax, edx
xor eax, dword [esi + 0x100903a8]
xor eax, ecx
mov dword [ebx + 0x20], eax
mov ecx, dword [ebx + 4]
xor ecx, eax
mov dword [ebx + 0x24], ecx
mov eax, dword [ebx + 8]
xor eax, ecx
mov dword [ebx + 0x28], eax
mov ecx, dword [ebx + 0xc]
xor ecx, eax
add esi, 4
cmp esi, 0x1c
mov dword [ebx + 0x2c], ecx
jne 0x5a91cf
jmp 0x5a94f9
mov ecx, dword [ebx + 0x14]
mov edx, ecx
shr edx, 0x18
mov eax, dword [edx*4 + 0x1008eba8]
mov edx, ecx
shr edx, 8
movzx edx, dl
mov edx, dword [edx*4 + 0x1008eba8]
mov ebp, dword [0x100903a8]
and edx, 0xff0000
and eax, 0xff
xor eax, edx
mov edx, ecx
shr edx, 0x10
movzx edx, dl
mov edx, dword [edx*4 + 0x1008eba8]
movzx ecx, cl
and edx, 0xff000000
xor eax, edx
mov edx, dword [ecx*4 + 0x1008eba8]
mov ecx, dword [ebx]
and edx, 0xff00
xor eax, edx
xor eax, ecx
mov ecx, dword [ebx + 4]
xor eax, ebp
xor ecx, eax
mov dword [ebx + 0x18], eax
mov eax, dword [ebx + 8]
xor eax, ecx
mov dword [ebx + 0x1c], ecx
mov ecx, dword [ebx + 0xc]
xor ecx, eax
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x24], ecx
mov esi, 4
mov ecx, dword [ebx + 0x24]
mov eax, dword [ebx + 0x10]
mov edx, dword [ebx + 0x14]
xor eax, ecx
xor edx, eax
mov dword [ebx + 0x28], eax
mov dword [ebx + 0x2c], edx
mov ecx, dword [ebx + 0x2c]
add ebx, 0x18
mov edx, ecx
shr edx, 8
movzx edx, dl
mov edx, dword [edx*4 + 0x1008eba8]
mov eax, ecx
shr eax, 0x18
mov eax, dword [eax*4 + 0x1008eba8]
and edx, 0xff0000
and eax, 0xff
xor eax, edx
mov edx, ecx
shr edx, 0x10
movzx edx, dl
mov edx, dword [edx*4 + 0x1008eba8]
movzx ecx, cl
and edx, 0xff000000
xor eax, edx
mov edx, dword [ecx*4 + 0x1008eba8]
mov ecx, dword [ebx]
and edx, 0xff00
xor eax, edx
xor eax, dword [esi + 0x100903a8]
xor eax, ecx
mov dword [ebx + 0x18], eax
mov ecx, dword [ebx + 4]
xor ecx, eax
mov dword [ebx + 0x1c], ecx
mov eax, dword [ebx + 8]
xor eax, ecx
mov dword [ebx + 0x20], eax
mov ecx, dword [ebx + 0xc]
xor ecx, eax
add esi, 4
cmp esi, 0x20
mov dword [ebx + 0x24], ecx
jne 0x5a9350
jmp 0x5a94f9
mov ecx, dword [ebx + 0xc]
mov edx, ecx
shr edx, 0x18
mov eax, dword [edx*4 + 0x1008eba8]
mov edx, ecx
shr edx, 8
movzx edx, dl
mov edx, dword [edx*4 + 0x1008eba8]
and edx, 0xff0000
mov esi, dword [ebx]
and eax, 0xff
xor eax, edx
mov edx, ecx
shr edx, 0x10
movzx edx, dl
mov edx, dword [edx*4 + 0x1008eba8]
and edx, 0xff000000
xor eax, edx
movzx edx, cl
mov edx, dword [edx*4 + 0x1008eba8]
and edx, 0xff00
xor eax, edx
mov edx, dword [0x100903a8]
xor eax, esi
xor eax, edx
mov edx, dword [ebx + 4]
xor edx, eax
lea esi, [ebx + 0x10]
mov dword [esi], eax
mov eax, dword [ebx + 8]
xor eax, edx
mov dword [ebx + 0x18], eax
xor eax, ecx
mov dword [ebx + 0x14], edx
mov dword [ebx + 0x1c], eax
mov edi, 4
mov ecx, esi
mov edx, dword [ecx + 0xc]
mov ebp, dword [ecx]
mov ebx, edx
mov eax, edx
shr eax, 0x18
mov eax, dword [eax*4 + 0x1008eba8]
shr ebx, 8
movzx esi, bl
mov esi, dword [esi*4 + 0x1008eba8]
mov ebx, edx
and eax, 0xff
and esi, 0xff0000
xor eax, esi
movzx edx, dl
mov edx, dword [edx*4 + 0x1008eba8]
shr ebx, 0x10
movzx esi, bl
mov esi, dword [esi*4 + 0x1008eba8]
and edx, 0xff00
and esi, 0xff000000
xor eax, esi
xor eax, edx
xor eax, dword [edi + 0x100903a8]
xor eax, ebp
mov dword [ecx + 0x10], eax
mov edx, dword [ecx + 4]
lea esi, [ecx + 0x10]
xor edx, eax
mov dword [ecx + 0x14], edx
mov eax, dword [ecx + 8]
xor eax, edx
mov dword [ecx + 0x18], eax
mov edx, dword [ecx + 0xc]
xor edx, eax
add edi, 4
cmp edi, 0x28
mov dword [ecx + 0x1c], edx
jne 0x5a946f
mov ebp, dword [esp + 0x10]
cmp dword [ebp + 0x30], 1
jne 0x5a973e
mov esi, dword [ebp + 0x38]
mov eax, dword [ebp + 0x40]
shl esi, 2
xor edi, edi
test esi, esi
jbe 0x5a955d
lea edx, [eax + esi*4 + 8]
lea ecx, [eax + 8]
mov ebp, dword [edx - 8]
mov ebx, dword [ecx - 8]
mov dword [ecx - 8], ebp
mov ebp, dword [edx - 4]
mov dword [edx - 8], ebx
mov ebx, dword [ecx - 4]
mov dword [ecx - 4], ebp
mov ebp, dword [edx]
mov dword [edx - 4], ebx
mov ebx, dword [ecx]
mov dword [ecx], ebp
mov ebp, dword [edx + 4]
mov dword [edx], ebx
mov ebx, dword [ecx + 4]
mov dword [ecx + 4], ebp
mov dword [edx + 4], ebx
add edi, 4
sub esi, 4
add ecx, 0x10
sub edx, 0x10
cmp edi, esi
jb 0x5a951d
mov ebp, dword [esp + 0x10]
mov ecx, dword [ebp + 0x38]
mov esi, 1
cmp ecx, esi
jbe 0x5a973e
mov ecx, dword [eax + 0x10]
mov ebx, ecx
mov edx, ecx
shr edx, 0x18
mov edx, dword [edx*4 + 0x1008eba8]
shr ecx, 8
add eax, 0x10
movzx ecx, cl
mov ecx, dword [ecx*4 + 0x1008eba8]
and edx, 0xff
mov edx, dword [edx*4 + 0x1008efa8]
shr ebx, 0x10
movzx edi, bl
mov edi, dword [edi*4 + 0x1008eba8]
and ecx, 0xff
and edi, 0xff
xor edx, dword [edi*4 + 0x1008f3a8]
mov ebx, dword [ecx*4 + 0x1008f7a8]
movzx ecx, byte [eax]
mov ecx, dword [ecx*4 + 0x1008eba8]
xor edx, ebx
and ecx, 0xff
mov ebx, dword [ecx*4 + 0x1008fba8]
mov ecx, dword [eax + 4]
xor edx, ebx
mov dword [eax], edx
mov ebx, ecx
mov edx, ecx
shr edx, 0x18
mov edx, dword [edx*4 + 0x1008eba8]
shr ecx, 8
shr ebx, 0x10
movzx ecx, cl
mov ecx, dword [ecx*4 + 0x1008eba8]
and edx, 0xff
mov edx, dword [edx*4 + 0x1008efa8]
movzx edi, bl
mov edi, dword [edi*4 + 0x1008eba8]
and ecx, 0xff
and edi, 0xff
xor edx, dword [edi*4 + 0x1008f3a8]
mov ebx, dword [ecx*4 + 0x1008f7a8]
movzx ecx, byte [eax + 4]
mov ecx, dword [ecx*4 + 0x1008eba8]
xor edx, ebx
and ecx, 0xff
mov ebx, dword [ecx*4 + 0x1008fba8]
mov ecx, dword [eax + 8]
xor edx, ebx
mov dword [eax + 4], edx
mov ebx, ecx
mov edx, ecx
shr edx, 0x18
mov edx, dword [edx*4 + 0x1008eba8]
shr ebx, 0x10
shr ecx, 8
movzx edi, bl
mov edi, dword [edi*4 + 0x1008eba8]
movzx ecx, cl
mov ecx, dword [ecx*4 + 0x1008eba8]
and edx, 0xff
mov edx, dword [edx*4 + 0x1008efa8]
and ecx, 0xff
and edi, 0xff
xor edx, dword [edi*4 + 0x1008f3a8]
mov ebx, dword [ecx*4 + 0x1008f7a8]
movzx ecx, byte [eax + 8]
mov ecx, dword [ecx*4 + 0x1008eba8]
xor edx, ebx
and ecx, 0xff
mov ebx, dword [ecx*4 + 0x1008fba8]
mov ecx, dword [eax + 0xc]
xor edx, ebx
mov dword [eax + 8], edx
mov edx, ecx
shr edx, 0x18
mov edx, dword [edx*4 + 0x1008eba8]
and edx, 0xff
mov edx, dword [edx*4 + 0x1008efa8]
mov ebx, ecx
shr ecx, 8
shr ebx, 0x10
movzx ecx, cl
mov ecx, dword [ecx*4 + 0x1008eba8]
movzx edi, bl
mov edi, dword [edi*4 + 0x1008eba8]
and ecx, 0xff
and edi, 0xff
mov ebx, dword [edi*4 + 0x1008f3a8]
mov edi, dword [ecx*4 + 0x1008f7a8]
movzx ecx, byte [eax + 0xc]
mov ecx, dword [ecx*4 + 0x1008eba8]
xor edx, ebx
and ecx, 0xff
xor edx, edi
xor edx, dword [ecx*4 + 0x1008fba8]
mov dword [eax + 0xc], edx
mov ecx, dword [ebp + 0x38]
inc esi
cmp esi, ecx
jb 0x5a956d
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 0xc