Function at 0x580b30
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov edx, dword [ebp + 0x14]
xor ecx, ecx
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, edx
add eax, dword [esi + 0x38]
mov dword [ebp - 0x1c], ebx
adc ecx, dword [esi + 0x3c]
cmp ecx, 0xf
ja 0x580d91
jb 0x580b80
cmp eax, 0xffffffe0
ja 0x580d91
cmp dword [esi + 0x16c], 0
mov dword [esi + 0x38], eax
lea eax, [esi + 0x40]
mov dword [esi + 0x3c], ecx
lea ecx, [esi + 0x60]
mov dword [ebp - 0xc], eax
je 0x580bae
push ecx
push eax
call ebx
mov edx, dword [ebp + 0x14]
add esp, 8
mov dword [esi + 0x16c], 0
jmp 0x580bb1
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0xc]
mov ebx, dword [ebp + 0x10]
bswap eax
mov dword [ebp - 8], eax
mov eax, dword [esi + 0x168]
mov dword [ebp - 4], eax
push edi
mov edi, dword [ebp + 0xc]
test eax, eax
je 0x580c12
nop dword [eax]
test edx, edx
je 0x580d82
mov al, byte [eax + esi + 0x10]
dec edx
mov cl, byte [edi]
inc edi
xor al, cl
mov dword [ebp + 0x14], edx
mov byte [ebx], al
inc ebx
mov eax, dword [ebp - 4]
xor byte [eax + esi + 0x40], cl
inc eax
and eax, 0xf
mov dword [ebp - 4], eax
jne 0x580bd0
lea ecx, [esi + 0x60]
lea eax, [esi + 0x40]
push ecx
push eax
call dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
add esp, 8
mov edx, dword [ebp + 0x14]
mov dword [ebp - 4], eax
mov dword [ebp + 0x14], edx
cmp edx, 0xc00
jb 0x580cac
mov eax, 0xaaaaaaab
mul edx
shr edx, 0xb
mov dword [ebp - 0x1c], edx
nop dword [eax + eax]
push 0xc00
push edi
lea eax, [esi + 0x60]
push eax
push dword [ebp - 0xc]
call dword [ebp - 0x20]
add esp, 0x10
mov dword [ebp - 0x18], 0xc0
nop word [eax + eax]
push dword [ebp - 0x10]
lea eax, [esi + 0x10]
push eax
push esi
call dword [ebp - 0x14]
mov ecx, dword [ebp - 8]
add esp, 0xc
inc ecx
mov eax, ecx
mov dword [ebp - 8], ecx
bswap eax
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0x10]
xor eax, dword [edi]
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 0x580c50
mov edx, dword [ebp + 0x14]
sub edx, 0xc00
sub dword [ebp - 0x1c], 1
mov dword [ebp + 0x14], edx
jne 0x580c30
mov eax, edx
and eax, 0xfffffff0
je 0x580d24
push eax
push edi
lea eax, [esi + 0x60]
push eax
push dword [ebp - 0xc]
call dword [ebp - 0x20]
mov edx, dword [ebp + 0x14]
add esp, 0x10
cmp edx, 0x10
jb 0x580d24
shr edx, 4
lea eax, [esi + 0x10]
mov dword [ebp - 0x20], edx
push dword [ebp - 0x10]
push eax
push esi
call dword [ebp - 0x14]
mov eax, dword [ebp - 8]
add esp, 0xc
inc eax
mov edx, dword [ebp + 0x14]
mov dword [ebp - 8], eax
sub edx, 0x10
bswap eax
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0x10]
xor eax, dword [edi]
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 - 0x20], 1
lea eax, [esi + 0x10]
mov dword [ebp + 0x14], edx
jne 0x580cd3
test edx, edx
je 0x580d7f
push dword [ebp - 0x10]
lea eax, [esi + 0x10]
push eax
push esi
call dword [ebp - 0x14]
mov eax, dword [ebp - 8]
add esp, 0xc
mov edx, dword [ebp + 0x14]
inc eax
bswap eax
mov dword [esi + 0xc], eax
sub edi, ebx
mov eax, dword [ebp - 4]
add esi, 0x40
lea ecx, [eax + ebx]
add eax, esi
add dword [ebp - 4], edx
mov esi, eax
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], eax
nop word [eax + eax]
mov cl, byte [edi + ecx]
lea esi, [esi + 1]
xor byte [esi - 1], cl
mov al, byte [esi - 0x31]
xor al, cl
mov ecx, dword [ebp - 0x20]
mov byte [ecx], al
inc ecx
mov dword [ebp - 0x20], ecx
sub edx, 1
jne 0x580d60
mov esi, dword [ebp + 8]
mov eax, dword [ebp - 4]
pop edi
mov dword [esi + 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