Function at 0x411068
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x4b7dfc
call fcn.0047f6fc
sub esp, 0x134
push ebx
push esi
push edi
mov eax, dword [ebp + 0x40]
mov dword [ebp - 4], 2
add eax, 0x44
push eax
call fcn.004808f0
mov ebx, dword [ebp + 0x48]
pop ecx
test ebx, ebx
mov esi, eax
je 0x4110cb
push ebx
call fcn.004803e0
mov edi, eax
pop ecx
cmp edi, 0x20
jge 0x4110c6
push edi
push ebx
push esi
call fcn.00480a30
push 0x20
pop eax
sub eax, edi
add edi, esi
push eax
push 0x4d6440
push edi
call fcn.00480a30
add esp, 0x18
jmp 0x4110db
push 0x20
push ebx
jmp 0x4110d2
push 0x20
push 0x4d6440
push esi
call fcn.00480a30
add esp, 0xc
lea ecx, [ebp + 0x14]
call fcn.004097f3
push 0x20
lea eax, [esi + 0x20]
push dword [ebp + 0x18]
push eax
call fcn.00480a30
mov eax, dword [ebp + 0x34]
add esp, 0xc
mov ecx, eax
mov byte [esi + 0x40], al
sar ecx, 8
mov byte [esi + 0x41], cl
mov ecx, eax
sar ecx, 0x10
sar eax, 0x18
mov byte [esi + 0x42], cl
mov byte [esi + 0x43], al
mov eax, dword [ebp + 0x3c]
test eax, eax
jne 0x41111c
mov eax, 0x4bce78
push dword [ebp + 0x40]
push eax
lea eax, [esi + 0x44]
push eax
call fcn.00480a30
mov eax, dword [ebp + 0x40]
mov ebx, dword [ebp + 0x4c]
add eax, 0x44
push ebx
push eax
push esi
call fcn.0041158c
add esp, 0x18
cmp dword [ebp + 0xc], 3
jne 0x411156
push 0x32
pop edi
push ebx
push dword [ebp + 0x10]
push ebx
call fcn.0041158c
add esp, 0xc
dec edi
jne 0x411146
cmp dword [ebp + 0xc], 2
jne 0x4111db
lea eax, [ebp - 0x140]
push eax
push dword [ebp + 0x10]
push ebx
call fcn.004114c2
and byte [ebp - 0xd], 0
and byte [ebp - 0xe], 0
add esp, 0xc
xor edi, edi
cmp dword [ebp + 0x2c], edi
jb 0x411193
cmp dword [ebp + 0x28], 0
je 0x411193
lea ecx, [ebp + 0x24]
call fcn.004097f3
mov eax, dword [ebp + 0x28]
add eax, edi
jmp 0x411198
mov eax, 0x4bce78
mov al, byte [eax]
push eax
lea eax, [ebp - 0xd]
push eax
lea eax, [ebp - 0xe]
push eax
lea eax, [ebp - 0x140]
push eax
call fcn.0041152e
add esp, 0x10
mov byte [ebp + edi - 0x40], al
inc edi
cmp edi, 0x20
jl 0x411179
push 0x20
lea eax, [ebp - 0x40]
push 0x4d6440
push eax
call fcn.00480330
add esp, 0xc
mov edi, eax
neg edi
sbb edi, edi
inc edi
jmp 0x4112c0
cmp dword [ebp + 0xc], 3
jne 0x4112be
lea ecx, [ebp + 0x24]
call fcn.004097f3
push 0x20
lea eax, [ebp - 0x40]
push dword [ebp + 0x28]
push eax
call fcn.00480a30
add esp, 0xc
mov dword [ebp + 0xc], 0x13
xor edi, edi
cmp dword [ebp + 0x10], edi
jle 0x411226
mov ecx, dword [ebp + 0x4c]
lea eax, [ebp - 0x20]
sub ecx, eax
lea eax, [ebp + edi - 0x20]
mov dl, byte [ecx + eax]
xor dl, byte [ebp + 0xc]
inc edi
cmp edi, dword [ebp + 0x10]
mov byte [eax], dl
jl 0x411214
lea eax, [ebp - 0x140]
push eax
lea eax, [ebp - 0x20]
push dword [ebp + 0x10]
push eax
call fcn.004114c2
and byte [ebp - 0xd], 0
and byte [ebp - 0xe], 0
add esp, 0xc
xor ebx, ebx
mov al, byte [ebp + ebx - 0x40]
lea edi, [ebp + ebx - 0x40]
push eax
lea eax, [ebp - 0xd]
push eax
lea eax, [ebp - 0xe]
push eax
lea eax, [ebp - 0x140]
push eax
call fcn.0041152e
add esp, 0x10
inc ebx
cmp ebx, 0x20
mov byte [edi], al
jl 0x411246
dec dword [ebp + 0xc]
jns 0x411205
push 0x20
push 0x4d6440
push esi
call fcn.00480a30
mov eax, dword [ebp + 0x3c]
add esp, 0xc
test eax, eax
jne 0x41128f
mov eax, 0x4bce78
push dword [ebp + 0x40]
push eax
lea eax, [esi + 0x20]
push eax
call fcn.00480a30
mov eax, dword [ebp + 0x40]
push esi
add eax, 0x20
push eax
push esi
call fcn.0041158c
push 0x10
lea eax, [ebp - 0x40]
push esi
push eax
call fcn.00480330
add esp, 0x24
jmp 0x4111cf
xor edi, edi
push esi
call fcn.004807b1
pop ecx
mov byte [ebp - 4], 1
push 1
lea ecx, [ebp + 0x14]
call fcn.00403c6a
and byte [ebp - 4], 0
push 1
lea ecx, [ebp + 0x24]
call fcn.00403c6a
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp + 0x38]
call fcn.00403c6a
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret