Function at 0x102f3820
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov dword [ebp - 0x10], edx
mov eax, ecx
mov dword [ebp - 4], eax
test edx, edx
jne 0x102f3853
call fcn.102f2ef0
test eax, eax
jne 0x102f384a
mov eax, dword [ebp - 4]
cmp dword [eax + 0x10], 0
jne 0x102f384a
xor eax, eax
mov esp, ebp
pop ebp
ret
mov eax, 1
mov esp, ebp
pop ebp
ret
push ebx
mov ebx, dword [eax + 0x10]
push esi
push edi
test ebx, ebx
je 0x102f38a6
lea ecx, [ecx]
mov edi, dword [ebx + 0x14]
xor ecx, ecx
test edi, edi
jle 0x102f389f
lea edx, [ebx + 0x24]
lea esp, [esp]
mov eax, dword [ebp - 0x10]
mov esi, dword [edx]
cmp dword [eax + esi*4], 0
mov eax, dword [ebp - 4]
jge 0x102f3a23
movsx eax, word [eax + 0x24]
cmp esi, eax
jne 0x102f3894
cmp dword [ebp + 8], 0
jne 0x102f3a23
mov eax, dword [ebp - 4]
inc ecx
add edx, 8
cmp ecx, edi
jl 0x102f3870
mov ebx, dword [ebx + 4]
test ebx, ebx
jne 0x102f3860
mov ecx, dword [eax]
mov esi, ecx
mov dword [ebp - 0x18], ecx
test ecx, ecx
je 0x102f38c4
cmp byte [ecx], 0
je 0x102f38bc
inc esi
cmp byte [esi], 0
jne 0x102f38b6
sub esi, ecx
and esi, 0x3fffffff
mov eax, dword [eax + 0x40]
add eax, 0x38
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], eax
cmp dword [eax + 0xc], 0
je 0x102f3913
xor edi, edi
mov dword [ebp - 0x14], ecx
mov ebx, esi
test esi, esi
jle 0x102f3906
mov esi, ecx
movzx eax, byte [esi]
lea ecx, [edi*8]
dec ebx
lea esi, [esi + 1]
movzx edx, byte [eax + 0x103fe900]
xor edx, ecx
xor edi, edx
test ebx, ebx
jg 0x102f38e3
mov esi, dword [ebp - 8]
mov ecx, dword [ebp - 0x18]
mov eax, edi
xor edx, edx
mov edi, dword [ebp - 0xc]
div dword [edi]
mov eax, edi
jmp 0x102f3915
xor edx, edx
push edx
mov edx, ecx
mov ecx, eax
push esi
call fcn.102b78a0
add esp, 8
test eax, eax
je 0x102f3a1a
mov esi, dword [eax + 8]
mov dword [ebp - 0x14], esi
test esi, esi
je 0x102f3a1a
lea esp, [esp]
xor ebx, ebx
mov dword [ebp - 0xc], ebx
cmp dword [esi + 0x14], ebx
jle 0x102f3a0c
mov eax, dword [ebp - 4]
lea ecx, [esi + 0x28]
mov dword [ebp - 8], ecx
movsx edx, word [eax + 0x26]
mov dword [ebp - 0x18], edx
mov edi, edi
mov ecx, dword [ecx]
xor edi, edi
mov dword [ebp - 0x1c], ecx
test edx, edx
jle 0x102f39f6
mov ebx, dword [eax + 4]
test ecx, ecx
je 0x102f39c0
mov eax, dword [ebx]
mov esi, ecx
mov cl, byte [eax]
test cl, cl
je 0x102f39a0
movzx edx, byte [esi]
movzx ecx, cl
mov cl, byte [ecx + 0x103fe900]
cmp cl, byte [edx + 0x103fe900]
jne 0x102f399d
mov cl, byte [eax + 1]
inc eax
inc esi
test cl, cl
jne 0x102f3980
mov edx, dword [ebp - 0x18]
movzx eax, byte [eax]
movzx ecx, byte [eax + 0x103fe900]
movzx eax, byte [esi]
movzx eax, byte [eax + 0x103fe900]
sub ecx, eax
mov eax, dword [ebp - 4]
neg ecx
sbb ecx, ecx
inc ecx
jmp 0x102f39c7
movzx ecx, word [ebx + 0x16]
and ecx, 1
test ecx, ecx
je 0x102f39e2
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + edi*4], 0
jge 0x102f3a23
movsx eax, word [eax + 0x24]
cmp edi, eax
jne 0x102f39e2
cmp dword [ebp + 8], 0
jne 0x102f3a23
mov ecx, dword [ebp - 0x1c]
inc edi
mov eax, dword [ebp - 4]
add ebx, 0x18
cmp edi, edx
jl 0x102f3972
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 0x14]
mov ecx, dword [ebp - 8]
inc ebx
add ecx, 8
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ecx
cmp ebx, dword [esi + 0x14]
jl 0x102f3960
mov esi, dword [esi + 0xc]
mov dword [ebp - 0x14], esi
test esi, esi
jne 0x102f3940
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret