Function at 0x10112de0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
mov eax, edx
mov esi, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], esi
push edi
test eax, eax
je 0x10112f79
test byte [ebp + 0xc], 8
jne 0x10112f79
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 0x10112e39
mov edi, edx
movzx edx, byte [esi + edi]
lea ecx, [eax*8]
xor edx, ecx
xor eax, edx
sub esi, 1
jns 0x10112e22
mov edi, dword [ebp + 8]
xor edx, edx
div dword [ebx + 0xc]
mov eax, dword [ebx + 0x14]
mov ebx, dword [eax + edx*4]
test ebx, ebx
je 0x10112ead
mov eax, dword [ebx + 0x14]
inc eax
cmp edi, eax
jne 0x10112ea7
mov edx, dword [esp + 0x18]
lea ecx, [ebx + 0x28]
mov esi, edi
sub esi, 4
jb 0x10112e71
nop
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x10112e7a
add ecx, 4
add edx, 4
sub esi, 4
jae 0x10112e60
cmp esi, 0xfffffffc
je 0x10112f01
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x10112ea7
cmp esi, 0xfffffffd
je 0x10112f01
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x10112ea7
cmp esi, 0xfffffffe
je 0x10112f01
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x10112ea7
cmp esi, 0xffffffff
je 0x10112f01
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
je 0x10112f01
mov ebx, dword [ebx]
test ebx, ebx
jne 0x10112e48
xor esi, esi
xor ecx, ecx
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], ecx
mov dword [eax + 0x24], 0
test esi, esi
je 0x10112ecd
lea eax, [esi + 0xc]
mov dword [esp + 0x14], ecx
mov dword [esi], eax
mov ebx, dword [ebp + 0x10]
or dword [ebx + 4], 1
lea ecx, [ebx + 4]
mov dword [esp + 0x1c], ecx
test esi, esi
jne 0x10113054
mov edi, ebx
mov ebx, dword [esp + 0x10]
test byte [edi + 4], 2
je 0x101130f3
mov dword [edi + 0x20], 0x10111ab0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebx + 0x10]
lea eax, [edi + 0x29]
sub esi, eax
mov dword [esp + 0x14], esi
call fcn.100cac40
test eax, eax
je 0x10112f2b
xor esi, esi
mov edx, dword [esp + 0x10]
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [edx + 0x24], 7
jmp 0x10112ecd
lea eax, [esi + 0x16]
cdq
push edx
push eax
call fcn.1001e110
mov esi, eax
add esp, 8
test esi, esi
je 0x10112f18
push dword [esp + 0x14]
lea eax, [edi + 0x29]
add eax, ebx
push eax
lea eax, [esi + 0xc]
push eax
call fcn.1012be10
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.1010e680
mov ecx, eax
add esp, 4
add ecx, dword [esp + 0x14]
jmp 0x10112eb1
push dword [ebp + 8]
mov ecx, dword [esi + 0xc]
lea ebx, [esi + 0x24]
call fcn.1010ef00
mov dword [ebx], eax
add esp, 4
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + 0x10]
mov dword [esp + 0x14], ecx
test ecx, ecx
je 0x10112fed
lea edi, [ecx + 0x28]
mov esi, edi
mov dword [esp + 0x18], edi
lea edx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x10112fa6
sub esi, edx
mov edx, ecx
mov ecx, dword [esp + 0x10]
push 0
mov ecx, dword [ecx + 0xc]
call fcn.1010e680
mov eax, dword [esp + 0x18]
lea ecx, [edi + 1]
add ecx, esi
add esp, 4
mov dword [esp + 0x1c], ecx
mov eax, dword [eax + 0x10]
sub eax, esi
sub eax, 0x29
mov dword [esp + 0x14], eax
test edi, edi
je 0x10113001
lea edx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x10112fe2
sub edi, edx
jmp 0x10113003
xor ecx, ecx
mov dword [esp + 0x18], 0
xor eax, eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], eax
xor edi, edi
test ecx, ecx
je 0x101130eb
cmp dword [ebx], 0
jne 0x101130eb
call fcn.100cac40
test eax, eax
jne 0x101130e5
push eax
push 0xc
call fcn.1001e110
mov esi, eax
add esp, 8
test esi, esi
je 0x101130e5
mov ebx, dword [ebp + 0x10]
xorps xmm0, xmm0
mov eax, dword [esp + 0x1c]
movq qword [esi], xmm0
mov dword [esi + 8], 0
mov dword [esi], eax
lea eax, [ebx + 4]
mov dword [esp + 0x1c], eax
mov dword [ebx + 0x48], 0
test edi, edi
je 0x10113092
cmp edi, dword [ebx + 0x4c]
jbe 0x1011307b
mov ecx, dword [esp + 0x10]
lea edx, [ebx + 0x44]
push edi
lea ecx, [ecx + 0x24]
call fcn.10107110
add esp, 4
test eax, eax
jne 0x10113092
mov eax, dword [ebx + 0x44]
add eax, dword [ebx + 0x48]
push edi
push dword [esp + 0x1c]
push eax
call fcn.1012be10
add esp, 0xc
add dword [ebx + 0x48], edi
mov edi, dword [ebp + 0x10]
mov eax, dword [esp + 0x14]
mov dword [esi + 8], eax
mov dword [esi + 4], eax
mov dword [edi + 0xc], esi
lea edx, [edi + 0x50]
mov ecx, dword [esi]
call fcn.10127470
test byte [ebp + 0xc], 2
mov ebx, dword [esp + 0x10]
mov ecx, ebx
movzx eax, al
cdq
mov dword [edi + 0x1c], edx
mov edx, edi
mov dword [edi + 0x18], eax
mov eax, dword [esi + 4]
mov dword [edi + 0x30], eax
je 0x101130db
mov eax, dword [esp + 0x1c]
or dword [eax], 2
call fcn.101116e0
jmp 0x10112ee9
call fcn.10111400
jmp 0x10112ee9
mov dword [ebx], 7
mov edi, dword [ebp + 0x10]
jmp 0x10112ee5
mov eax, dword [ebx]
mov ecx, 0x10111da0
mov edx, 0x10111b30
cmp dword [eax + 0x30], 1
cmove ecx, edx
mov dword [edi + 0x20], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret