Function at 0x103f46c0
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 0x103f46f3
call fcn.103f3d90
test eax, eax
jne 0x103f46ea
mov eax, dword [ebp - 4]
cmp dword [eax + 0x10], 0
jne 0x103f46ea
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 0x103f4746
lea ecx, [ecx]
mov edi, dword [ebx + 0x14]
xor ecx, ecx
test edi, edi
jle 0x103f473f
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 0x103f48c3
movsx eax, word [eax + 0x24]
cmp esi, eax
jne 0x103f4734
cmp dword [ebp + 8], 0
jne 0x103f48c3
mov eax, dword [ebp - 4]
inc ecx
add edx, 8
cmp ecx, edi
jl 0x103f4710
mov ebx, dword [ebx + 4]
test ebx, ebx
jne 0x103f4700
mov ecx, dword [eax]
mov esi, ecx
mov dword [ebp - 0x18], ecx
test ecx, ecx
je 0x103f4764
cmp byte [ecx], 0
je 0x103f475c
inc esi
cmp byte [esi], 0
jne 0x103f4756
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 0x103f47b3
xor edi, edi
mov dword [ebp - 0x14], ecx
mov ebx, esi
test esi, esi
jle 0x103f47a6
mov esi, ecx
movzx eax, byte [esi]
lea ecx, [edi*8]
dec ebx
lea esi, [esi + 1]
movzx edx, byte [eax + 0x105eb560]
xor edx, ecx
xor edi, edx
test ebx, ebx
jg 0x103f4783
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 0x103f47b5
xor edx, edx
push edx
mov edx, ecx
mov ecx, eax
push esi
call fcn.103b8720
add esp, 8
test eax, eax
je 0x103f48ba
mov esi, dword [eax + 8]
mov dword [ebp - 0x14], esi
test esi, esi
je 0x103f48ba
lea esp, [esp]
xor ebx, ebx
mov dword [ebp - 0xc], ebx
cmp dword [esi + 0x14], ebx
jle 0x103f48ac
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 0x103f4896
mov ebx, dword [eax + 4]
test ecx, ecx
je 0x103f4860
mov eax, dword [ebx]
mov esi, ecx
mov cl, byte [eax]
test cl, cl
je 0x103f4840
movzx edx, byte [esi]
movzx ecx, cl
mov cl, byte [ecx + 0x105eb560]
cmp cl, byte [edx + 0x105eb560]
jne 0x103f483d
mov cl, byte [eax + 1]
inc eax
inc esi
test cl, cl
jne 0x103f4820
mov edx, dword [ebp - 0x18]
movzx eax, byte [eax]
movzx ecx, byte [eax + 0x105eb560]
movzx eax, byte [esi]
movzx eax, byte [eax + 0x105eb560]
sub ecx, eax
mov eax, dword [ebp - 4]
neg ecx
sbb ecx, ecx
inc ecx
jmp 0x103f4867
movzx ecx, word [ebx + 0x16]
and ecx, 1
test ecx, ecx
je 0x103f4882
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + edi*4], 0
jge 0x103f48c3
movsx eax, word [eax + 0x24]
cmp edi, eax
jne 0x103f4882
cmp dword [ebp + 8], 0
jne 0x103f48c3
mov ecx, dword [ebp - 0x1c]
inc edi
mov eax, dword [ebp - 4]
add ebx, 0x18
cmp edi, edx
jl 0x103f4812
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 0x103f4800
mov esi, dword [esi + 0xc]
mov dword [ebp - 0x14], esi
test esi, esi
jne 0x103f47e0
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