Function at 0x10112790
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 0x10112937
test byte [ebp + 0xc], 8
jne 0x10112937
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 0x101127ed
mov edi, ecx
movzx edx, byte [esi + edi]
lea ecx, [eax*8]
xor edx, ecx
xor eax, edx
sub esi, 1
jns 0x101127d2
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 0x101128ed
mov eax, dword [ebx + 0x14]
inc eax
cmp edi, eax
jne 0x10112857
mov esi, edi
lea edx, [ebx + 0x28]
mov eax, ecx
sub esi, 4
jb 0x10112825
mov ecx, dword [edx]
cmp ecx, dword [eax]
jne 0x1011282a
add edx, 4
add eax, 4
sub esi, 4
jae 0x10112814
cmp esi, 0xfffffffc
je 0x10112867
mov cl, byte [edx]
cmp cl, byte [eax]
jne 0x10112857
cmp esi, 0xfffffffd
je 0x10112867
mov cl, byte [edx + 1]
cmp cl, byte [eax + 1]
jne 0x10112857
cmp esi, 0xfffffffe
je 0x10112867
mov cl, byte [edx + 2]
cmp cl, byte [eax + 2]
jne 0x10112857
cmp esi, 0xffffffff
je 0x10112867
mov cl, byte [edx + 3]
cmp cl, byte [eax + 3]
je 0x10112867
mov ebx, dword [ebx]
test ebx, ebx
je 0x101128ed
mov ecx, dword [esp + 0x18]
jmp 0x10112800
mov esi, dword [ebx + 0x10]
lea eax, [edi + 0x29]
sub esi, eax
mov dword [esp + 0x24], esi
call fcn.100ca320
test eax, eax
je 0x1011289e
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 0x1011291f
lea eax, [esi + 0x16]
cdq
push edx
push eax
call fcn.1001e500
mov esi, eax
add esp, 8
mov dword [esp + 0x20], esi
test esi, esi
je 0x10112882
push dword [esp + 0x24]
lea eax, [edi + 0x29]
add eax, ebx
push eax
lea eax, [esi + 0xc]
push eax
call fcn.1012b000
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.1010df30
mov ecx, eax
add esp, 4
add ecx, dword [esp + 0x24]
jmp 0x101128f1
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 0x1011291f
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 0x10112b58
jmp 0x10112a10
push dword [ebp + 8]
mov ecx, dword [esi + 0xc]
lea ebx, [esi + 0x24]
mov dword [esp + 0x28], ebx
call fcn.1010e7b0
mov ecx, dword [esi + 0xc]
add esp, 4
mov dword [ebx], eax
mov edi, dword [ecx + 0x10]
test edi, edi
je 0x101129a2
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 0x10112964
sub esi, edx
mov edx, edi
push 0
call fcn.1010df30
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 0x101129b6
mov edi, ebx
lea edx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x10112997
sub edi, edx
jmp 0x101129b8
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 0x10112b55
mov ebx, dword [esp + 0x24]
cmp dword [ebx], 0
jne 0x10112b55
call fcn.100ca320
test eax, eax
jne 0x10112b4f
push eax
push 0xc
call fcn.1001e500
mov esi, eax
add esp, 8
mov dword [esp + 0x20], esi
test esi, esi
je 0x10112b4f
mov eax, dword [esp + 0x14]
xorps xmm0, xmm0
movq qword [esi], xmm0
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 0x10112a63
cmp edi, dword [ecx + 8]
jbe 0x10112a48
mov edx, ecx
mov ecx, dword [esp + 0x24]
push edi
call fcn.10106e40
mov ecx, dword [esp + 0x18]
add esp, 4
mov dword [esp + 0x14], ecx
test eax, eax
jne 0x10112a63
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.1012b000
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.10126b50
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 0x10112aac
mov esi, dword [esp + 0x10]
mov edx, ebx
or dword [ebx + 4], 2
mov ecx, esi
call fcn.10111040
jmp 0x10112b5c
mov eax, dword [esp + 0x14]
cmp dword [eax], 0
jne 0x10112b58
mov eax, dword [esp + 0x10]
mov edi, esi
mov ecx, dword [ebx + 0xc]
mov eax, dword [eax]
cmp dword [eax + 0x30], 1
jne 0x10112b17
cmp edx, dword [ecx + 8]
cmovge edx, dword [ecx + 8]
mov byte [ebx + 0x5c], 0
mov dword [ebx + 0x58], 1
cmp esi, edx
jge 0x10112b44
mov eax, dword [ecx]
cmp byte [esi + eax], 0
jne 0x10112b44
inc esi
mov byte [ebx + 0x5c], 1
cmp esi, edx
jge 0x10112b05
mov eax, dword [ecx]
cmp byte [esi + eax], 0
jne 0x10112b05
inc esi
mov eax, esi
cdq
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], edx
jmp 0x10112b58
mov eax, esi
mov dword [ebx + 0x58], 0
cdq
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], edx
jmp 0x10112b58
mov ecx, dword [ecx]
add ecx, esi
inc esi
movzx eax, byte [ecx]
mov dword [esp + 0x24], eax
test al, al
jns 0x10112b37
lea edx, [esp + 0x24]
call fcn.10126ac0
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 0x10112b58
mov dword [ebx], 7
mov ebx, dword [ebp + 0x10]
mov esi, dword [esp + 0x10]
test byte [ebx + 4], 2
je 0x10112b70
mov dword [ebx + 0x20], 0x10111410
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi]
mov ecx, 0x10111710
mov edx, 0x10111490
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