Function at 0x4587f0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x14
push ebp
push esi
push edi
mov edi, dword [esp + 0x24]
xor ebp, ebp
mov dword [esp + 0x18], ebp
test edi, edi
je 0x458a86
mov esi, dword [esp + 0x28]
cmp esi, 8
jb 0x458a86
cmp esi, 0x4000
ja 0x458a86
mov eax, dword [edi + 8]
mov dword [esp + 0x24], eax
mov eax, dword [edi + 4]
mov dword [esp + 0x10], eax
test eax, eax
je 0x458a86
push ebx
lea ebx, [esi + esi*4]
shl ebx, 2
push ebx
call dword [sym.KomManager.exe_xmlMalloc]
add esp, 4
mov dword [edi + 4], eax
test eax, eax
jne 0x458861
mov esi, dword [esp + 0x14]
or eax, 0xffffffff
pop ebx
mov dword [edi + 4], esi
pop edi
pop esi
pop ebp
add esp, 0x14
ret
push ebx
push 0
push eax
call fcn.00633f10
mov ecx, dword [esp + 0x34]
add esp, 0xc
mov dword [edi + 8], esi
test ecx, ecx
je 0x458a6f
mov esi, dword [esp + 0x14]
mov eax, ecx
add esi, 4
mov dword [esp + 0x10], ecx
nop dword [eax]
cmp dword [esi + 8], 0
je 0x458948
mov ebp, dword [edi + 8]
cmp ecx, 0x80
je 0x4588aa
mov ebx, dword [esi + 0xc]
jmp 0x4588ce
mov eax, dword [edi + 0x18]
mov ecx, dword [esi + 4]
mov edx, dword [esi]
push eax
push ecx
push edx
cmp ebp, 0x80
jne 0x4588c4
call fcn.00458600
jmp 0x4588c9
call fcn.00458530
mov ebx, eax
add esp, 0xc
xor edx, edx
mov ecx, dword [edi + 4]
mov eax, ebx
div ebp
lea ebp, [edx + edx*4]
cmp dword [ecx + ebp*4 + 0xc], 0
jne 0x458903
movups xmm0, xmmword [esi - 4]
movups xmmword [ecx + ebp*4], xmm0
mov eax, dword [esi + 0xc]
mov dword [ecx + ebp*4 + 0x10], eax
mov eax, dword [edi + 4]
mov dword [eax + ebp*4], 0
mov eax, dword [edi + 4]
mov dword [eax + ebp*4 + 0x10], ebx
jmp 0x458940
push 0x14
call dword [sym.KomManager.exe_xmlMalloc]
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x458939
mov eax, dword [esi]
mov dword [ecx + 4], eax
mov eax, dword [esi + 4]
mov dword [ecx + 8], eax
mov dword [ecx + 0x10], ebx
mov eax, dword [edi + 4]
mov eax, dword [eax + ebp*4]
mov dword [ecx], eax
mov dword [ecx + 0xc], 1
mov eax, dword [edi + 4]
mov dword [eax + ebp*4], ecx
jmp 0x458940
or ebp, 0xffffffff
mov dword [esp + 0x1c], ebp
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x28]
add esi, 0x14
sub eax, 1
mov dword [esp + 0x10], eax
jne 0x458890
mov eax, dword [esp + 0x14]
mov edx, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], ecx
mov esi, dword [eax]
test esi, esi
je 0x458a57
mov ebp, dword [esi]
mov dword [esp + 0x20], ebp
cmp ecx, 0x80
je 0x458983
mov ecx, dword [esi + 0x10]
jmp 0x4589e8
cmp dword [edi + 8], 0x80
jne 0x4589a1
push dword [edi + 0x18]
push dword [esi + 8]
push dword [esi + 4]
call fcn.00458600
add esp, 0xc
mov ecx, eax
jmp 0x4589e4
mov ebx, dword [esi + 8]
test ebx, ebx
jle 0x4589e2
mov ebp, dword [esi + 4]
test ebp, ebp
je 0x4589e2
mov eax, dword [edi + 0x18]
xor edx, edx
test ebx, ebx
jle 0x4589d0
movzx ecx, byte [edx + ebp]
inc edx
add ecx, eax
imul eax, ecx, 0x401
mov ecx, eax
shr ecx, 6
xor eax, ecx
cmp edx, ebx
jl 0x4589b8
lea ecx, [eax + eax*8]
mov eax, ecx
shr eax, 0xb
xor eax, ecx
imul ecx, eax, 0x8001
jmp 0x4589e4
xor ecx, ecx
mov ebp, dword [esp + 0x20]
xor edx, edx
mov ebx, dword [edi + 4]
mov eax, ecx
div dword [edi + 8]
lea edx, [edx + edx*4]
shl edx, 2
add ebx, edx
cmp dword [ebx + 0xc], 0
jne 0x458a34
movups xmm0, xmmword [esi]
push esi
movups xmmword [ebx], xmm0
mov eax, dword [esi + 0x10]
mov dword [ebx + 0x10], eax
mov eax, dword [edi + 4]
mov dword [edx + eax], 0
mov eax, dword [edi + 4]
mov dword [edx + eax + 0xc], 1
mov eax, dword [edi + 4]
mov dword [edx + eax + 0x10], ecx
call dword [sym.KomManager.exe_xmlFree]
add esp, 4
jmp 0x458a41
mov eax, dword [ebx]
mov dword [esi], eax
mov dword [esi + 0x10], ecx
mov eax, dword [edi + 4]
mov dword [edx + eax], esi
mov ecx, dword [esp + 0x28]
mov esi, ebp
test ebp, ebp
jne 0x458970
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
add eax, 0x14
sub edx, 1
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], edx
jne 0x458966
mov ebp, dword [esp + 0x1c]
push dword [esp + 0x14]
call dword [sym.KomManager.exe_xmlFree]
add esp, 4
mov eax, ebp
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x14
ret
pop edi
pop esi
or eax, 0xffffffff
pop ebp
add esp, 0x14
ret