Function at 0x580da0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
mov ebx, dword [ebp + 8]
xor ecx, ecx
push esi
mov esi, dword [ebp + 0x14]
mov eax, dword [ebx + 0x174]
mov edx, dword [ebx + 0x160]
mov dword [ebp - 0x14], eax
mov eax, dword [ebx + 0x164]
mov dword [ebp - 0x18], eax
mov eax, esi
add eax, dword [ebx + 0x38]
mov dword [ebp - 0x1c], edx
adc ecx, dword [ebx + 0x3c]
cmp ecx, 0xf
ja 0x580fa5
jb 0x580de7
cmp eax, 0xffffffe0
ja 0x580fa5
cmp dword [ebx + 0x16c], 0
mov dword [ebx + 0x38], eax
lea eax, [ebx + 0x40]
mov dword [ebx + 0x3c], ecx
lea ecx, [ebx + 0x60]
mov dword [ebp - 0x10], eax
je 0x580e12
push ecx
push eax
call edx
add esp, 8
mov dword [ebx + 0x16c], 0
jmp 0x580e15
mov dword [ebp - 0x10], eax
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebx + 0x168]
mov dword [ebp - 4], ecx
bswap eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp + 0x14], eax
push edi
mov edi, dword [ebp + 0xc]
test ecx, ecx
je 0x580e86
test esi, esi
je 0x580e77
mov al, byte [ecx + ebx + 0x10]
add ecx, ebx
mov dl, byte [edi]
dec esi
mov ebx, dword [ebp + 0x14]
xor al, dl
inc dword [ebp + 0x14]
inc edi
mov dword [ebp - 8], edi
mov byte [ebx], al
xor byte [ecx + 0x40], dl
mov ecx, dword [ebp - 4]
mov ebx, dword [ebp + 8]
inc ecx
and ecx, 0xf
mov dword [ebp - 4], ecx
jne 0x580e34
lea ecx, [ebx + 0x60]
lea eax, [ebx + 0x40]
push ecx
push eax
call dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
add esp, 8
mov dword [ebp - 4], eax
jmp 0x580e89
pop edi
pop esi
mov dword [ebx + 0x168], ecx
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 8], edi
cmp esi, 0xc00
jb 0x580ef2
mov eax, 0xaaaaaaab
mul esi
shr edx, 0xb
mov dword [ebp - 8], edx
nop
push 0xc00
push edi
lea eax, [ebx + 0x60]
push eax
push dword [ebp - 0x10]
call dword [ebp - 0x18]
push ebx
push dword [ebp - 0x14]
push 0xc0
push dword [ebp + 0x14]
push edi
call dword [ebp + 0x18]
mov ecx, dword [ebp - 0xc]
add esp, 0x24
add dword [ebp + 0x14], 0xc00
add ecx, 0xc0
mov eax, ecx
mov dword [ebp - 0xc], ecx
bswap eax
add edi, 0xc00
mov dword [ebx + 0xc], eax
sub esi, 0xc00
sub dword [ebp - 8], 1
jne 0x580ea0
mov dword [ebp - 8], edi
mov eax, esi
and eax, 0xfffffff0
mov dword [ebp - 0x1c], eax
je 0x580f3a
push eax
push dword [ebp - 8]
mov edi, eax
lea eax, [ebx + 0x60]
push eax
push dword [ebp - 0x10]
shr edi, 4
call dword [ebp - 0x18]
push ebx
push dword [ebp - 0x14]
push edi
push dword [ebp + 0x14]
push dword [ebp - 8]
call dword [ebp + 0x18]
mov eax, dword [ebp - 0xc]
add esp, 0x24
add eax, edi
mov edi, dword [ebp - 8]
mov dword [ebp - 0xc], eax
bswap eax
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x1c]
add edi, eax
add dword [ebp + 0x14], eax
sub esi, eax
test esi, esi
je 0x580f93
push dword [ebp - 0x14]
lea eax, [ebx + 0x10]
push eax
mov eax, dword [ebx + 0x170]
push ebx
call eax
mov eax, dword [ebp - 0xc]
add esp, 0xc
mov ecx, dword [ebp + 0x14]
inc eax
bswap eax
mov dword [ebx + 0xc], eax
sub edi, ecx
mov eax, dword [ebp - 4]
add eax, ecx
mov dword [ebp + 0x14], eax
mov eax, dword [ebp - 4]
lea edx, [eax + 0x40]
add edx, ebx
mov ebx, dword [ebp + 0x14]
add eax, esi
mov dword [ebp - 4], eax
mov cl, byte [edi + ebx]
lea edx, [edx + 1]
mov al, byte [edx - 0x31]
lea ebx, [ebx + 1]
xor byte [edx - 1], cl
xor al, cl
mov byte [ebx - 1], al
sub esi, 1
jne 0x580f77
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 4]
pop edi
mov dword [ebx + 0x168], eax
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret