Function at 0x48c5c0
Capabilities:
Encode data using xor

Disassembly:
push ecx
mov eax, dword [0x591d88]
push ebx
xor ebx, ebx
push esi
mov esi, dword [esp + 0x18]
push edi
cmp eax, ebx
mov dword [esp + 0xc], ebx
mov edi, 2
mov dword [0x591d8c], ebx
jne 0x48c5ed
mov eax, dword [esp + 0x14]
mov dword [0x5bda48], eax
jmp 0x48c621
mov ecx, dword [esp + 0x14]
push 0x10000
mov dword [0x591d7c], ecx
call fcn.00487e60
add esp, 4
cmp eax, ebx
mov dword [0x5bda48], eax
jne 0x48c615
pop edi
pop esi
or eax, 0xffffffff
pop ebx
pop ecx
ret
mov dword [0x591d70], ebx
mov dword [0x591d80], esi
mov edx, dword [esp + 0x18]
push esi
mov dword [0x5dda60], edx
call fcn.0048c260
mov eax, dword [0x591d84]
add esp, 4
cmp eax, ebx
je 0x48c8d5
mov ebx, dword [esp + 0x14]
mov eax, dword [0x5bda44]
push ebp
mov edx, dword [0x5bda48]
xor ecx, ecx
mov esi, eax
mov cl, byte [eax + edx + 2]
and esi, 0x7fff
mov edx, ecx
mov ecx, dword [0x591d74]
and ecx, 0x3ff
and edx, 0x7fff
shl ecx, 5
xor edx, ecx
xor ecx, ecx
mov dword [0x591d74], edx
mov cx, word [edx*2 + 0x5cda60]
mov word [esi*2 + 0x5bda60], cx
mov esi, dword [0x5dda64]
mov word [edx*2 + 0x5cda60], ax
mov edx, edi
test ecx, ecx
mov dword [0x5bda40], edx
mov edi, 2
je 0x48c6fd
cmp edx, 0x10
jae 0x48c6fd
mov ebp, eax
sub ebp, ecx
cmp ebp, 0x7efa
ja 0x48c6fd
push ecx
call fcn.0048c470
mov edi, eax
mov eax, dword [0x591d84]
add esp, 4
cmp edi, eax
jbe 0x48c6d6
mov edi, eax
mov eax, dword [0x5bda44]
cmp edi, 3
jne 0x48c6f7
mov ebp, dword [0x5dda64]
mov edx, eax
sub edx, ebp
cmp edx, 0x1000
jbe 0x48c6f7
mov edi, 2
mov edx, dword [0x5bda40]
cmp edx, 3
jb 0x48c7f2
cmp edi, edx
ja 0x48c7f2
sub eax, esi
add edx, 0xfffffffd
dec eax
push edx
push eax
call fcn.0048eaa0
mov edx, dword [0x591d84]
mov ebx, eax
mov eax, dword [0x5bda40]
mov ecx, 1
mov esi, dword [0x5bda48]
sub ecx, eax
add esp, 8
add edx, ecx
sub eax, 2
mov dword [0x591d84], edx
mov dword [0x5bda40], eax
mov eax, dword [0x5bda44]
inc eax
xor edx, edx
mov dword [0x5bda44], eax
mov dl, byte [esi + eax + 2]
mov ecx, edx
mov edx, dword [0x591d74]
and edx, 0x3ff
and ecx, 0x7fff
shl edx, 5
xor ecx, edx
mov edx, eax
and edx, 0x7fff
mov dword [0x591d74], ecx
mov di, word [ecx*2 + 0x5cda60]
mov word [edx*2 + 0x5bda60], di
mov word [ecx*2 + 0x5cda60], ax
mov ecx, dword [0x5bda40]
dec ecx
mov dword [0x5bda40], ecx
jne 0x48c74d
xor ebp, ebp
inc eax
test ebx, ebx
mov dword [esp + 0x10], ebp
mov edi, 2
mov dword [0x5bda44], eax
je 0x48c873
mov edx, dword [0x5dda68]
test edx, edx
jl 0x48c7cf
lea ecx, [edx + esi]
jmp 0x48c7d1
xor ecx, ecx
lea esi, [ebx - 1]
push 0
sub eax, edx
push esi
push eax
push ecx
call fcn.0048e120
mov eax, dword [0x5bda44]
add esp, 0x10
mov dword [0x5dda68], eax
jmp 0x48c873
mov ebp, dword [esp + 0x10]
test ebp, ebp
je 0x48c857
mov edx, dword [0x5bda48]
xor ecx, ecx
mov cl, byte [eax + edx - 1]
push ecx
push 0
call fcn.0048eaa0
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x48c850
mov ecx, dword [0x5dda68]
test ecx, ecx
jl 0x48c82a
mov eax, dword [0x5bda48]
add eax, ecx
jmp 0x48c82c
xor eax, eax
lea edx, [ebx - 1]
push 0
push edx
mov edx, dword [0x5bda44]
sub edx, ecx
push edx
push eax
call fcn.0048e120
mov eax, dword [0x5bda44]
add esp, 0x10
mov dword [0x5dda68], eax
jmp 0x48c860
mov eax, dword [0x5bda44]
jmp 0x48c860
mov ebp, 1
mov dword [esp + 0x10], ebp
mov ecx, dword [0x591d84]
inc eax
dec ecx
mov dword [0x5bda44], eax
mov dword [0x591d84], ecx
mov ecx, dword [0x591d88]
test ecx, ecx
je 0x48c8a9
mov ecx, dword [0x591d84]
mov esi, 0x106
cmp ecx, esi
jae 0x48c8a9
mov ecx, dword [0x591d78]
test ecx, ecx
jne 0x48c8a9
call fcn.0048c370
mov eax, dword [0x591d84]
cmp eax, esi
mov eax, dword [0x5bda44]
jb 0x48c88c
mov ecx, dword [0x591d84]
test ecx, ecx
jne 0x48c64b
test ebp, ebp
pop ebp
je 0x48c8de
mov edx, dword [0x5bda48]
xor ecx, ecx
mov cl, byte [eax + edx - 1]
push ecx
push 0
call fcn.0048eaa0
add esp, 8
jmp 0x48c8d9
mov ebx, dword [esp + 0x14]
mov eax, dword [0x5bda44]
mov edx, dword [0x5dda68]
test edx, edx
jl 0x48c8f2
mov ecx, dword [0x5bda48]
add ecx, edx
jmp 0x48c8f4
xor ecx, ecx
dec ebx
push 1
sub eax, edx
push ebx
push eax
push ecx
call fcn.0048e120
mov eax, dword [0x591d8c]
add esp, 0x10
pop edi
pop esi
pop ebx
pop ecx
ret