Function at 0x401720
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x74
mov eax, dword [0x4b000c]
xor eax, esp
mov dword [esp + 0x70], eax
push ebx
push ebp
push esi
push edi
mov edi, ecx
test edi, edi
je 0x401ca6
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401740
sub ecx, edx
cmp byte [ecx + edi - 1], 0x2f
lea eax, [ecx - 1]
mov dword [0x793fb8], eax
je 0x401ca6
cmp dword [0xc6e474], 0
mov edx, dword [0xc79cbc]
mov dword [esp + 0x14], 0
jbe 0x401afa
xor ecx, ecx
mov dword [esp + 0x18], ecx
nop dword [eax]
mov eax, dword [0xc0db4c]
inc edx
add eax, ecx
mov dword [0xc79cbc], edx
mov dword [0xc79cb4], eax
mov ecx, edi
imul eax, edx, 0x3ff
mov dword [edx*4 + 0xc6e440], 1
mov dword [edx*4 + 0xc6e400], 0
mov dword [edx*4 + 0xc65bc0], 0
sub eax, edi
lea edx, [eax + 0xc76cc0]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [ecx + edx - 1], al
test al, al
jne 0x4017c4
mov ecx, edi
call fcn.004022f0
mov ecx, dword [0xc79cbc]
push 0x2f
push edi
mov dword [ecx*4 + 0xc79cc0], eax
mov eax, dword [0xc79cb4]
cmp dword [eax + 0x20], 0
jne 0x40196f
call fcn.0046d510
add esp, 8
test eax, eax
jne 0x401814
push 0x5c
push edi
call fcn.0046d510
add esp, 8
mov esi, edi
test eax, eax
je 0x401817
lea esi, [eax + 1]
mov eax, dword [0xc79cbc]
cmp eax, 0xc
jae 0x401b85
mov eax, dword [0xc79cb4]
push dword [eax + 0x2c]
call fcn.00471658
mov ebp, dword [0xc79cbc]
add esp, 4
mov dword [ebp*4 + 0xc76c80], eax
mov dword [ebp*4 + 0xc65b80], 0
cmp ebp, 1
jbe 0x401870
lea eax, [ebp - 2]
push 0x8000
shl eax, 0xf
add eax, 0xc0db60
push 0xc6e480
push eax
call fcn.0046e410
add esp, 0xc
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401875
sub ecx, edx
lea edx, [esp + 0x1c]
sub edx, esi
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [edx + esi - 1], al
test al, al
jne 0x401884
mov eax, 0x5f
sub eax, ecx
push eax
lea eax, [esp + 0x20]
add eax, ecx
push 0
push eax
call fcn.0046e200
add esp, 0xc
lea esi, [esp + 0x1e]
xor eax, eax
lea ebx, [eax + 0x13]
movsx edx, byte [esi - 2]
lea esi, [esi + 5]
mov ecx, eax
shl eax, 8
shr ecx, 0x18
xor edx, ecx
movzx ecx, dl
movsx edx, byte [esi - 6]
xor eax, dword [ecx*4 + 0x793bb8]
mov ecx, eax
shl eax, 8
shr ecx, 0x18
xor edx, ecx
movzx ecx, dl
xor eax, dword [ecx*4 + 0x793bb8]
movsx ecx, byte [esi - 5]
mov edx, eax
shr edx, 0x18
xor edx, ecx
shl eax, 8
movzx ecx, dl
movsx edx, byte [esi - 4]
xor eax, dword [ecx*4 + 0x793bb8]
mov ecx, eax
shl eax, 8
shr ecx, 0x18
xor edx, ecx
movzx ecx, dl
movsx edx, byte [esi - 3]
xor eax, dword [ecx*4 + 0x793bb8]
mov ecx, eax
shl eax, 8
shr ecx, 0x18
xor edx, ecx
movzx ecx, dl
xor eax, dword [ecx*4 + 0x793bb8]
sub ebx, 1
jne 0x4018b3
mov ebx, dword [0xc79cb4]
xor edx, edx
mov dword [0x793fb8], edx
mov ecx, dword [ebx + 0x10]
test ecx, ecx
je 0x401967
mov ebx, dword [ebx]
xor esi, esi
nop dword [eax]
cmp dword [ebx + esi], eax
je 0x401b44
inc edx
add esi, 0xc
mov dword [0x793fb8], edx
cmp edx, ecx
jb 0x401950
lea edx, [ebp - 1]
jmp 0x401ada
call fcn.0046d510
add esp, 8
test eax, eax
jne 0x40198c
push 0x5c
push edi
call fcn.0046d510
add esp, 8
mov esi, edi
test eax, eax
je 0x40198f
lea esi, [eax + 1]
mov ebx, dword [0xc79cbc]
cmp ebx, 0xc
jae 0x401bec
mov ebp, dword [0xc79cb4]
mov dword [ebx*4 + 0xc65b80], 0
mov eax, dword [ebp + 0x14]
mov dword [ebx*4 + 0xc76c80], eax
cmp ebx, 1
jbe 0x4019dc
lea eax, [ebx - 2]
push 0x8000
shl eax, 0xf
add eax, 0xc0db60
push 0xc6e480
push eax
call fcn.0046e410
add esp, 0xc
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4019e1
sub ecx, edx
lea edx, [esp + 0x1c]
sub edx, esi
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [edx + esi - 1], al
test al, al
jne 0x4019f0
mov eax, 0x5f
sub eax, ecx
push eax
lea eax, [esp + 0x20]
add eax, ecx
push 0
push eax
call fcn.0046e200
add esp, 0xc
lea esi, [esp + 0x1e]
xor edx, edx
lea ebx, [edx + 0x13]
nop
movsx ecx, byte [esi - 2]
lea esi, [esi + 5]
mov eax, edx
shl edx, 8
shr eax, 0x18
xor ecx, eax
movzx eax, cl
movsx ecx, byte [esi - 6]
xor edx, dword [eax*4 + 0x793bb8]
mov eax, edx
shl edx, 8
shr eax, 0x18
xor ecx, eax
movzx eax, cl
xor edx, dword [eax*4 + 0x793bb8]
movsx eax, byte [esi - 5]
mov ecx, edx
shr ecx, 0x18
xor ecx, eax
shl edx, 8
movzx eax, cl
movsx ecx, byte [esi - 4]
xor edx, dword [eax*4 + 0x793bb8]
mov eax, edx
shl edx, 8
shr eax, 0x18
xor ecx, eax
movzx eax, cl
movsx ecx, byte [esi - 3]
xor edx, dword [eax*4 + 0x793bb8]
mov eax, edx
shl edx, 8
shr eax, 0x18
xor ecx, eax
movzx eax, cl
xor edx, dword [eax*4 + 0x793bb8]
sub ebx, 1
jne 0x401a20
mov ecx, dword [ebp + 0x10]
xor esi, esi
mov ebx, dword [0xc79cbc]
mov dword [0x793fb8], esi
test ecx, ecx
je 0x401ad7
mov ebp, dword [ebp]
xor eax, eax
nop word [eax + eax]
cmp dword [eax + ebp], edx
je 0x401bc0
inc esi
add eax, 0xc
mov dword [0x793fb8], esi
cmp esi, ecx
jb 0x401ac0
lea edx, [ebx - 1]
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
inc ebx
add ecx, 0x30
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ecx
cmp ebx, dword [0xc6e474]
jb 0x401780
mov eax, dword [0xc0db4c]
inc edx
mov ecx, edi
mov dword [0xc79cb4], eax
mov dword [0xc79cbc], edx
call fcn.004022f0
mov ecx, dword [0xc79cbc]
mov dword [ecx*4 + 0xc79cc0], eax
cmp ecx, 0xc
jb 0x401c08
dec ecx
xor eax, eax
mov dword [0xc79cbc], ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.0046ad4d
add esp, 0x74
ret
mov edi, dword [0xc79cb4]
push 0
mov ecx, dword [edi]
lea eax, [ecx + esi]
mov dword [edi + 0x24], eax
lea eax, [edx + edx*2]
mov eax, dword [ecx + eax*4 + 8]
add eax, dword [edi + 0x14]
push eax
push dword [edi + 0x2c]
call fcn.004720ce
mov eax, dword [0xc79cb4]
add esp, 0xc
mov eax, dword [eax + 0x2c]
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.0046ad4d
add esp, 0x74
ret
dec eax
push str._n_FileSystem::fsOpenFile__Warning:_too_much_files_opened___n
mov dword [0xc79cbc], eax
call fcn.004014d0
add esp, 4
push 1
call fcn.00471829
add esp, 4
push eax
call fcn.00471c03
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.0046ad4d
add esp, 0x74
ret
mov edx, dword [0xc79cb4]
mov ecx, dword [edx]
add eax, ecx
mov dword [edx + 0x24], eax
lea eax, [esi + esi*2]
mov eax, dword [ecx + eax*4 + 8]
add eax, 0x4b4f88
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.0046ad4d
add esp, 0x74
ret
dec ebx
xor eax, eax
mov dword [0xc79cbc], ebx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.0046ad4d
add esp, 0x74
ret
push 0x49cb00
push edi
call fcn.0047174a
mov esi, eax
add esp, 8
test esi, esi
je 0x401ca0
mov ecx, dword [0xc79cbc]
imul eax, ecx, 0x3ff
mov dword [ecx*4 + 0xc6e400], 0
mov dword [ecx*4 + 0xc65bc0], 0xffffffff
sub eax, edi
lea edx, [eax + 0xc76cc0]
nop word [eax + eax]
mov al, byte [edi]
lea edi, [edi + 1]
mov byte [edx + edi - 1], al
test al, al
jne 0x401c50
mov dword [ecx*4 + 0xc65b80], 0
cmp ecx, 1
jbe 0x401c8b
lea eax, [ecx - 2]
push 0x8000
shl eax, 0xf
add eax, 0xc0db60
push 0xc6e480
push eax
call fcn.0046e410
add esp, 0xc
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.0046ad4d
add esp, 0x74
ret
dec dword [0xc79cbc]
mov ecx, dword [esp + 0x80]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0046ad4d
add esp, 0x74
ret