Function at 0x5a58e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x18
call fcn.0052df00
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov eax, dword [esi + 0x170]
mov ecx, dword [esi + 0x174]
mov edi, dword [esi + 0x38]
mov ebx, dword [esi + 0x3c]
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0x164]
mov edx, dword [esi + 0x160]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x18], eax
xor eax, eax
add ecx, edi
adc eax, ebx
mov dword [ebp - 0x14], edx
cmp eax, 0xf
ja 0x5a5b71
jb 0x5a593a
cmp ecx, 0xffffffe0
ja 0x5a5b71
mov dword [esi + 0x38], ecx
mov dword [esi + 0x3c], eax
mov eax, dword [esi + 0x16c]
test eax, eax
je 0x5a5961
lea ecx, [esi + 0x60]
lea eax, [esi + 0x40]
push ecx
push eax
call edx
add esp, 8
mov dword [esi + 0x16c], 0
mov ecx, dword [esi + 0xc]
mov dword [ebp + 8], ecx
mov eax, dword [ebp + 8]
bswap eax
mov ebx, dword [esi + 0x168]
mov edi, dword [ebp + 0x10]
test ebx, ebx
mov dword [ebp + 8], eax
mov dword [ebp - 4], ebx
je 0x5a59cb
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x5a59b2
mov ecx, dword [ebp + 0xc]
mov al, byte [ebx + esi + 0x10]
xor al, byte [ecx]
mov byte [edi], al
mov dl, byte [ebx + esi + 0x40]
xor dl, al
inc edi
inc ecx
mov byte [ebx + esi + 0x40], dl
mov dword [ebp + 0xc], ecx
mov ecx, dword [ebp + 0x14]
dec ecx
inc ebx
and ebx, 0xf
mov dword [ebp + 0x14], ecx
jne 0x5a597f
mov dword [ebp - 4], ebx
jmp 0x5a59bd
test ebx, ebx
mov dword [ebp - 4], ebx
jne 0x5a5b62
lea edx, [esi + 0x60]
lea eax, [esi + 0x40]
push edx
push eax
call dword [ebp - 0x14]
add esp, 8
mov ecx, dword [ebp + 0x14]
cmp ecx, 0xc00
jb 0x5a5a7c
mov eax, 0xaaaaaaab
mul ecx
shr edx, 0xb
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], 0xc0
mov ecx, dword [ebp - 8]
lea ebx, [esi + 0x10]
push ecx
push ebx
push esi
call dword [ebp - 0xc]
mov eax, dword [ebp + 8]
add esp, 0xc
inc eax
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
bswap eax
mov ecx, dword [ebp + 0xc]
mov dword [esi + 0xc], eax
mov eax, edi
sub ecx, edi
mov dword [ebp + 0x10], 4
mov edx, dword [ecx + eax]
add eax, 4
xor edx, dword [ebx]
add ebx, 4
mov dword [eax - 4], edx
mov edx, dword [ebp + 0x10]
dec edx
mov dword [ebp + 0x10], edx
jne 0x5a5a1a
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x10]
add edi, 0x10
add ecx, 0x10
dec eax
mov dword [ebp + 0xc], ecx
mov dword [ebp - 0x10], eax
jne 0x5a59ee
lea eax, [edi - 0xc00]
push 0xc00
lea ecx, [esi + 0x60]
push eax
lea edx, [esi + 0x40]
push ecx
push edx
call dword [ebp - 0x18]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x14]
add esp, 0x10
sub ecx, 0xc00
dec eax
mov dword [ebp + 0x14], ecx
mov dword [ebp - 0x14], eax
jne 0x5a59e7
mov ebx, dword [ebp - 4]
mov eax, ecx
and eax, 0xfffffff0
mov dword [ebp - 4], eax
je 0x5a5b1f
cmp ecx, 0x10
jb 0x5a5b08
mov eax, ecx
shr eax, 4
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 8]
push eax
lea eax, [esi + 0x10]
push eax
push esi
call dword [ebp - 0xc]
mov eax, dword [ebp + 8]
add esp, 0xc
inc eax
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
bswap eax
mov edx, dword [ebp + 0xc]
mov dword [esi + 0xc], eax
sub edx, edi
mov eax, edi
lea ecx, [esi + 0x10]
mov dword [ebp - 0x10], edx
mov dword [ebp + 0x10], 4
jmp 0x5a5ace
mov edx, dword [ebp - 0x10]
mov edx, dword [eax + edx]
add eax, 4
xor edx, dword [ecx]
add ecx, 4
mov dword [eax - 4], edx
mov edx, dword [ebp + 0x10]
dec edx
mov dword [ebp + 0x10], edx
jne 0x5a5acb
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x14]
mov eax, 0x10
add edi, eax
add edx, eax
sub ecx, eax
mov eax, dword [ebp - 0x14]
dec eax
mov dword [ebp + 0xc], edx
mov dword [ebp + 0x14], ecx
mov dword [ebp - 0x14], eax
jne 0x5a5a97
mov eax, dword [ebp - 4]
mov ecx, edi
push eax
sub ecx, eax
lea edx, [esi + 0x60]
push ecx
lea eax, [esi + 0x40]
push edx
push eax
call dword [ebp - 0x18]
mov ecx, dword [ebp + 0x14]
add esp, 0x10
test ecx, ecx
je 0x5a5b62
mov ecx, dword [ebp - 8]
lea edx, [esi + 0x10]
push ecx
push edx
push esi
call dword [ebp - 0xc]
mov edx, dword [ebp + 8]
add esp, 0xc
inc edx
mov dword [ebp + 8], edx
mov eax, dword [ebp + 8]
bswap eax
mov edx, dword [ebp + 0xc]
mov dword [esi + 0xc], eax
mov eax, dword [ebp + 0x14]
lea ecx, [ebx + edi]
dec eax
sub edx, edi
lea edi, [eax + 1]
mov al, byte [esi + ebx + 0x10]
xor al, byte [ecx + edx]
mov byte [ecx], al
xor byte [esi + ebx + 0x40], al
inc ebx
inc ecx
dec edi
jne 0x5a5b50
mov dword [esi + 0x168], ebx
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret