Function at 0x10015990
Capabilities:
Encode data using xor

Disassembly:
push ebp
push esi
mov esi, dword [esp + 0xc]
xor ebp, ebp
push edi
mov edi, 2
cmp dword [esi + 0x4e54], 3
jg 0x100159b4
push esi
call fcn.100157a0
add esp, 4
pop edi
pop esi
pop ebp
ret
mov eax, dword [esi + 0x82]
test eax, eax
je 0x10015bed
push ebx
cmp dword [esi], 0
jne 0x10015bd0
mov ecx, dword [esi + 0x76]
mov eax, dword [esi + 0x4e]
xor edx, edx
mov dl, byte [ecx + eax + 2]
and ecx, 0xffff
mov eax, edx
mov edx, dword [esi + 0x6e]
and edx, 0x3ff
and eax, 0x7fff
shl edx, 5
xor eax, edx
mov edx, dword [esi + 0x5e]
mov dword [esi + 0x6e], eax
mov eax, dword [edx + eax*4]
mov edx, dword [esi + 0x5a]
test eax, eax
mov dword [edx + ecx*4], eax
mov ecx, dword [esi + 0x6e]
mov edx, dword [esi + 0x5e]
mov ebx, dword [esi + 0x76]
mov dword [edx + ecx*4], ebx
mov ebx, dword [esi + 0x7a]
mov dword [esi + 0x72], edi
mov edi, 2
je 0x10015a68
mov ecx, dword [esi + 0x72]
mov edx, dword [esi + 0x8a]
cmp ecx, edx
jae 0x10015a68
mov edx, dword [esi + 0x76]
sub edx, eax
cmp edx, 0xffff
ja 0x10015a68
push esi
push eax
call fcn.10015530
mov edi, eax
mov eax, dword [esi + 0x82]
add esp, 8
cmp edi, eax
jbe 0x10015a4f
mov edi, eax
cmp edi, 3
jne 0x10015a68
mov eax, dword [esi + 0x76]
mov edx, dword [esi + 0x7a]
sub eax, edx
cmp eax, 0x1000
jbe 0x10015a68
mov edi, 2
mov eax, dword [esi + 0x72]
cmp eax, 3
jb 0x10015b41
cmp edi, eax
ja 0x10015b41
mov ecx, dword [esi + 0x76]
add eax, 0xfffffffd
sub ecx, ebx
push esi
dec ecx
push eax
push ecx
call fcn.10014dd0
mov ecx, dword [esi + 0x72]
mov edi, dword [esi + 0x82]
mov edx, 1
add esp, 0xc
sub edx, ecx
add edi, edx
add ecx, 0xfffffffe
mov dword [esi + 0x82], edi
mov dword [esi + 0x72], ecx
mov ebx, dword [esi + 0x76]
mov ecx, dword [esi + 0x4e]
mov edi, dword [esi + 0x6e]
inc ebx
mov dword [esi + 0x76], 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 + 0x5a]
and ecx, 0x7fff
shl edi, 5
xor ecx, edi
mov edi, dword [esi + 0x5e]
mov dword [esi + 0x6e], ecx
mov ecx, dword [edi + ecx*4]
mov dword [ebx + edx*4], ecx
mov edx, dword [esi + 0x6e]
mov ecx, dword [esi + 0x5e]
mov edi, dword [esi + 0x76]
mov dword [ecx + edx*4], edi
mov ecx, dword [esi + 0x72]
dec ecx
mov dword [esi + 0x72], ecx
jne 0x10015aae
mov ebx, dword [esi + 0x76]
xor ebp, ebp
inc ebx
mov edi, 2
test eax, eax
mov dword [esi + 0x76], ebx
mov ecx, ebx
je 0x10015ba6
mov edx, dword [esi + 0x66]
test edx, edx
jl 0x10015b28
mov ebx, dword [esi + 0x4e]
mov eax, edx
add eax, ebx
jmp 0x10015b2a
xor eax, eax
push esi
sub ecx, edx
push 0
push ecx
push eax
call fcn.10014b20
mov edx, dword [esi + 0x76]
add esp, 0x10
mov dword [esi + 0x66], edx
jmp 0x10015ba6
test ebp, ebp
je 0x10015b8d
mov eax, dword [esi + 0x76]
mov ecx, dword [esi + 0x4e]
xor edx, edx
push esi
mov dl, byte [eax + ecx - 1]
push edx
push 0
call fcn.10014dd0
add esp, 0xc
test eax, eax
je 0x10015b92
mov ecx, dword [esi + 0x66]
test ecx, ecx
jl 0x10015b71
mov edx, dword [esi + 0x4e]
mov eax, ecx
add eax, edx
jmp 0x10015b73
xor eax, eax
mov edx, dword [esi + 0x76]
push esi
sub edx, ecx
push 0
push edx
push eax
call fcn.10014b20
mov eax, dword [esi + 0x76]
add esp, 0x10
mov dword [esi + 0x66], eax
jmp 0x10015b92
mov ebp, 1
mov ecx, dword [esi + 0x76]
mov eax, dword [esi + 0x82]
inc ecx
dec eax
mov dword [esi + 0x76], ecx
mov dword [esi + 0x82], eax
cmp dword [esi + 0x82], 0xfff6
jae 0x10015bc2
mov eax, dword [esi + 0x7e]
test eax, eax
jne 0x10015bc2
push esi
call fcn.10015680
add esp, 4
mov eax, dword [esi + 0x82]
test eax, eax
jne 0x100159c3
test ebp, ebp
pop ebx
je 0x10015bed
mov ecx, dword [esi + 0x76]
mov edx, dword [esi + 0x4e]
xor eax, eax
push esi
mov al, byte [ecx + edx - 1]
push eax
push 0
call fcn.10014dd0
add esp, 0xc
mov ecx, dword [esi + 0x66]
test ecx, ecx
jl 0x10015bfb
mov eax, dword [esi + 0x4e]
add eax, ecx
jmp 0x10015bfd
xor eax, eax
mov edx, dword [esi + 0x76]
push esi
sub edx, ecx
push 1
push edx
push eax
call fcn.10014b20
add esp, 0x10
pop edi
pop esi
pop ebp
ret