Function at 0x59137230
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x10
call fcn.5908b730
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
push ebx
push ebp
push esi
cmp edx, 1
push edi
mov ebp, eax
mov ebx, ecx
jne 0x5913733d
cmp eax, 0x10
jb 0x59137333
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
shr eax, 4
mov dword [esp + 0x2c], eax
mov ecx, esi
sub ebx, edi
mov eax, edi
sub ecx, edi
mov dword [esp + 0x24], 0x10
mov dl, byte [ebx + eax]
xor dl, byte [eax]
inc eax
mov byte [ecx + eax - 1], dl
mov edx, dword [esp + 0x24]
dec edx
mov dword [esp + 0x24], edx
jne 0x5913727f
mov eax, dword [esp + 0x30]
push eax
push esi
push esi
call fcn.59137ee0
mov eax, dword [esp + 0x38]
mov ebx, esi
add esp, 0xc
sub ebp, 0x10
add edi, 0x10
add esi, 0x10
dec eax
mov dword [esp + 0x2c], eax
jne 0x5913726f
mov ecx, dword [esp + 0x34]
test ebp, ebp
je 0x59137315
jbe 0x591372e4
mov eax, ebx
mov ecx, esi
sub eax, edi
sub ecx, edi
mov dword [esp + 0x24], ebp
mov dl, byte [edi + eax]
xor dl, byte [edi]
inc edi
mov byte [edi + ecx - 1], dl
mov edx, dword [esp + 0x24]
dec edx
mov dword [esp + 0x24], edx
jne 0x591372cf
cmp ebp, 0x10
jae 0x59137300
mov edi, ebx
mov eax, 0x10
sub edi, esi
lea ecx, [esi + ebp]
sub eax, ebp
mov dl, byte [edi + ecx]
mov byte [ecx], dl
inc ecx
dec eax
jne 0x591372f7
mov eax, dword [esp + 0x30]
push eax
push esi
push esi
call fcn.59137ee0
mov ecx, dword [esp + 0x40]
add esp, 0xc
mov ebx, esi
mov edx, dword [ebx]
pop edi
mov dword [ecx], edx
mov eax, dword [ebx + 4]
mov dword [ecx + 4], eax
mov edx, dword [ebx + 8]
mov dword [ecx + 8], edx
mov eax, dword [ebx + 0xc]
pop esi
pop ebp
mov dword [ecx + 0xc], eax
pop ebx
add esp, 0x10
ret
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
jmp 0x591372bd
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x28]
cmp edi, esi
je 0x591373f2
cmp eax, 0x10
jb 0x59137394
shr eax, 4
mov dword [esp + 0x24], eax
mov ecx, dword [esp + 0x30]
push ecx
push esi
push edi
call fcn.59138490
add esp, 0xc
mov eax, esi
sub ebx, esi
mov ecx, 0x10
mov dl, byte [eax + ebx]
xor byte [eax], dl
inc eax
dec ecx
jne 0x59137371
mov eax, dword [esp + 0x24]
mov ebx, edi
sub ebp, 0x10
add edi, 0x10
add esi, 0x10
dec eax
mov dword [esp + 0x24], eax
jne 0x59137359
mov ecx, dword [esp + 0x34]
test ebp, ebp
je 0x591373d4
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x10]
push eax
push ecx
push edi
call fcn.59138490
add esp, 0xc
xor ecx, ecx
test ebp, ebp
jbe 0x591373ce
lea edx, [esp + 0x10]
lea eax, [esp + 0x10]
sub ebx, edx
sub esi, eax
lea eax, [esp + ecx + 0x10]
mov dl, byte [ebx + eax]
xor dl, byte [eax]
inc ecx
cmp ecx, ebp
mov byte [esi + eax], dl
jb 0x591373bd
mov ecx, dword [esp + 0x34]
mov ebx, edi
mov eax, dword [ebx]
pop edi
mov dword [ecx], eax
mov edx, dword [ebx + 4]
mov dword [ecx + 4], edx
mov eax, dword [ebx + 8]
mov dword [ecx + 8], eax
mov edx, dword [ebx + 0xc]
pop esi
pop ebp
mov dword [ecx + 0xc], edx
pop ebx
add esp, 0x10
ret
cmp eax, 0x10
jb 0x59137473
shr eax, 4
mov dword [esp + 0x24], eax
mov eax, edi
mov ecx, dword [eax]
mov dword [esp + 0x10], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x14], edx
mov ecx, dword [eax + 8]
mov dword [esp + 0x18], ecx
mov edx, dword [eax + 0xc]
mov eax, dword [esp + 0x30]
push eax
push esi
push edi
mov dword [esp + 0x28], edx
call fcn.59138490
mov ecx, dword [esp + 0x40]
add esp, 0xc
mov eax, esi
sub ecx, esi
mov edx, 0x10
mov bl, byte [ecx + eax]
xor byte [eax], bl
inc eax
dec edx
jne 0x59137437
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
sub ebp, 0x10
mov dword [ecx], edx
mov edx, dword [esp + 0x18]
add edi, 0x10
add esi, 0x10
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
mov eax, dword [esp + 0x24]
dec eax
mov dword [esp + 0x24], eax
jne 0x591373fe
test ebp, ebp
je 0x59137504
mov edx, dword [edi + 4]
mov eax, dword [edi + 8]
mov ecx, dword [edi]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x30]
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], ecx
mov ecx, dword [edi + 0xc]
push edx
lea eax, [esp + 0x14]
push esi
push eax
mov dword [esp + 0x28], ecx
call fcn.59138490
add esp, 0xc
test ebp, ebp
jbe 0x591374c4
mov edx, dword [esp + 0x34]
mov eax, esi
mov ecx, edx
mov edi, ebp
sub ecx, esi
mov bl, byte [eax + ecx]
xor byte [eax], bl
inc eax
dec edi
jne 0x591374b9
jmp 0x591374c8
mov edx, dword [esp + 0x34]
cmp ebp, 0x10
jae 0x591374e9
mov ecx, 0x10
lea edi, [esi + ebp]
sub ecx, ebp
lea esi, [esp + ebp + 0x10]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov dword [edx], ecx
mov ecx, dword [esp + 0x18]
mov dword [edx + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [edx + 8], ecx
mov dword [edx + 0xc], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret