Function at 0x102fd394
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x138
mov esi, dword [ebp + 0x1c]
push esi
call fcn.10146454
add esp, 4
mov edi, eax
test eax, eax
jne 0x102fd691
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x102fd3d9
push dword [ebp + 0x18]
mov edi, edx
call fcn.10096164
mov edx, edi
add esp, 4
mov edi, eax
test eax, eax
jne 0x102fd691
mov eax, dword [ebp + 0x20]
mov edi, 0x20012
mov ebx, eax
and eax, 7
shr ebx, 3
cmp eax, 1
sbb ebx, 0xffffffff
mov eax, ebx
sub eax, edx
jb 0x102fd691
mov dword [esp + 0x1c], eax
imul eax, esi, 0x64
mov ecx, dword [eax + 0x10483e24]
mov dword [esp + 4], eax
lea eax, [edx + ecx + 2]
cmp ebx, eax
jb 0x102fd691
mov dword [esp + 0x14], ecx
push ebx
call fcn.10071f14
add esp, 4
mov dword [esp], eax
push ebx
call fcn.10071f14
add esp, 4
mov edi, eax
push ebx
call fcn.10071f14
add esp, 4
mov dword [esp + 8], eax
push ebx
call fcn.10071f14
mov ecx, dword [esp + 4]
add esp, 4
test ecx, ecx
je 0x102fd45e
test edi, edi
je 0x102fd45e
cmp dword [esp + 8], 0
je 0x102fd45e
test eax, eax
jne 0x102fd4a8
test ecx, ecx
je 0x102fd46f
push ecx
mov esi, eax
call fcn.1007274c
mov eax, esi
add esp, 4
mov esi, dword [esp + 8]
test edi, edi
je 0x102fd484
push edi
mov edi, eax
call fcn.1007274c
mov eax, edi
add esp, 4
test esi, esi
je 0x102fd495
push esi
mov esi, eax
call fcn.1007274c
mov eax, esi
add esp, 4
mov edi, 0xc
test eax, eax
je 0x102fd691
push eax
jmp 0x102fd689
mov ecx, dword [ebp + 0x10]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edi
test ecx, ecx
je 0x102fd4da
imul eax, dword [ebp + 0x18], 0x2c
push dword [ebp + 0x14]
push ecx
push dword [esp + 0x10]
call dword [eax + 0x104e351c]
add esp, 0xc
cmp eax, dword [ebp + 0x10]
mov edi, 0x20007
jne 0x102fd662
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 8]
call dword [eax + 0x10483e70]
add esp, 4
mov edi, eax
test eax, eax
jne 0x102fd662
mov eax, 8
push eax
mov edi, dword [esp + 4]
push edi
call fcn.1014aff4
add esp, 8
mov eax, 8
push eax
push edi
lea eax, [esp + 0x28]
push eax
mov eax, dword [esp + 0x10]
call dword [eax + 0x10483e74]
add esp, 0xc
mov edi, eax
test eax, eax
jne 0x102fd662
mov eax, dword [esp + 4]
lea ecx, [eax + 0x10483e74]
push dword [ebp + 0xc]
push dword [ebp + 8]
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x24], ecx
call dword [ecx]
mov ecx, dword [ebp + 0x10]
add esp, 0xc
mov edi, eax
test eax, eax
jne 0x102fd662
push ecx
push dword [esp + 0xc]
lea eax, [esp + 0x28]
push eax
mov eax, dword [esp + 0x24]
call dword [eax]
add esp, 0xc
mov edi, eax
test eax, eax
jne 0x102fd662
push dword [esp + 0xc]
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0xc]
call dword [eax + 0x10483e78]
add esp, 8
mov edi, eax
test eax, eax
jne 0x102fd662
mov edi, dword [esp + 0x1c]
sub edi, dword [esp + 0x14]
lea eax, [edi - 2]
push eax
push 0
push dword [esp + 8]
call fcn.10311124
add esp, 0xc
mov eax, dword [esp]
mov byte [eax + edi - 2], 1
lea eax, [eax + edi - 1]
push dword [ebp + 0x10]
push dword [esp + 0xc]
push eax
call fcn.100e01c4
add esp, 0xc
mov eax, dword [esp + 0x14]
mov ecx, eax
not ecx
add ecx, ebx
mov dword [esp + 4], ecx
push ecx
push dword [esp + 0x14]
push eax
push dword [esp + 0x18]
push esi
call fcn.1008d584
add esp, 0x14
mov edi, eax
test eax, eax
jne 0x102fd662
mov esi, dword [esp + 4]
mov edx, dword [esp]
mov edi, dword [esp + 0x10]
test esi, esi
je 0x102fd60d
xor eax, eax
mov cl, byte [edi + eax]
xor byte [edx + eax], cl
inc eax
cmp eax, esi
jne 0x102fd602
mov ecx, dword [ebp + 0x28]
cmp dword [ecx], ebx
jae 0x102fd620
mov eax, dword [ebp + 0x28]
mov edi, 0x20004
mov dword [eax], ebx
jmp 0x102fd662
mov edi, dword [ebp + 0x24]
push esi
push dword [esp + 4]
push edi
call fcn.100e01c4
add esp, 0xc
add esi, edi
push dword [esp + 0x14]
push dword [esp + 0x10]
push esi
call fcn.100e01c4
add esp, 0xc
xor eax, eax
mov byte [edi + ebx - 1], 0xbc
inc eax
sub eax, dword [ebp + 0x20]
lea ecx, [eax + ebx*8]
mov eax, 0xff
shr eax, cl
mov ecx, dword [ebp + 0x28]
and byte [edi], al
xor edi, edi
mov dword [ecx], ebx
push dword [esp + 0xc]
call fcn.1007274c
add esp, 4
push dword [esp + 8]
call fcn.1007274c
add esp, 4
push dword [esp + 0x10]
call fcn.1007274c
add esp, 4
push dword [esp]
call fcn.1007274c
add esp, 4
mov eax, edi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret