Function at 0x591df0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub esp, 0x1c
push ebx
push esi
push edi
mov edi, ecx
mov ecx, dword [eax + 0x18]
mov ebx, dword [edi + 0x28]
lea eax, [ecx + edx*4]
xor esi, esi
cmp dword [eax], esi
je 0x591e19
mov eax, dword [eax]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
cmp dword [edi + 0x10], esi
jle 0x591e2c
mov ecx, dword [edi + 0x1c]
mov dword [ecx + eax*4], esi
inc eax
cmp eax, dword [edi + 0x10]
jl 0x591e20
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], 1
mov dword [ebp - 8], esi
mov dword [ebp - 4], esi
cmp dword [edi + 8], esi
jle 0x591ede
mov ecx, esi
and ecx, 0x1f
mov edx, 1
shl edx, cl
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx]
mov eax, esi
shr eax, 5
test dword [ecx + eax*4], edx
je 0x591ec3
mov edx, dword [ebx + 0x20]
mov edx, dword [edx + esi*4]
movzx eax, word [edx]
cmp ax, 0xffff
je 0x591ec3
nop
cwde
cmp eax, dword [ebp + 0x10]
jne 0x591eb3
mov ecx, dword [edx + 4]
mov esi, dword [edi + 0x1c]
mov eax, ecx
shr eax, 5
lea eax, [esi + eax*4]
and ecx, 0x1f
mov esi, 1
shl esi, cl
mov ecx, 1
mov dword [ebp - 8], ecx
or dword [eax], esi
mov eax, dword [edx + 4]
cmp eax, dword [ebx + 0x10]
jne 0x591ea3
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebx + 0x1c]
test byte [eax + ecx], 1
jne 0x591eb3
mov dword [ebp - 0x10], 0
movzx eax, word [edx + 8]
add edx, 8
cmp ax, 0xffff
jne 0x591e70
mov esi, dword [ebp - 4]
inc esi
mov dword [ebp - 4], esi
cmp esi, dword [edi + 8]
jl 0x591e45
cmp dword [ebp - 8], 0
je 0x591ede
mov eax, dword [ebx + 8]
and eax, 1
jmp 0x591ee0
xor eax, eax
mov dword [ebp - 0x18], 0
test eax, eax
je 0x591fdc
nop
xor edx, edx
mov dword [ebp - 0x14], edx
mov dword [ebp - 4], edx
cmp dword [edi + 8], edx
jle 0x591fdc
mov esi, dword [edi + 0x1c]
mov ecx, edx
and ecx, 0x1f
mov eax, 1
shl eax, cl
mov ecx, edx
shr ecx, 5
test dword [esi + ecx*4], eax
je 0x591fc5
mov eax, dword [ebx + 0x20]
mov esi, dword [eax + edx*4]
movzx eax, word [esi]
cmp ax, 0xffff
je 0x591fc5
cwde
mov dword [ebp - 0x1c], eax
cmp eax, dword [ebx + 4]
jl 0x591fb1
mov eax, dword [esi + 4]
mov ecx, eax
and ecx, 0x1f
mov edx, 1
shl edx, cl
mov ecx, dword [edi + 0x1c]
shr eax, 5
mov dword [ebp - 0x18], 1
test dword [ecx + eax*4], edx
jne 0x591fb1
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
push edx
push eax
push ebx
push ecx
call fcn.00592590
add esp, 0x10
test eax, eax
je 0x591fb1
mov ecx, dword [esi + 4]
mov eax, dword [edi + 0x1c]
mov edx, ecx
shr edx, 5
lea eax, [eax + edx*4]
and ecx, 0x1f
mov edx, 1
shl edx, cl
mov ecx, 1
mov dword [ebp - 0x14], ecx
or dword [eax], edx
mov eax, dword [esi + 4]
cmp eax, dword [ebx + 0x10]
jne 0x591fa1
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebx + 0x1c]
test byte [eax + ecx], 1
jne 0x591fb1
mov dword [ebp - 0x10], 0
movzx eax, word [esi + 8]
add esi, 8
cmp ax, 0xffff
jne 0x591f31
mov edx, dword [ebp - 4]
inc edx
mov dword [ebp - 4], edx
cmp edx, dword [edi + 8]
jl 0x591f01
cmp dword [ebp - 0x14], 0
jne 0x591ef0
cmp dword [ebp - 8], 0
jne 0x591feb
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [edi + 0x10]
cmp edx, 1
jne 0x591ffd
mov edx, dword [edi + 0x1c]
mov eax, dword [edx]
mov dword [ebp - 8], eax
jmp 0x592011
xor ecx, ecx
test edx, edx
jle 0x59200e
mov eax, dword [edi + 0x1c]
xor ecx, dword [eax]
add eax, 4
dec edx
jne 0x592006
mov dword [ebp - 8], ecx
mov ecx, dword [edi + 4]
mov eax, dword [edi + 0x14]
mov dword [ebp - 4], ecx
test ecx, ecx
jle 0x592086
mov edi, edi
mov ecx, dword [ebp - 8]
cmp dword [eax + 4], ecx
jne 0x592078
mov ecx, dword [edi + 0x10]
cmp ecx, 1
je 0x592086
mov esi, dword [eax]
mov edx, dword [edi + 0x1c]
add ecx, ecx
add ecx, ecx
cmp ecx, 4
jb 0x592054
mov edi, edi
mov ebx, dword [edx]
cmp ebx, dword [esi]
jne 0x592078
sub ecx, 4
add esi, 4
add edx, 4
cmp ecx, 4
jae 0x592040
test ecx, ecx
je 0x592086
mov bl, byte [esi]
cmp bl, byte [edx]
jne 0x592078
cmp ecx, 1
jbe 0x592086
mov bl, byte [esi + 1]
cmp bl, byte [edx + 1]
jne 0x592078
cmp ecx, 2
jbe 0x592086
mov cl, byte [esi + 2]
cmp cl, byte [edx + 2]
je 0x592086
mov ecx, dword [ebp - 4]
dec ecx
add eax, 0x20
mov dword [ebp - 4], ecx
test ecx, ecx
jg 0x592020
cmp dword [ebp - 4], 0
jne 0x5920d6
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x18]
push edx
mov edx, dword [ebp + 8]
push edi
call fcn.00591bc0
xor ecx, ecx
add esp, 8
cmp dword [edi + 0x10], ecx
jle 0x5920b7
mov edx, dword [edi + 0x1c]
mov edx, dword [edx + ecx*4]
mov esi, dword [eax]
mov dword [esi + ecx*4], edx
inc ecx
cmp ecx, dword [edi + 0x10]
jl 0x5920a6
mov ecx, dword [ebp - 8]
mov dword [eax + 4], ecx
mov ecx, dword [ebp - 0xc]
neg ecx
sbb ecx, ecx
and ecx, 2
cmp dword [ebp - 0x10], 0
mov dword [eax + 8], ecx
je 0x5920d6
or ecx, 8
mov dword [eax + 8], ecx
cmp dword [ebp - 0x18], 0
jne 0x5920ff
mov esi, dword [ebp + 0xc]
mov ecx, dword [esi + 0x18]
mov edx, dword [ebp + 0x10]
mov dword [ecx + edx*4], eax
mov ecx, dword [esi + 0x1c]
mov edi, dword [eax + 0xc]
mov dword [ecx + edx*8], edi
mov edi, dword [eax + 0x10]
mov dword [ecx + edx*8 + 4], edi
mov dword [eax + 0xc], esi
mov word [eax + 0x10], dx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret