Function at 0x10113390
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
push esi
mov esi, ecx
mov dword [esp + 0x14], edx
mov ecx, edx
mov dword [esp + 0xc], esi
push edi
test ecx, ecx
je 0x10113537
test byte [ebp + 0xc], 8
jne 0x10113537
mov edi, dword [ebp + 8]
mov eax, 0xd
mov ebx, dword [esi + 0xc]
mov dword [esp + 0x1c], ebx
lea esi, [edi - 1]
test esi, esi
js 0x101133ed
mov edi, ecx
movzx edx, byte [edi + esi]
lea ecx, [eax*8]
xor edx, ecx
xor eax, edx
sub esi, 1
jns 0x101133d2
mov edi, dword [ebp + 8]
mov ecx, dword [esp + 0x18]
xor edx, edx
div dword [ebx + 0xc]
mov eax, dword [ebx + 0x14]
mov ebx, dword [eax + edx*4]
test ebx, ebx
je 0x101134ed
mov eax, dword [ebx + 0x14]
inc eax
cmp edi, eax
jne 0x10113457
mov esi, edi
lea edx, [ebx + 0x28]
mov eax, ecx
sub esi, 4
jb 0x10113425
mov ecx, dword [edx]
cmp ecx, dword [eax]
jne 0x1011342a
add edx, 4
add eax, 4
sub esi, 4
jae 0x10113414
cmp esi, 0xfffffffc
je 0x10113467
mov cl, byte [edx]
cmp cl, byte [eax]
jne 0x10113457
cmp esi, 0xfffffffd
je 0x10113467
mov cl, byte [edx + 1]
cmp cl, byte [eax + 1]
jne 0x10113457
cmp esi, 0xfffffffe
je 0x10113467
mov cl, byte [edx + 2]
cmp cl, byte [eax + 2]
jne 0x10113457
cmp esi, 0xffffffff
je 0x10113467
mov cl, byte [edx + 3]
cmp cl, byte [eax + 3]
je 0x10113467
mov ebx, dword [ebx]
test ebx, ebx
je 0x101134ed
mov ecx, dword [esp + 0x18]
jmp 0x10113400
mov esi, dword [ebx + 0x10]
lea eax, [edi + 0x29]
sub esi, eax
mov dword [esp + 0x24], esi
call fcn.100cb1b0
test eax, eax
je 0x1011349e
xor esi, esi
mov dword [esp + 0x20], esi
xor eax, eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x10]
add eax, 0x24
mov dword [esp + 0x14], eax
mov dword [eax], 7
jmp 0x1011351f
lea eax, [esi + 0x16]
cdq
push edx
push eax
call fcn.1001e4e0
mov esi, eax
add esp, 8
mov dword [esp + 0x20], esi
test esi, esi
je 0x10113482
push dword [esp + 0x24]
lea eax, [edi + 0x29]
add eax, ebx
push eax
lea eax, [esi + 0xc]
push eax
call fcn.1012ad80
mov ecx, dword [esp + 0x28]
lea edx, [edi + 0x29]
mov eax, esi
add esp, 0xc
sub eax, edx
mov edx, ebx
add eax, 0xc
push eax
call fcn.1010eb10
mov ecx, eax
add esp, 4
add ecx, dword [esp + 0x24]
jmp 0x101134f1
xor esi, esi
xor ecx, ecx
mov eax, dword [esp + 0x10]
add eax, 0x24
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], esi
mov dword [esp + 0x14], eax
mov dword [eax], 0
test esi, esi
je 0x1011351f
lea eax, [esi + 0xc]
mov dword [esp + 0x1c], ecx
mov dword [esi], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], esi
mov ebx, dword [ebp + 0x10]
mov dword [esp + 0x24], eax
or dword [ebx + 4], 1
test esi, esi
je 0x10113758
jmp 0x10113610
push dword [ebp + 8]
mov ecx, dword [esi + 0xc]
lea ebx, [esi + 0x24]
mov dword [esp + 0x28], ebx
call fcn.1010f390
mov ecx, dword [esi + 0xc]
add esp, 4
mov dword [ebx], eax
mov edi, dword [ecx + 0x10]
test edi, edi
je 0x101135a2
lea ebx, [edi + 0x28]
mov esi, ebx
mov dword [esp + 0x18], ebx
lea edx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x10113564
sub esi, edx
mov edx, edi
push 0
call fcn.1010eb10
mov eax, dword [edi + 0x10]
lea ecx, [ebx + 1]
sub eax, esi
add ecx, esi
sub eax, 0x29
mov dword [esp + 0x18], ecx
add esp, 4
mov dword [esp + 0x1c], eax
test ebx, ebx
je 0x101135b6
mov edi, ebx
lea edx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x10113597
sub edi, edx
jmp 0x101135b8
xor ecx, ecx
mov dword [esp + 0x18], 0
xor eax, eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], eax
xor edi, edi
test ecx, ecx
je 0x10113755
mov ebx, dword [esp + 0x24]
cmp dword [ebx], 0
jne 0x10113755
call fcn.100cb1b0
test eax, eax
jne 0x1011374f
push eax
push 0xc
call fcn.1001e4e0
mov esi, eax
add esp, 8
mov dword [esp + 0x20], esi
test esi, esi
je 0x1011374f
mov eax, dword [esp + 0x14]
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi], eax
mov eax, ebx
mov ebx, dword [ebp + 0x10]
mov dword [esp + 0x14], eax
mov dword [ebx + 0x48], 0
lea ecx, [ebx + 0x44]
test edi, edi
je 0x10113663
cmp edi, dword [ecx + 8]
jbe 0x10113648
mov edx, ecx
mov ecx, dword [esp + 0x24]
push edi
call fcn.10107b20
mov ecx, dword [esp + 0x18]
add esp, 4
mov dword [esp + 0x14], ecx
test eax, eax
jne 0x10113663
mov eax, dword [esp + 0x10]
lea ecx, [ebx + 0x44]
add eax, 0x24
mov edx, dword [esp + 0x18]
mov dword [esp + 0x14], eax
mov eax, dword [ecx]
add eax, dword [ecx + 4]
push edi
push edx
push eax
call fcn.1012ad80
add esp, 0xc
add dword [ebx + 0x48], edi
mov eax, dword [esp + 0x1c]
lea edx, [ebx + 0x50]
mov dword [esi + 8], eax
mov dword [esi + 4], eax
mov dword [ebx + 0xc], esi
mov ecx, dword [esi]
call fcn.101268f0
test byte [ebp + 0xc], 2
movzx eax, al
cdq
mov esi, eax
mov dword [ebx + 0x1c], edx
mov eax, dword [esp + 0x20]
mov dword [ebx + 0x18], esi
mov edx, dword [eax + 4]
mov dword [ebx + 0x30], edx
je 0x101136ac
mov esi, dword [esp + 0x10]
mov edx, ebx
or dword [ebx + 4], 2
mov ecx, esi
call fcn.10111c40
jmp 0x1011375c
mov eax, dword [esp + 0x14]
cmp dword [eax], 0
jne 0x10113758
mov eax, dword [esp + 0x10]
mov edi, esi
mov ecx, dword [ebx + 0xc]
mov eax, dword [eax]
cmp dword [eax + 0x30], 1
jne 0x10113717
cmp edx, dword [ecx + 8]
cmovge edx, dword [ecx + 8]
mov byte [ebx + 0x5c], 0
mov dword [ebx + 0x58], 1
cmp esi, edx
jge 0x10113744
mov eax, dword [ecx]
cmp byte [esi + eax], 0
jne 0x10113744
inc esi
mov byte [ebx + 0x5c], 1
cmp esi, edx
jge 0x10113705
mov eax, dword [ecx]
cmp byte [esi + eax], 0
jne 0x10113705
inc esi
mov eax, esi
cdq
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], edx
jmp 0x10113758
mov eax, esi
mov dword [ebx + 0x58], 0
cdq
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], edx
jmp 0x10113758
mov ecx, dword [ecx]
add ecx, esi
inc esi
movzx eax, byte [ecx]
mov dword [esp + 0x24], eax
test al, al
jns 0x10113737
lea edx, [esp + 0x24]
call fcn.10126860
lea esi, [eax + edi]
mov eax, dword [esp + 0x24]
mov cl, al
and cl, 1
sar eax, 1
mov byte [ebx + 0x5c], cl
mov dword [ebx + 0x58], eax
mov eax, esi
cdq
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], edx
jmp 0x10113758
mov dword [ebx], 7
mov ebx, dword [ebp + 0x10]
mov esi, dword [esp + 0x10]
test byte [ebx + 4], 2
je 0x10113770
mov dword [ebx + 0x20], 0x10112010
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi]
mov ecx, 0x10112310
mov edx, 0x10112090
pop edi
pop esi
cmp dword [eax + 0x30], 1
cmove ecx, edx
mov dword [ebx + 0x20], ecx
pop ebx
mov esp, ebp
pop ebp
ret