Function at 0x580fb0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov ecx, dword [ebp + 0x14]
xor edx, edx
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x170]
mov ebx, dword [esi + 0x160]
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x174]
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0x164]
mov dword [ebp - 0x20], eax
mov eax, ecx
add eax, dword [esi + 0x38]
mov dword [ebp - 0x1c], ebx
adc edx, dword [esi + 0x3c]
cmp edx, 0xf
ja 0x581218
jb 0x581000
cmp eax, 0xffffffe0
ja 0x581218
cmp dword [esi + 0x16c], 0
mov dword [esi + 0x38], eax
lea eax, [esi + 0x60]
mov dword [esi + 0x3c], edx
lea edx, [esi + 0x40]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], edx
je 0x581031
push eax
push edx
call ebx
mov ecx, dword [ebp + 0x14]
add esp, 8
mov dword [esi + 0x16c], 0
jmp 0x581037
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], edx
mov eax, dword [esi + 0xc]
mov edx, dword [esi + 0x168]
mov ebx, dword [ebp + 0x10]
mov dword [ebp + 8], edx
bswap eax
mov dword [ebp - 4], eax
push edi
mov edi, dword [ebp + 0xc]
test edx, edx
je 0x581090
test ecx, ecx
je 0x581209
mov al, byte [edx + esi + 0x10]
dec ecx
xor al, byte [edi]
inc edi
mov byte [ebx], al
inc ebx
xor byte [edx + esi + 0x40], al
inc edx
and edx, 0xf
mov dword [ebp + 0x14], ecx
mov dword [ebp + 8], edx
jne 0x581053
lea eax, [esi + 0x60]
lea ecx, [esi + 0x40]
push eax
push ecx
call dword [ebp - 0x1c]
mov eax, dword [ebp + 8]
add esp, 8
mov ecx, dword [ebp + 0x14]
mov dword [ebp + 8], eax
mov dword [ebp + 0x14], ecx
cmp ecx, 0xc00
jb 0x581129
mov eax, 0xaaaaaaab
mul ecx
shr edx, 0xb
mov dword [ebp - 0x1c], edx
nop dword [eax]
mov dword [ebp - 0x18], 0xc0
push dword [ebp - 0x10]
lea eax, [esi + 0x10]
push eax
push esi
call dword [ebp - 0x14]
mov eax, dword [ebp - 4]
add esp, 0xc
inc eax
mov dword [ebp - 4], eax
bswap eax
mov dword [esi + 0xc], eax
mov eax, dword [edi]
xor eax, dword [esi + 0x10]
mov dword [ebx], eax
mov eax, dword [edi + 4]
xor eax, dword [esi + 0x14]
mov dword [ebx + 4], eax
mov eax, dword [edi + 8]
xor eax, dword [esi + 0x18]
mov dword [ebx + 8], eax
mov eax, dword [edi + 0xc]
add edi, 0x10
xor eax, dword [esi + 0x1c]
mov dword [ebx + 0xc], eax
add ebx, 0x10
sub dword [ebp - 0x18], 1
jne 0x5810b7
push 0xc00
lea eax, [ebx - 0xc00]
push eax
push dword [ebp - 8]
push dword [ebp - 0xc]
call dword [ebp - 0x20]
mov ecx, dword [ebp + 0x14]
add esp, 0x10
sub ecx, 0xc00
sub dword [ebp - 0x1c], 1
mov dword [ebp + 0x14], ecx
jne 0x5810b0
mov edx, ecx
and edx, 0xfffffff0
mov dword [ebp - 0x18], edx
je 0x5811a5
cmp ecx, 0x10
jb 0x581190
shr ecx, 4
lea eax, [esi + 0x10]
mov dword [ebp - 0x1c], ecx
push dword [ebp - 0x10]
push eax
push esi
call dword [ebp - 0x14]
mov eax, dword [ebp - 4]
add esp, 0xc
inc eax
sub dword [ebp + 0x14], 0x10
mov dword [ebp - 4], eax
bswap eax
mov dword [esi + 0xc], eax
mov eax, dword [edi]
xor eax, dword [esi + 0x10]
mov dword [ebx], eax
mov eax, dword [edi + 4]
xor eax, dword [esi + 0x14]
mov dword [ebx + 4], eax
mov eax, dword [edi + 8]
xor eax, dword [esi + 0x18]
mov dword [ebx + 8], eax
mov eax, dword [edi + 0xc]
add edi, 0x10
xor eax, dword [esi + 0x1c]
mov dword [ebx + 0xc], eax
add ebx, 0x10
sub dword [ebp - 0x1c], 1
lea eax, [esi + 0x10]
jne 0x581141
mov edx, dword [ebp - 0x18]
push edx
mov eax, ebx
sub eax, edx
push eax
push dword [ebp - 8]
push dword [ebp - 0xc]
call dword [ebp - 0x20]
mov ecx, dword [ebp + 0x14]
add esp, 0x10
test ecx, ecx
je 0x5811f7
push dword [ebp - 0x10]
lea eax, [esi + 0x10]
push eax
push esi
call dword [ebp - 0x14]
mov eax, dword [ebp - 4]
lea edx, [esi + 0x40]
mov ecx, dword [ebp + 0x14]
inc eax
bswap eax
mov dword [esi + 0xc], eax
sub edi, ebx
mov eax, dword [ebp + 8]
add esp, 0xc
add eax, ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 8]
add edx, eax
mov ebx, dword [ebp - 0x20]
add eax, ecx
mov dword [ebp + 8], eax
nop dword [eax]
mov al, byte [edi + ebx]
lea ebx, [ebx + 1]
xor al, byte [edx - 0x30]
lea edx, [edx + 1]
mov byte [ebx - 1], al
xor byte [edx - 1], al
sub ecx, 1
jne 0x5811e0
mov eax, dword [ebp + 8]
pop edi
mov dword [esi + 0x168], eax
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
mov dword [esi + 0x168], edx
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