Function at 0x1173660
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push edi
mov edi, dword [ebp + 0xc]
mov esi, ecx
mov dword [esi + 4], 0
mov dword [esi], 0
mov eax, edi
cmp edi, 0x8000
jb 0x1173688
mov eax, 0x8000
push ebx
mov ebx, dword [ebp + 8]
push eax
mov eax, dword [esi + 8]
push ebx
push eax
call sub.msvcrt.dll_memcpy
mov eax, 1
add esp, 0xc
xor cl, cl
cmp edi, eax
jbe 0x11736ad
xor cl, byte [eax + ebx]
inc eax
cmp eax, edi
jb 0x11736a5
mov eax, dword [esi + 4]
mov edi, dword [ebp + 0x10]
add eax, 8
mov edx, eax
shr edx, 3
add dword [esi], edx
and eax, 7
mov dword [esi + 4], eax
mov dword [edi + 0x10], 0
cmp cl, byte [ebx]
jne 0x1173a02
mov eax, dword [ebp + 0xc]
push eax
push ebx
mov ecx, esi
call fcn.0116a360
mov edx, eax
mov dword [ebp + 8], edx
test edx, edx
je 0x1173758
inc dword [edi + 4]
mov ecx, dword [edi + 4]
mov eax, dword [edi + 8]
cmp ecx, eax
jbe 0x1173721
mov edx, eax
shr edx, 2
lea ebx, [edx + eax + 0x20]
cmp ecx, ebx
jbe 0x1173703
mov ebx, ecx
mov ecx, dword [edi]
lea eax, [ebx + ebx*4]
add eax, eax
add eax, eax
add eax, eax
push eax
push ecx
call dword [sym.imp.msvcrt.dll_realloc]
mov edx, dword [ebp + 8]
add esp, 8
mov dword [edi], eax
mov dword [edi + 8], ebx
mov eax, dword [edi + 0x10]
lea ecx, [eax + 1]
mov dword [edi + 0x10], ecx
mov ecx, dword [edi]
lea eax, [eax + eax*4]
lea eax, [ecx + eax*8]
lea ecx, [eax + 0xc]
mov dword [ecx], edx
mov dword [eax + 0x14], ecx
mov ecx, 3
lea edx, [eax + 0x1c]
mov dword [eax], 0x28
mov dword [eax + 0x24], edx
mov dword [eax + 0x18], ecx
mov dword [eax + 8], ecx
mov dword [ebp + 0xc], 0
mov edx, dword [esi]
mov eax, dword [esi + 8]
movzx ebx, byte [edx + eax]
lea ecx, [edx + eax]
movzx eax, byte [ecx + 1]
movzx ecx, byte [ecx + 2]
shl ebx, 8
or eax, ebx
mov ebx, dword [esi + 4]
shl eax, 8
or eax, ecx
mov ecx, 8
sub ecx, ebx
shr eax, cl
lea ecx, [ebx + 1]
mov ebx, ecx
shr ebx, 3
add ebx, edx
and ecx, 7
mov dword [esi], ebx
mov dword [esi + 4], ecx
test eax, 0x8000
je 0x1173855
push esi
call fcn.0116a170
mov edx, dword [esi]
inc eax
xor ebx, ebx
mov dword [ebp + 0x10], eax
cmp edx, dword [ebp + 0xc]
jae 0x1173a02
jmp 0x11737c3
mov eax, dword [ebp + 0x10]
cmp ebx, eax
jae 0x1173855
inc dword [edi + 0x24]
mov ecx, dword [edi + 0x24]
mov eax, dword [edi + 0x28]
cmp ecx, eax
jbe 0x1173805
mov edx, eax
shr edx, 2
lea eax, [edx + eax + 0x20]
mov dword [ebp + 8], ecx
cmp ecx, eax
ja 0x11737eb
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [edi + 0x20]
push eax
push ecx
call dword [sym.imp.msvcrt.dll_realloc]
mov edx, dword [ebp + 8]
add esp, 8
mov dword [edi + 0x20], eax
mov dword [edi + 0x28], edx
mov eax, dword [esi]
mov ecx, dword [esi + 8]
movzx edx, byte [eax + ecx + 1]
add eax, ecx
movzx ecx, byte [eax]
movzx eax, byte [eax + 2]
shl ecx, 8
or edx, ecx
shl edx, 8
or edx, eax
mov ecx, 8
sub ecx, dword [esi + 4]
inc ebx
shr edx, cl
mov ecx, dword [edi + 0x20]
shr edx, 8
mov byte [ebx + ecx - 1], dl
mov eax, dword [esi + 4]
add eax, 8
mov edx, eax
and eax, 7
shr edx, 3
add dword [esi], edx
mov dword [esi + 4], eax
mov eax, dword [ebp + 0xc]
cmp dword [esi], eax
jb 0x11737c0
mov ecx, dword [ebp + 0xc]
cmp dword [esi], ecx
jae 0x1173a02
inc dword [edi + 4]
mov ecx, dword [edi + 4]
mov eax, dword [edi + 8]
cmp ecx, eax
jbe 0x1173897
mov edx, eax
shr edx, 2
lea ebx, [edx + eax + 0x20]
cmp ecx, ebx
jbe 0x117387c
mov ebx, ecx
mov ecx, dword [edi]
lea eax, [ebx + ebx*4]
add eax, eax
add eax, eax
add eax, eax
push eax
push ecx
call dword [sym.imp.msvcrt.dll_realloc]
add esp, 8
mov dword [edi], eax
mov dword [edi + 8], ebx
mov eax, dword [edi + 0x10]
mov ecx, dword [esi]
lea edx, [eax + eax*4]
mov eax, dword [edi]
lea ebx, [eax + edx*8]
mov edx, dword [esi + 8]
movzx eax, byte [ecx + edx + 1]
add ecx, edx
movzx edx, byte [ecx]
movzx ecx, byte [ecx + 2]
shl edx, 8
or eax, edx
shl eax, 8
or eax, ecx
mov ecx, 8
sub ecx, dword [esi + 4]
shr eax, cl
and eax, 0xffff
test eax, 0x8000
jne 0x11738e9
shr eax, 0xc
mov dword [ebx], eax
mov eax, dword [esi + 4]
add eax, 4
mov edx, eax
shr edx, 3
add dword [esi], edx
jmp 0x11738fe
shr eax, 0xa
sub eax, 0x18
mov dword [ebx], eax
mov eax, dword [esi + 4]
add eax, 6
mov ecx, eax
shr ecx, 3
add dword [esi], ecx
and eax, 7
mov dword [esi + 4], eax
mov edx, dword [ebx]
test byte [edx + 0x1189b38], 4
je 0x1173952
mov eax, dword [esi]
mov ecx, dword [esi + 8]
movzx edx, byte [eax + ecx + 1]
add eax, ecx
movzx ecx, byte [eax]
movzx eax, byte [eax + 2]
shl ecx, 8
or edx, ecx
shl edx, 8
or edx, eax
mov ecx, 8
sub ecx, dword [esi + 4]
shr edx, cl
shr edx, 0xf
and dl, 1
mov byte [ebx + 4], dl
mov eax, dword [esi + 4]
inc eax
mov ecx, eax
shr ecx, 3
add dword [esi], ecx
and eax, 7
mov dword [esi + 4], eax
jmp 0x1173956
mov byte [ebx + 4], 0
mov edx, dword [ebx]
lea eax, [ebx + 0x18]
mov dword [ebp + 0x10], eax
mov dword [eax], 3
lea ecx, [ebx + 8]
mov dword [ecx], 3
movzx eax, byte [edx + 0x1189b38]
and eax, 3
mov dword [ebp + 8], eax
mov eax, 0
mov dword [ebx + 0x24], eax
mov dword [ebx + 0x14], eax
jle 0x11739f4
movzx eax, byte [ebx + 4]
push eax
push ecx
mov ecx, esi
call fcn.0116e060
cmp dword [ebp + 8], 2
jne 0x11739ac
movzx ecx, byte [ebx + 4]
mov edx, dword [ebp + 0x10]
push ecx
push edx
mov ecx, esi
call fcn.0116e060
jmp 0x11739f4
cmp dword [ebx + 8], 1
jne 0x11739f4
mov eax, dword [ebx]
test byte [eax + 0x1189b38], 0x18
je 0x11739f4
mov eax, dword [ebx + 0xc]
cmp eax, 0x100
jl 0x11739ce
sub eax, 0x100
jmp 0x11739f1
cmp eax, 0x88
jl 0x11739dc
sub eax, 0x108
jmp 0x11739ee
cmp eax, 0x10
jl 0x11739e6
sub eax, 8
jmp 0x11739ee
cmp eax, 8
jl 0x11739ee
sub eax, 0x10
add eax, dword [edi + 0x10]
mov dword [ebx + 0xc], eax
mov ecx, dword [ebp + 0xc]
inc dword [edi + 0x10]
cmp dword [esi], ecx
jb 0x1173860
inc dword [edi + 4]
mov ecx, dword [edi + 4]
mov eax, dword [edi + 8]
pop ebx
cmp ecx, eax
jbe 0x1173a3a
mov edx, eax
shr edx, 2
lea esi, [edx + eax + 0x20]
cmp ecx, esi
jbe 0x1173a1f
mov esi, ecx
mov ecx, dword [edi]
lea eax, [esi + esi*4]
add eax, eax
add eax, eax
add eax, eax
push eax
push ecx
call dword [sym.imp.msvcrt.dll_realloc]
add esp, 8
mov dword [edi], eax
mov dword [edi + 8], esi
mov eax, dword [edi + 0x10]
mov ecx, dword [edi]
lea edx, [eax + 1]
mov dword [edi + 0x10], edx
lea eax, [eax + eax*4]
lea eax, [ecx + eax*8]
lea ecx, [eax + 0x1c]
mov dword [eax + 0x24], ecx
mov ecx, 3
mov dword [eax + 0x18], ecx
mov dword [eax + 8], ecx
lea edx, [eax + 0xc]
xor ecx, ecx
mov dword [eax], 0x16
mov dword [eax + 0x14], edx
cmp dword [edi + 0x10], ecx
jle 0x1173a96
xor edx, edx
mov eax, dword [edi]
add eax, edx
cmp dword [eax + 0x14], 0
jne 0x1173a81
lea esi, [eax + 0xc]
mov dword [eax + 0x14], esi
cmp dword [eax + 0x24], 0
jne 0x1173a8d
lea esi, [eax + 0x1c]
mov dword [eax + 0x24], esi
inc ecx
add edx, 0x28
cmp ecx, dword [edi + 0x10]
jl 0x1173a71
pop edi
pop esi
pop ebp
ret 0xc