Function at 0x5819e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x63f83d
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x6a6040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
call fcn.00409430
mov eax, dword [edi + 4]
lea ecx, [ebp - 0x14]
xor esi, esi
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 4], esi
mov eax, dword [edi + 0x18]
test al, 1
je 0x581a35
lea edi, [esi + 2]
jmp 0x581bf0
xor ebx, ebx
test al, 2
jne 0x581a7d
mov ecx, dword [ebp + 8]
call fcn.004bff60
xor edx, edx
div dword [edi + 0x10]
mov eax, dword [edi + 0x14]
mov ecx, dword [eax + edx*4]
lea ebx, [eax + edx*4]
test ecx, ecx
je 0x581a7d
mov eax, dword [ebp + 8]
mov edx, dword [eax]
nop word [eax + eax]
cmp dword [ecx + 4], edx
jne 0x581a77
mov esi, dword [ebp + 8]
mov ax, word [ecx + 8]
cmp ax, word [esi + 4]
mov esi, 0
je 0x581aa4
mov ecx, dword [ecx]
test ecx, ecx
jne 0x581a60
mov edx, dword [edi + 0xc]
mov eax, dword [edi + 8]
cmp edx, eax
jb 0x581ba1
mov ebx, 2
lea ecx, [eax + eax]
cmp eax, ebx
cmovb ecx, ebx
cmp ecx, edx
jae 0x581aae
lea edi, [ebx + 1]
jmp 0x581bf0
mov edi, 1
jmp 0x581bf0
push dword [edi + 0x18]
mov eax, dword [edi]
push edi
push ecx
mov ecx, edi
call dword [eax + 8]
mov esi, eax
mov dword [ebp - 0x24], esi
test esi, esi
je 0x581bbb
mov al, byte [esi + 0x18]
not al
test al, 1
je 0x581bbb
cmp dword [edi + 0x14], 0
je 0x581b7d
cmp dword [edi + 0x10], 0
mov dword [ebp - 0x18], 0
jbe 0x581b7d
xor ecx, ecx
xor edx, edx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x20], edx
nop dword [eax]
mov eax, dword [edi + 0x14]
mov ebx, dword [ecx + eax]
test ebx, ebx
je 0x581b5b
nop word [eax + eax]
mov eax, dword [ebx]
lea edx, [ebx + 4]
dec dword [edi + 0xc]
mov esi, 2
mov dword [ebp - 0x28], eax
mov eax, dword [edx]
add edx, 4
movzx ecx, byte [edx]
lea edx, [edx + 1]
ror eax, 0x19
xor eax, ecx
sub esi, 1
jne 0x581b25
mov esi, dword [ebp - 0x24]
xor edx, edx
div dword [esi + 0x10]
mov eax, dword [esi + 0x14]
lea ecx, [eax + edx*4]
mov eax, dword [ecx]
mov dword [ebx], eax
mov eax, dword [ebp - 0x28]
mov dword [ecx], ebx
mov ebx, eax
inc dword [esi + 0xc]
test eax, eax
jne 0x581b10
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
mov eax, dword [edi + 0x14]
add ecx, 4
mov dword [ebp - 0x1c], ecx
mov dword [edx + eax], 0
add edx, 4
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x18], eax
cmp eax, dword [edi + 0x10]
jb 0x581b00
mov eax, dword [edi]
mov ecx, edi
push esi
call dword [eax + 4]
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax + 0xc]
mov ecx, dword [ebp + 8]
call fcn.004bff60
xor edx, edx
div dword [edi + 0x10]
mov eax, dword [edi + 0x14]
lea ebx, [eax + edx*4]
push ecx
lea ecx, [edi + 4]
push ecx
mov ecx, dword [ecx]
call fcn.00581e40
mov esi, eax
mov dword [ebp - 0x14], esi
test esi, esi
jne 0x581bc2
lea edi, [eax + 2]
jmp 0x581bf0
mov esi, dword [ebp - 0x14]
mov edi, ebx
jmp 0x581bf0
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
mov dword [esi + 4], eax
mov ax, word [ecx + 4]
mov word [esi + 8], ax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [esi + 0xa], eax
xor esi, esi
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebx]
mov dword [eax], ecx
mov eax, dword [ebp - 0x14]
mov dword [ebx], eax
inc dword [edi + 0xc]
xor edi, edi
mov dword [ebp - 0x14], esi
test esi, esi
je 0x581c02
push ecx
mov ecx, dword [ebp - 0x2c]
lea eax, [ebp - 0x30]
push eax
push esi
call fcn.004bfbf0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc