Function at 0x401cd0
Capabilities:
Encode data using xor

Disassembly:
push ecx
mov eax, dword [0x415358]
push ebp
cmp eax, 3
mov dword [esp + 4], 0
mov ebp, 2
jg 0x401cf1
call fcn.00401fe0
pop ebp
pop ecx
ret
mov eax, dword [0x4179e4]
test eax, eax
je 0x401f9b
mov edx, dword [0x4179d8]
mov ecx, dword [0x4336fc]
push ebx
push esi
push edi
xor eax, eax
and edx, 0x3ff
mov al, byte [ecx + 0x443742]
mov esi, ecx
and eax, 0x7fff
mov edi, dword [0x453744]
shl edx, 5
xor edx, eax
xor eax, eax
and esi, 0x7fff
mov dword [0x4179d8], edx
mov ax, word [edx*2 + 0x453760]
mov word [edx*2 + 0x453760], cx
mov word [esi*2 + 0x433720], ax
mov esi, ebp
test eax, eax
mov dword [0x4336f8], esi
mov ebp, 2
je 0x401dc0
cmp esi, dword [0x4179d4]
jae 0x401dc0
mov ebx, ecx
sub ebx, eax
cmp ebx, 0x7efa
ja 0x401dc0
push eax
call fcn.00401a30
mov ebp, eax
mov eax, dword [0x4179e4]
add esp, 4
cmp ebp, eax
jbe 0x401d8e
mov ebp, eax
cmp ebp, 3
jne 0x401e80
mov ecx, dword [0x4336fc]
mov esi, dword [0x453744]
mov edx, ecx
sub edx, esi
cmp edx, 0x1000
jbe 0x401db4
mov ebp, 2
mov edx, dword [0x4179d8]
mov esi, dword [0x4336f8]
cmp esi, 3
jb 0x401eb8
cmp ebp, esi
ja 0x401eb8
sub ecx, edi
add esi, 0xfffffffd
dec ecx
push esi
push ecx
call fcn.00404d40
mov esi, dword [0x4336f8]
mov ecx, dword [0x4179e4]
mov edi, eax
mov edx, dword [0x4179d8]
mov eax, 1
add esp, 8
sub eax, esi
add ecx, eax
sub esi, 2
mov dword [0x4179e4], ecx
mov ecx, dword [0x4336fc]
inc ecx
xor eax, eax
and edx, 0x3ff
mov al, byte [ecx + 0x443742]
and eax, 0x7fff
shl edx, 5
xor edx, eax
mov eax, ecx
and eax, 0x7fff
dec esi
mov bx, word [edx*2 + 0x453760]
mov word [edx*2 + 0x453760], cx
mov word [eax*2 + 0x433720], bx
jne 0x401e0d
mov dword [0x4336f8], esi
xor esi, esi
inc ecx
mov dword [0x4179d8], edx
test edi, edi
mov dword [esp + 0x10], esi
mov ebp, 2
mov dword [0x4336fc], ecx
je 0x401f48
mov edx, dword [0x453748]
test edx, edx
jl 0x401e91
lea eax, [edx + 0x443740]
jmp 0x401e93
mov edx, dword [0x4179d8]
mov ecx, dword [0x4336fc]
jmp 0x401dba
xor eax, eax
sub ecx, edx
push 0
push ecx
push eax
call fcn.004043c0
mov ecx, dword [0x4336fc]
mov edx, dword [0x4179d8]
add esp, 0xc
mov dword [0x453748], ecx
jmp 0x401f48
mov esi, dword [esp + 0x10]
test esi, esi
je 0x401f2d
xor edx, edx
mov dl, byte [ecx + 0x44373f]
push edx
push 0
call fcn.00404d40
add esp, 8
test eax, eax
je 0x401f0d
mov ecx, dword [0x453748]
test ecx, ecx
jl 0x401ee9
lea eax, [ecx + 0x443740]
jmp 0x401eeb
xor eax, eax
mov edx, dword [0x4336fc]
push 0
sub edx, ecx
push edx
push eax
call fcn.004043c0
mov ecx, dword [0x4336fc]
add esp, 0xc
mov dword [0x453748], ecx
jmp 0x401f13
mov ecx, dword [0x4336fc]
mov eax, dword [0x4179e4]
mov edx, dword [0x4179d8]
inc ecx
dec eax
mov dword [0x4336fc], ecx
mov dword [0x4179e4], eax
jmp 0x401f48
mov eax, dword [0x4179e4]
inc ecx
mov esi, 1
dec eax
mov dword [esp + 0x10], esi
mov dword [0x4336fc], ecx
mov dword [0x4179e4], eax
mov eax, dword [0x4179e4]
cmp eax, 0x106
jae 0x401f7b
mov edi, dword [0x4179dc]
test edi, edi
jne 0x401f7b
call fcn.00401b80
mov eax, dword [0x4179e4]
mov edx, dword [0x4179d8]
mov ecx, dword [0x4336fc]
cmp eax, 0x106
jb 0x401f54
test eax, eax
jne 0x401d0d
pop edi
test esi, esi
pop esi
pop ebx
je 0x401fa1
mov al, byte [ecx + 0x44373f]
push eax
push 0
call fcn.00404d40
add esp, 8
mov ecx, dword [0x4336fc]
mov edx, dword [0x453748]
test edx, edx
jl 0x401fc2
sub ecx, edx
lea eax, [edx + 0x443740]
push 1
push ecx
push eax
call fcn.004043c0
add esp, 0xc
pop ebp
pop ecx
ret
sub ecx, edx
xor eax, eax
push 1
push ecx
push eax
call fcn.004043c0
add esp, 0xc
pop ebp
pop ecx
ret