Function at 0x10258970
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov eax, dword [esi + 0x10b0]
mov ebx, dword [eax]
mov dword [ebp - 8], ebx
mov dl, byte [ebx + 0x15]
mov al, byte [ebx + 5]
movsx edi, byte [ebx + 0x14]
mov byte [ebp - 1], al
mov dword [ebp - 0x20], edi
test dl, dl
jns 0x10258b7e
mov al, byte [ebx + 0x9f]
movzx ecx, al
shr ecx, 4
and ecx, 3
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x18], 0x7fffffff
cmp dword [ecx + 0x64d3c], 0
je 0x10258af9
test al, 0x30
jbe 0x10258af9
push 0
push esi
call fcn.101eaac0
xor edi, edi
mov dword [ebp - 0x28], eax
add esp, 8
mov dword [ebp - 0xc], 0xffffffff
test byte [ebx + 0x9f], 0x30
mov edx, 0x7fffffff
xorps xmm0, xmm0
mov dword [ebp - 0x10], edx
movq qword [ebp - 0x3c], xmm0
mov dword [ebp - 0x14], edi
jbe 0x10258af9
lea ebx, [esi + 0x2c70]
cwde
mov esi, dword [ebp - 8]
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x2c], eax
push ebx
push edi
lea eax, [esi + 0x14]
mov dword [ebp - 0x30], edx
push eax
push 0
call fcn.101eab10
movsx ebx, word [ebp - 0x26]
add esp, 0x10
mov dword [ebp + edi*4 - 0x3c], eax
movsx eax, word [ebp + edi*4 - 0x3a]
sub ebx, eax
movsx eax, word [ebp + edi*4 - 0x3c]
mov edi, dword [ebp - 0x2c]
sub edi, eax
mov eax, ebx
cdq
mov ecx, eax
mov eax, edi
xor ecx, edx
sub ecx, edx
cdq
xor eax, edx
sub eax, edx
cmp eax, ecx
cmovle edi, ebx
mov ebx, dword [ebp - 0x34]
mov eax, edi
mov edi, dword [ebp - 0x14]
cdq
mov ecx, edi
xor eax, edx
sub eax, edx
mov edx, dword [ebp - 0x10]
cmp edx, eax
cmovg edx, eax
cmp dword [ebp - 0x30], eax
movzx eax, byte [esi + 0x9f]
cmovle ecx, dword [ebp - 0xc]
inc edi
shr eax, 4
and eax, 3
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x14], edi
cmp edi, eax
jl 0x10258a17
mov esi, dword [ebp + 0xc]
cmp edx, 0x80
jge 0x10258af6
mov eax, dword [ebp - 0x20]
mov ebx, dword [ebp + 0x1c]
lea ecx, [eax + ecx*8]
mov eax, dword [ebx + 0x38]
shl ecx, 2
cmp dword [ecx + eax], 0
je 0x10258af6
add ecx, dword [ebx + 0x30]
mov edx, dword [ebp - 0xc]
movsx ebx, word [ecx + 2]
movsx eax, word [ebp + edx*4 - 0x3a]
movsx edi, word [ecx]
sub ebx, eax
movsx eax, word [ebp + edx*4 - 0x3c]
sub edi, eax
mov eax, edi
cdq
mov ecx, eax
mov eax, ebx
xor ecx, edx
sub ecx, edx
cdq
xor eax, edx
sub eax, edx
cmp ecx, eax
cmovle edi, ebx
mov ebx, dword [ebp - 0x10]
mov eax, edi
add ebx, 4
cdq
xor eax, edx
sub eax, edx
add ebx, eax
sar ebx, 3
mov dword [ebp - 0x18], ebx
mov ebx, dword [ebp - 8]
push dword [ebp + 0x1c]
mov edi, dword [ebp + 0x18]
lea eax, [ebp - 0x24]
push eax
push dword [ebp + 0x20]
push dword [ebp - 0x18]
push edi
push 0
push dword [ebp + 0x10]
push esi
push dword [ebp + 8]
call fcn.10221970
mov eax, dword [ebp - 0x24]
add esp, 0x24
cmp eax, 0x80008000
je 0x10258cd7
mov ecx, dword [ebp - 0x1c]
mov esi, dword [ebp + 0x1c]
mov edx, dword [ebp - 0x20]
lea edx, [edx + ecx*8]
mov ecx, dword [esi + 0x30]
mov dword [ecx + edx*4], eax
mov ecx, dword [esi + 0x34]
mov eax, dword [edi]
mov edi, dword [ebp + 0x14]
mov dword [ecx + edx*4], eax
mov eax, dword [esi + 0x38]
mov ecx, dword [ebp + 0x20]
mov dword [eax + edx*4], 1
mov eax, dword [ebp - 0x24]
mov dword [edi], eax
movzx eax, byte [ebx + 0x9f]
shr eax, 4
and eax, 3
lea eax, [eax + eax*4]
cmp dword [ecx + eax*4 + 0x10], 0
jne 0x10258cd7
pop edi
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret
movsx eax, dl
mov dword [ebp - 0x24], eax
mov al, byte [ebx + 0x9f]
movzx ecx, al
shr ecx, 4
and ecx, 3
mov dword [ebp - 0x1c], ecx
test dl, dl
jle 0x102589b1
mov esi, dword [ebp - 0x24]
lea edi, [edi + ecx*8]
mov edx, dword [ebp + 0x1c]
lea ecx, [esi + ecx*8]
mov esi, dword [ebp + 0xc]
mov eax, dword [edx + 0x38]
shl ecx, 2
mov dword [ebp - 0x24], ecx
mov ebx, dword [eax + edi*4]
mov eax, dword [ecx + eax]
mov dword [ebp - 0x10], eax
mov al, byte [ebp - 1]
cmp al, 0x18
jne 0x10258c52
test ebx, ebx
mov ebx, dword [ebp + 0x14]
je 0x10258be8
mov eax, dword [edx + 0x30]
push 0
push ebx
push esi
mov eax, dword [eax + edi*4]
mov dword [ebx], eax
call fcn.10255360
mov edx, dword [ebp + 0x1c]
add esp, 0xc
cmp dword [ebp - 0x10], 0
je 0x10258c08
mov eax, dword [edx + 0x30]
lea ecx, [ebx + 4]
mov edx, dword [ebp - 0x24]
push 1
push ecx
push esi
mov eax, dword [edx + eax]
mov dword [ecx], eax
call fcn.10255360
add esp, 0xc
mov eax, dword [ebp + 0x18]
xor edi, edi
mov dword [eax], 0
push edi
push esi
call fcn.101eaac0
mov dword [ebp + 0xc], eax
mov eax, dword [esi + 0xa97c]
push 0x6c
push dword [eax + 0x80010]
push eax
lea eax, [ebp + 0xc]
push eax
push ebx
call fcn.1021af20
mov ecx, dword [ebp + 0x18]
inc edi
add esp, 0x1c
add ebx, 4
add dword [ecx], eax
cmp edi, 2
jl 0x10258c13
pop edi
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret
cmp al, 0x13
je 0x10258c80
cmp al, 0x15
je 0x10258c80
test ebx, ebx
je 0x10258c79
mov eax, dword [edx + 0x30]
push 0
mov eax, dword [eax + edi*4]
mov edi, dword [ebp + 0x14]
push edi
push esi
mov dword [edi], eax
call fcn.10255360
add esp, 0xc
push 0
jmp 0x10258ca2
mov edi, dword [ebp + 0x14]
push 0
jmp 0x10258ca2
mov edi, dword [ebp + 0x14]
add edi, 4
cmp dword [ebp - 0x10], 0
je 0x10258ca0
mov eax, dword [edx + 0x30]
push 1
push edi
push esi
mov eax, dword [ecx + eax]
mov dword [edi], eax
call fcn.10255360
add esp, 0xc
push 1
push esi
call fcn.101eaac0
mov dword [ebp + 0xc], eax
mov eax, dword [esi + 0xa97c]
push 0x6c
push dword [eax + 0x80010]
push eax
lea eax, [ebp + 0xc]
push eax
push edi
call fcn.1021af20
mov ecx, dword [ebp + 0x18]
add esp, 0x1c
pop edi
mov dword [ecx], eax
xor eax, eax
pop esi
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
or eax, 0xffffffff
mov edx, 0x7fffffff
pop ebx
mov esp, ebp
pop ebp
ret