Function at 0x4887d0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x18
push ebx
push esi
mov esi, dword [esp + 0x24]
xor ebx, ebx
push edi
mov dword [esp + 0x14], ebx
mov eax, dword [esi + 0x4e84]
mov edi, 2
cmp eax, 3
jg 0x488800
push esi
call fcn.004884a0
add esp, 4
pop edi
pop esi
pop ebx
add esp, 0x18
ret
mov eax, dword [esi + 0x88]
test eax, eax
je 0x488b8f
push ebp
cmp dword [esi], 0
jne 0x488b72
mov ecx, dword [esi + 0x7c]
mov eax, dword [esi + 0x54]
xor edx, edx
mov dl, byte [ecx + eax + 2]
and ecx, 0xffff
mov eax, edx
mov edx, dword [esi + 0x74]
and edx, 0x3ff
and eax, 0x7fff
shl edx, 5
xor eax, edx
mov edx, dword [esi + 0x64]
mov dword [esi + 0x74], eax
mov eax, dword [edx + eax*4]
mov edx, dword [esi + 0x60]
test eax, eax
mov dword [edx + ecx*4], eax
mov ecx, dword [esi + 0x74]
mov edx, dword [esi + 0x64]
mov ebx, dword [esi + 0x7c]
mov dword [edx + ecx*4], ebx
mov ecx, dword [esi + 0x80]
mov dword [esi + 0x78], edi
mov dword [esp + 0x24], ecx
mov edi, 2
je 0x4889f7
mov ecx, dword [esi + 0x78]
mov edx, dword [esi + 0x90]
cmp ecx, edx
jae 0x4889f7
mov edx, dword [esi + 0x7c]
mov ebx, edx
mov dword [esp + 0x20], edx
sub ebx, eax
cmp ebx, 0xffff
ja 0x4889f7
mov ebp, eax
mov eax, dword [esi + 0x8c]
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x54]
add eax, edx
cmp edx, 0xffff
mov edi, ecx
jbe 0x4888c3
add edx, 0xffff0001
mov dword [esp + 0x1c], edx
jmp 0x4888cb
mov dword [esp + 0x1c], 0
mov bl, byte [edi + eax - 1]
lea edx, [eax + 0xfff2]
mov byte [esp + 0x2c], bl
mov bl, byte [edi + eax]
mov byte [esp + 0x13], bl
mov ebx, dword [esi + 0x94]
cmp ecx, ebx
jb 0x4888ef
shr dword [esp + 0x14], 2
mov ecx, dword [esi + 0x54]
mov bl, byte [esp + 0x13]
add ecx, ebp
cmp byte [ecx + edi], bl
jne 0x4889ab
mov bl, byte [esp + 0x2c]
cmp byte [ecx + edi - 1], bl
jne 0x4889ab
mov bl, byte [ecx]
cmp bl, byte [eax]
jne 0x4889ab
mov bl, byte [ecx + 1]
inc ecx
cmp bl, byte [eax + 1]
jne 0x4889ab
add eax, 2
inc ecx
mov bl, byte [eax + 1]
inc eax
inc ecx
cmp bl, byte [ecx]
jne 0x488976
mov bl, byte [eax + 1]
inc eax
inc ecx
cmp bl, byte [ecx]
jne 0x488976
mov bl, byte [eax + 1]
inc eax
inc ecx
cmp bl, byte [ecx]
jne 0x488976
mov bl, byte [eax + 1]
inc eax
inc ecx
cmp bl, byte [ecx]
jne 0x488976
mov bl, byte [eax + 1]
inc eax
inc ecx
cmp bl, byte [ecx]
jne 0x488976
mov bl, byte [eax + 1]
inc eax
inc ecx
cmp bl, byte [ecx]
jne 0x488976
mov bl, byte [eax + 1]
inc eax
inc ecx
cmp bl, byte [ecx]
jne 0x488976
mov bl, byte [eax + 1]
inc eax
inc ecx
cmp bl, byte [ecx]
jne 0x488976
cmp eax, edx
jb 0x48892a
mov ecx, eax
lea eax, [edx - 0xfff2]
sub ecx, edx
add ecx, 0xfff2
cmp ecx, edi
jle 0x4889ab
mov ebx, dword [esi + 0x98]
mov dword [esi + 0x80], ebp
cmp ecx, ebx
mov edi, ecx
jge 0x4889ce
mov bl, byte [ecx + eax - 1]
mov cl, byte [ecx + eax]
mov byte [esp + 0x2c], bl
mov byte [esp + 0x13], cl
mov ecx, dword [esi + 0x60]
and ebp, 0xffff
mov ebp, dword [ecx + ebp*4]
mov ecx, dword [esp + 0x1c]
cmp ebp, ecx
jbe 0x4889ce
mov ecx, dword [esp + 0x14]
dec ecx
mov dword [esp + 0x14], ecx
jne 0x4888ef
mov eax, dword [esi + 0x88]
cmp edi, eax
jbe 0x4889da
mov edi, eax
cmp edi, 3
jne 0x4889f7
mov eax, dword [esp + 0x20]
mov edx, dword [esi + 0x80]
sub eax, edx
cmp eax, 0x1000
jbe 0x4889f7
mov edi, 2
mov eax, dword [esi + 0x78]
cmp eax, 3
jb 0x488ad8
cmp edi, eax
ja 0x488ad8
mov edx, dword [esi + 0x7c]
mov edi, dword [esp + 0x24]
sub edx, edi
add eax, 0xfffffffd
push esi
dec edx
push eax
push edx
call fcn.0048a300
mov ecx, dword [esi + 0x78]
mov edi, dword [esi + 0x88]
mov edx, 1
add esp, 0xc
sub edx, ecx
add edi, edx
add ecx, 0xfffffffe
mov dword [esi + 0x88], edi
mov dword [esi + 0x78], ecx
mov ebx, dword [esi + 0x7c]
mov ecx, dword [esi + 0x54]
mov edi, dword [esi + 0x74]
inc ebx
mov dword [esi + 0x7c], ebx
mov edx, ebx
xor ebx, ebx
and edi, 0x3ff
mov bl, byte [edx + ecx + 2]
and edx, 0xffff
mov ecx, ebx
mov ebx, dword [esi + 0x60]
and ecx, 0x7fff
shl edi, 5
xor ecx, edi
mov edi, dword [esi + 0x64]
mov dword [esi + 0x74], ecx
mov ecx, dword [edi + ecx*4]
mov dword [ebx + edx*4], ecx
mov edx, dword [esi + 0x74]
mov ecx, dword [esi + 0x64]
mov edi, dword [esi + 0x7c]
mov dword [ecx + edx*4], edi
mov ecx, dword [esi + 0x78]
dec ecx
mov dword [esi + 0x78], ecx
jne 0x488a41
mov ebp, dword [esi + 0x7c]
xor ebx, ebx
inc ebp
mov dword [esp + 0x18], ebx
test eax, eax
mov edi, 2
mov dword [esi + 0x7c], ebp
mov ecx, ebp
je 0x488b45
mov edx, dword [esi + 0x6c]
test edx, edx
jl 0x488abf
mov ebp, dword [esi + 0x54]
mov eax, edx
add eax, ebp
jmp 0x488ac1
xor eax, eax
push esi
sub ecx, edx
push 0
push ecx
push eax
call fcn.00489ee0
mov edx, dword [esi + 0x7c]
add esp, 0x10
mov dword [esi + 0x6c], edx
jmp 0x488b45
mov ebx, dword [esp + 0x18]
test ebx, ebx
je 0x488b28
mov eax, dword [esi + 0x7c]
mov ecx, dword [esi + 0x54]
xor edx, edx
push esi
mov dl, byte [eax + ecx - 1]
push edx
push 0
call fcn.0048a300
add esp, 0xc
test eax, eax
je 0x488b31
mov ecx, dword [esi + 0x6c]
test ecx, ecx
jl 0x488b0c
mov edx, dword [esi + 0x54]
mov eax, ecx
add eax, edx
jmp 0x488b0e
xor eax, eax
mov edx, dword [esi + 0x7c]
push esi
sub edx, ecx
push 0
push edx
push eax
call fcn.00489ee0
mov eax, dword [esi + 0x7c]
add esp, 0x10
mov dword [esi + 0x6c], eax
jmp 0x488b31
mov ebx, 1
mov dword [esp + 0x18], ebx
mov ecx, dword [esi + 0x7c]
mov eax, dword [esi + 0x88]
inc ecx
dec eax
mov dword [esi + 0x7c], ecx
mov dword [esi + 0x88], eax
cmp dword [esi + 0x88], 0xfff6
jae 0x488b64
mov eax, dword [esi + 0x84]
test eax, eax
jne 0x488b64
push esi
call fcn.00488370
add esp, 4
mov eax, dword [esi + 0x88]
test eax, eax
jne 0x48880f
test ebx, ebx
pop ebp
je 0x488b8f
mov ecx, dword [esi + 0x7c]
mov edx, dword [esi + 0x54]
xor eax, eax
push esi
mov al, byte [ecx + edx - 1]
push eax
push 0
call fcn.0048a300
add esp, 0xc
mov ecx, dword [esi + 0x6c]
test ecx, ecx
jl 0x488b9d
mov eax, dword [esi + 0x54]
add eax, ecx
jmp 0x488b9f
xor eax, eax
mov edx, dword [esi + 0x7c]
push esi
sub edx, ecx
push 1
push edx
push eax
call fcn.00489ee0
add esp, 0x10
pop edi
pop esi
pop ebx
add esp, 0x18
ret