Function at 0x4063d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0x10]
movzx ecx, word [eax*2 + 0x416ca8]
mov edx, dword [ebp + 0x14]
movzx eax, word [edx*2 + 0x416ca8]
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x24], eax
mov eax, dword [0x5f52a0]
cmp eax, edi
mov dword [ebp - 8], edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x18], eax
jle 0x406b75
mov ebx, dword [0x5ed294]
lea ebx, [ebx]
mov edx, dword [0x5ed28c]
mov esi, dword [0x5ed27c]
cmp edi, 1
jae 0x4064b3
cmp ebx, dword [0x5ed290]
jae 0x406446
mov al, byte [ebx + 0x5ed298]
inc ebx
jmp 0x40648f
cmp edx, 8
jae 0x406458
mov eax, edx
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x40645f
xor al, al
jmp 0x40648f
mov dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x1c]
sub dword [0x5ed28c], eax
push eax
push esi
push 0x5ed298
mov ebx, 1
mov dword [0x5ed290], eax
call fcn.0040cb60
mov al, byte [0x5ed298]
mov edx, dword [0x5ed28c]
add esp, 0xc
add esi, dword [ebp - 0x1c]
movzx eax, al
mov ecx, edi
shl eax, cl
add edi, 8
or dword [ebp - 4], eax
cmp edi, 1
jb 0x406435
mov edx, dword [0x5ed28c]
mov dword [0x5ed27c], esi
mov dword [0x5ed294], ebx
dec edi
test byte [ebp - 4], 1
je 0x4065e4
shr dword [ebp - 4], 1
dec dword [ebp - 0x18]
cmp edi, 8
jae 0x406548
lea esp, [esp]
cmp ebx, dword [0x5ed290]
jae 0x4064e1
mov al, byte [ebx + 0x5ed298]
inc ebx
jmp 0x40652a
cmp edx, 8
jae 0x4064f3
mov eax, edx
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x4064fa
xor al, al
jmp 0x40652a
mov dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x1c]
sub dword [0x5ed28c], eax
push eax
push esi
push 0x5ed298
mov ebx, 1
mov dword [0x5ed290], eax
call fcn.0040cb60
mov al, byte [0x5ed298]
mov edx, dword [0x5ed28c]
add esp, 0xc
add esi, dword [ebp - 0x1c]
movzx eax, al
mov ecx, edi
shl eax, cl
add edi, 8
or dword [ebp - 4], eax
cmp edi, 8
jb 0x4064d0
mov dword [0x5ed27c], esi
mov dword [0x5ed294], ebx
mov eax, dword [ebp - 8]
mov cl, byte [ebp - 4]
mov byte [eax + 0x5ed2a0], cl
inc eax
mov dword [ebp - 8], eax
cmp eax, 0x8000
jne 0x4065d8
mov ebx, dword [0x5f52d4]
mov edx, dword [0x5f52ac]
mov dword [ebp - 0x10], edx
test ebx, ebx
je 0x40659c
mov esi, ebx
cmp ebx, eax
jb 0x40657a
mov esi, eax
mov eax, dword [0x5f52d8]
push esi
push 0x5ed2a0
push eax
call fcn.0040cb60
sub ebx, esi
add esp, 0xc
add dword [0x5f52d8], esi
mov dword [0x5f52d4], ebx
mov ecx, dword [ebp - 8]
jcxz 0x4065c1
mov esi, 0x5ed2a0
mov ebx, dword [ebp - 0x10]
lodsb al, byte [esi]
xor al, bl
and eax, 0xff
shr ebx, 8
xor ebx, dword [eax*4 + 0x5f52e0]
loop 0x4065aa
mov dword [ebp - 0x10], ebx
mov ecx, dword [ebp - 0x10]
mov ebx, dword [0x5ed294]
xor eax, eax
mov dword [0x5f52ac], ecx
mov dword [ebp - 0x20], eax
mov dword [ebp - 8], eax
shr dword [ebp - 4], 8
sub edi, 8
jmp 0x406b6b
shr dword [ebp - 4], 1
cmp edi, 7
jae 0x406668
lea esp, [esp]
cmp ebx, dword [0x5ed290]
jae 0x406601
mov al, byte [ebx + 0x5ed298]
inc ebx
jmp 0x40664a
cmp edx, 8
jae 0x406613
mov eax, edx
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x40661a
xor al, al
jmp 0x40664a
mov dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x1c]
sub dword [0x5ed28c], eax
push eax
push esi
push 0x5ed298
mov ebx, 1
mov dword [0x5ed290], eax
call fcn.0040cb60
mov al, byte [0x5ed298]
mov edx, dword [0x5ed28c]
add esp, 0xc
add esi, dword [ebp - 0x1c]
movzx eax, al
mov ecx, edi
shl eax, cl
add edi, 8
or dword [ebp - 4], eax
cmp edi, 7
jb 0x4065f0
mov dword [0x5ed27c], esi
mov dword [0x5ed294], ebx
mov ecx, dword [ebp - 4]
mov eax, ecx
and eax, 0x7f
shr ecx, 7
sub edi, 7
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], ecx
cmp edi, dword [ebp + 0x14]
jae 0x4066f9
cmp ebx, dword [0x5ed290]
jae 0x406692
mov al, byte [ebx + 0x5ed298]
inc ebx
jmp 0x4066db
cmp edx, 8
jae 0x4066a4
mov eax, edx
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x4066ab
xor al, al
jmp 0x4066db
mov dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x1c]
sub dword [0x5ed28c], eax
push eax
push esi
push 0x5ed298
mov ebx, 1
mov dword [0x5ed290], eax
call fcn.0040cb60
mov al, byte [0x5ed298]
mov edx, dword [0x5ed28c]
add esp, 0xc
add esi, dword [ebp - 0x1c]
movzx eax, al
mov ecx, edi
shl eax, cl
add edi, 8
or dword [ebp - 4], eax
cmp edi, dword [ebp + 0x14]
jb 0x406681
mov dword [0x5ed27c], esi
mov dword [0x5ed294], ebx
mov eax, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
not eax
and eax, dword [ebp - 0x24]
lea ecx, [eax + eax*2]
lea eax, [edx + ecx*4]
movzx edx, byte [eax + 4]
mov dword [ebp - 0x14], eax
cmp edx, 0x10
jbe 0x4067f0
jmp 0x406723
mov edx, dword [ebp - 0x10]
cmp edx, 0x63
je 0x406b9b
movzx esi, byte [eax + 5]
mov ecx, esi
shr dword [ebp - 4], cl
sub edx, 0x10
sub edi, esi
mov dword [ebp - 0x10], edx
cmp edi, edx
jae 0x4067b6
cmp ebx, dword [0x5ed290]
jae 0x406752
mov al, byte [ebx + 0x5ed298]
inc ebx
jmp 0x40679e
cmp dword [0x5ed28c], 8
jae 0x406769
mov esi, dword [0x5ed28c]
test esi, esi
jne 0x40676e
xor al, al
jmp 0x40679e
mov esi, 8
mov eax, dword [0x5ed27c]
sub dword [0x5ed28c], esi
push esi
push eax
push 0x5ed298
mov ebx, 1
mov dword [0x5ed290], esi
call fcn.0040cb60
mov al, byte [0x5ed298]
add esp, 0xc
add dword [0x5ed27c], esi
movzx edx, al
mov ecx, edi
shl edx, cl
add edi, 8
or dword [ebp - 4], edx
cmp edi, dword [ebp - 0x10]
jb 0x406741
mov dword [0x5ed294], ebx
mov eax, dword [ebp - 0x10]
movzx eax, word [eax*2 + 0x416ca8]
mov ecx, dword [ebp - 4]
not ecx
and eax, ecx
lea edx, [eax + eax*2]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 8]
lea eax, [ecx + edx*4]
mov dword [ebp - 0x14], eax
movzx eax, byte [eax + 4]
mov dword [ebp - 0x10], eax
cmp eax, 0x10
mov eax, dword [ebp - 0x14]
ja 0x406720
mov esi, dword [0x5ed27c]
movzx ecx, byte [eax + 5]
movzx edx, word [eax + 8]
shr dword [ebp - 4], cl
movzx ecx, byte [eax + 5]
mov eax, dword [ebp - 8]
sub eax, edx
sub eax, dword [ebp - 0xc]
sub edi, ecx
mov dword [ebp - 0xc], eax
cmp edi, dword [ebp + 0x10]
jae 0x40688f
mov edx, dword [0x5ed28c]
cmp ebx, dword [0x5ed290]
jae 0x406828
mov al, byte [ebx + 0x5ed298]
inc ebx
jmp 0x406871
cmp edx, 8
jae 0x40683a
mov eax, edx
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x406841
xor al, al
jmp 0x406871
mov dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x1c]
sub dword [0x5ed28c], eax
push eax
push esi
push 0x5ed298
mov ebx, 1
mov dword [0x5ed290], eax
call fcn.0040cb60
mov al, byte [0x5ed298]
mov edx, dword [0x5ed28c]
add esp, 0xc
add esi, dword [ebp - 0x1c]
movzx eax, al
mov ecx, edi
shl eax, cl
add edi, 8
or dword [ebp - 4], eax
cmp edi, dword [ebp + 0x10]
jb 0x406817
mov dword [0x5ed27c], esi
mov dword [0x5ed294], ebx
mov eax, dword [ebp - 4]
mov edx, dword [ebp + 8]
not eax
and eax, dword [ebp - 0x28]
lea ecx, [eax + eax*2]
movzx eax, byte [edx + ecx*4 + 4]
lea ecx, [edx + ecx*4]
mov dword [ebp - 0x14], ecx
cmp eax, 0x10
jbe 0x40697f
cmp eax, 0x63
je 0x406b9b
movzx esi, byte [ecx + 5]
mov ecx, esi
shr dword [ebp - 4], cl
sub eax, 0x10
sub edi, esi
mov dword [ebp - 0x10], eax
cmp edi, eax
jae 0x406945
nop
cmp ebx, dword [0x5ed290]
jae 0x4068e1
mov al, byte [ebx + 0x5ed298]
inc ebx
jmp 0x40692d
cmp dword [0x5ed28c], 8
jae 0x4068f8
mov esi, dword [0x5ed28c]
test esi, esi
jne 0x4068fd
xor al, al
jmp 0x40692d
mov esi, 8
mov eax, dword [0x5ed27c]
sub dword [0x5ed28c], esi
push esi
push eax
push 0x5ed298
mov ebx, 1
mov dword [0x5ed290], esi
call fcn.0040cb60
mov al, byte [0x5ed298]
add esp, 0xc
add dword [0x5ed27c], esi
movzx edx, al
mov ecx, edi
shl edx, cl
add edi, 8
or dword [ebp - 4], edx
cmp edi, dword [ebp - 0x10]
jb 0x4068d0
mov dword [0x5ed294], ebx
mov eax, dword [ebp - 0x10]
movzx eax, word [eax*2 + 0x416ca8]
mov ecx, dword [ebp - 4]
not ecx
and eax, ecx
lea edx, [eax + eax*2]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 8]
lea eax, [ecx + edx*4]
mov dword [ebp - 0x14], eax
movzx eax, byte [eax + 4]
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x10], eax
cmp eax, 0x10
ja 0x4068b1
mov esi, dword [0x5ed27c]
movzx ecx, byte [ecx + 5]
mov edx, dword [ebp - 0x14]
shr dword [ebp - 4], cl
movzx ecx, byte [edx + 5]
movzx edx, word [edx + 8]
sub edi, ecx
mov dword [ebp - 0x14], edx
test eax, eax
je 0x406a3a
cmp edi, 8
jae 0x406a28
mov edx, dword [0x5ed28c]
lea ecx, [ecx]
cmp ebx, dword [0x5ed290]
jae 0x4069c1
mov al, byte [ebx + 0x5ed298]
inc ebx
jmp 0x406a0a
cmp edx, 8
jae 0x4069d3
mov eax, edx
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x4069da
xor al, al
jmp 0x406a0a
mov dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x1c]
sub dword [0x5ed28c], eax
push eax
push esi
push 0x5ed298
mov ebx, 1
mov dword [0x5ed290], eax
call fcn.0040cb60
mov al, byte [0x5ed298]
mov edx, dword [0x5ed28c]
add esp, 0xc
add esi, dword [ebp - 0x1c]
movzx eax, al
mov ecx, edi
shl eax, cl
add edi, 8
or dword [ebp - 4], eax
cmp edi, 8
jb 0x4069b0
mov dword [0x5ed27c], esi
mov dword [0x5ed294], ebx
mov eax, dword [ebp - 4]
movzx ecx, al
add dword [ebp - 0x14], ecx
shr eax, 8
mov dword [ebp - 4], eax
sub edi, 8
mov edx, dword [ebp - 0x14]
sub dword [ebp - 0x18], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
and eax, 0x7fff
mov dword [ebp - 0xc], eax
cmp eax, ecx
ja 0x406a54
mov eax, ecx
mov esi, 0x8000
sub esi, eax
mov eax, dword [ebp - 0x14]
cmp esi, eax
jbe 0x406a64
mov esi, eax
mov ebx, dword [ebp - 8]
sub eax, esi
cmp dword [ebp - 0x20], 0
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0xc]
je 0x406a92
cmp ebx, eax
ja 0x406a92
push esi
lea eax, [ebx + 0x5ed2a0]
push 0
push eax
call fcn.00410d00
add esp, 0xc
add ebx, esi
add dword [ebp - 0xc], esi
jmp 0x406ad6
mov ecx, ebx
sub ecx, eax
cmp ecx, esi
jb 0x406ac0
mov edx, dword [ebp - 0xc]
push esi
lea eax, [edx + 0x5ed2a0]
push eax
lea ecx, [ebx + 0x5ed2a0]
push ecx
call fcn.0040cb60
add esp, 0xc
add ebx, esi
add dword [ebp - 0xc], esi
jmp 0x406ad6
mov dl, byte [eax + 0x5ed2a0]
mov byte [ebx + 0x5ed2a0], dl
inc ebx
inc eax
sub esi, 1
jne 0x406ac0
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], ebx
cmp ebx, 0x8000
jne 0x406b5b
mov ebx, dword [0x5f52d4]
mov eax, dword [0x5f52ac]
mov dword [ebp - 0x1c], eax
test ebx, ebx
je 0x406b25
mov esi, ebx
cmp ebx, 0x8000
jb 0x406b02
mov esi, 0x8000
mov ecx, dword [0x5f52d8]
push esi
push 0x5ed2a0
push ecx
call fcn.0040cb60
sub ebx, esi
add esp, 0xc
add dword [0x5f52d8], esi
mov dword [0x5f52d4], ebx
mov ecx, dword [ebp - 8]
jcxz 0x406b4a
mov esi, 0x5ed2a0
mov ebx, dword [ebp - 0x1c]
lodsb al, byte [esi]
xor al, bl
and eax, 0xff
shr ebx, 8
xor ebx, dword [eax*4 + 0x5f52e0]
loop 0x406b33
mov dword [ebp - 0x1c], ebx
mov edx, dword [ebp - 0x1c]
xor eax, eax
mov dword [0x5f52ac], edx
mov dword [ebp - 0x20], eax
mov dword [ebp - 8], eax
cmp dword [ebp - 0x14], 0
jne 0x406a40
mov ebx, dword [0x5ed294]
cmp dword [ebp - 0x18], 0
jg 0x406420
mov eax, dword [ebp - 8]
mov ecx, dword [0x5f52ac]
push eax
push 0x5ed2a0
push ecx
call fcn.00403ef0
add esp, 0xc
pop edi
pop esi
mov dword [0x5f52ac], eax
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret