Function at 0x406bb0
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 [0x5f62e0]
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 0x407355
mov ebx, dword [0x5ee2d4]
lea ebx, [ebx]
mov edx, dword [0x5ee2cc]
mov esi, dword [0x5ee2bc]
cmp edi, 1
jae 0x406c93
cmp ebx, dword [0x5ee2d0]
jae 0x406c26
mov al, byte [ebx + 0x5ee2d8]
inc ebx
jmp 0x406c6f
cmp edx, 8
jae 0x406c38
mov eax, edx
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x406c3f
xor al, al
jmp 0x406c6f
mov dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x1c]
sub dword [0x5ee2cc], eax
push eax
push esi
push 0x5ee2d8
mov ebx, 1
mov dword [0x5ee2d0], eax
call fcn.0040cb60
mov al, byte [0x5ee2d8]
mov edx, dword [0x5ee2cc]
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 0x406c15
mov edx, dword [0x5ee2cc]
mov dword [0x5ee2bc], esi
mov dword [0x5ee2d4], ebx
dec edi
test byte [ebp - 4], 1
je 0x406dc4
shr dword [ebp - 4], 1
dec dword [ebp - 0x18]
cmp edi, 8
jae 0x406d28
lea esp, [esp]
cmp ebx, dword [0x5ee2d0]
jae 0x406cc1
mov al, byte [ebx + 0x5ee2d8]
inc ebx
jmp 0x406d0a
cmp edx, 8
jae 0x406cd3
mov eax, edx
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x406cda
xor al, al
jmp 0x406d0a
mov dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x1c]
sub dword [0x5ee2cc], eax
push eax
push esi
push 0x5ee2d8
mov ebx, 1
mov dword [0x5ee2d0], eax
call fcn.0040cb60
mov al, byte [0x5ee2d8]
mov edx, dword [0x5ee2cc]
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 0x406cb0
mov dword [0x5ee2bc], esi
mov dword [0x5ee2d4], ebx
mov eax, dword [ebp - 8]
mov cl, byte [ebp - 4]
mov byte [eax + 0x5ee2e0], cl
inc eax
mov dword [ebp - 8], eax
cmp eax, 0x8000
jne 0x406db8
mov ebx, dword [0x5f6314]
mov edx, dword [0x5f62ec]
mov dword [ebp - 0x10], edx
test ebx, ebx
je 0x406d7c
mov esi, ebx
cmp ebx, eax
jb 0x406d5a
mov esi, eax
mov eax, dword [0x5f6318]
push esi
push 0x5ee2e0
push eax
call fcn.0040cb60
sub ebx, esi
add esp, 0xc
add dword [0x5f6318], esi
mov dword [0x5f6314], ebx
mov ecx, dword [ebp - 8]
jcxz 0x406da1
mov esi, 0x5ee2e0
mov ebx, dword [ebp - 0x10]
lodsb al, byte [esi]
xor al, bl
and eax, 0xff
shr ebx, 8
xor ebx, dword [eax*4 + 0x5f6320]
loop 0x406d8a
mov dword [ebp - 0x10], ebx
mov ecx, dword [ebp - 0x10]
mov ebx, dword [0x5ee2d4]
xor eax, eax
mov dword [0x5f62ec], ecx
mov dword [ebp - 0x20], eax
mov dword [ebp - 8], eax
shr dword [ebp - 4], 8
sub edi, 8
jmp 0x40734b
shr dword [ebp - 4], 1
cmp edi, 6
jae 0x406e48
lea esp, [esp]
cmp ebx, dword [0x5ee2d0]
jae 0x406de1
mov al, byte [ebx + 0x5ee2d8]
inc ebx
jmp 0x406e2a
cmp edx, 8
jae 0x406df3
mov eax, edx
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x406dfa
xor al, al
jmp 0x406e2a
mov dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x1c]
sub dword [0x5ee2cc], eax
push eax
push esi
push 0x5ee2d8
mov ebx, 1
mov dword [0x5ee2d0], eax
call fcn.0040cb60
mov al, byte [0x5ee2d8]
mov edx, dword [0x5ee2cc]
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, 6
jb 0x406dd0
mov dword [0x5ee2bc], esi
mov dword [0x5ee2d4], ebx
mov ecx, dword [ebp - 4]
mov eax, ecx
and eax, 0x3f
shr ecx, 6
sub edi, 6
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], ecx
cmp edi, dword [ebp + 0x14]
jae 0x406ed9
cmp ebx, dword [0x5ee2d0]
jae 0x406e72
mov al, byte [ebx + 0x5ee2d8]
inc ebx
jmp 0x406ebb
cmp edx, 8
jae 0x406e84
mov eax, edx
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x406e8b
xor al, al
jmp 0x406ebb
mov dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x1c]
sub dword [0x5ee2cc], eax
push eax
push esi
push 0x5ee2d8
mov ebx, 1
mov dword [0x5ee2d0], eax
call fcn.0040cb60
mov al, byte [0x5ee2d8]
mov edx, dword [0x5ee2cc]
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 0x406e61
mov dword [0x5ee2bc], esi
mov dword [0x5ee2d4], 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 0x406fd0
jmp 0x406f03
mov edx, dword [ebp - 0x10]
cmp edx, 0x63
je 0x40737b
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 0x406f96
cmp ebx, dword [0x5ee2d0]
jae 0x406f32
mov al, byte [ebx + 0x5ee2d8]
inc ebx
jmp 0x406f7e
cmp dword [0x5ee2cc], 8
jae 0x406f49
mov esi, dword [0x5ee2cc]
test esi, esi
jne 0x406f4e
xor al, al
jmp 0x406f7e
mov esi, 8
mov eax, dword [0x5ee2bc]
sub dword [0x5ee2cc], esi
push esi
push eax
push 0x5ee2d8
mov ebx, 1
mov dword [0x5ee2d0], esi
call fcn.0040cb60
mov al, byte [0x5ee2d8]
add esp, 0xc
add dword [0x5ee2bc], esi
movzx edx, al
mov ecx, edi
shl edx, cl
add edi, 8
or dword [ebp - 4], edx
cmp edi, dword [ebp - 0x10]
jb 0x406f21
mov dword [0x5ee2d4], 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 0x406f00
mov esi, dword [0x5ee2bc]
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 0x40706f
mov edx, dword [0x5ee2cc]
cmp ebx, dword [0x5ee2d0]
jae 0x407008
mov al, byte [ebx + 0x5ee2d8]
inc ebx
jmp 0x407051
cmp edx, 8
jae 0x40701a
mov eax, edx
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x407021
xor al, al
jmp 0x407051
mov dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x1c]
sub dword [0x5ee2cc], eax
push eax
push esi
push 0x5ee2d8
mov ebx, 1
mov dword [0x5ee2d0], eax
call fcn.0040cb60
mov al, byte [0x5ee2d8]
mov edx, dword [0x5ee2cc]
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 0x406ff7
mov dword [0x5ee2bc], esi
mov dword [0x5ee2d4], 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 0x40715f
cmp eax, 0x63
je 0x40737b
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 0x407125
nop
cmp ebx, dword [0x5ee2d0]
jae 0x4070c1
mov al, byte [ebx + 0x5ee2d8]
inc ebx
jmp 0x40710d
cmp dword [0x5ee2cc], 8
jae 0x4070d8
mov esi, dword [0x5ee2cc]
test esi, esi
jne 0x4070dd
xor al, al
jmp 0x40710d
mov esi, 8
mov eax, dword [0x5ee2bc]
sub dword [0x5ee2cc], esi
push esi
push eax
push 0x5ee2d8
mov ebx, 1
mov dword [0x5ee2d0], esi
call fcn.0040cb60
mov al, byte [0x5ee2d8]
add esp, 0xc
add dword [0x5ee2bc], esi
movzx edx, al
mov ecx, edi
shl edx, cl
add edi, 8
or dword [ebp - 4], edx
cmp edi, dword [ebp - 0x10]
jb 0x4070b0
mov dword [0x5ee2d4], 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 0x407091
mov esi, dword [0x5ee2bc]
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 0x40721a
cmp edi, 8
jae 0x407208
mov edx, dword [0x5ee2cc]
lea ecx, [ecx]
cmp ebx, dword [0x5ee2d0]
jae 0x4071a1
mov al, byte [ebx + 0x5ee2d8]
inc ebx
jmp 0x4071ea
cmp edx, 8
jae 0x4071b3
mov eax, edx
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x4071ba
xor al, al
jmp 0x4071ea
mov dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x1c]
sub dword [0x5ee2cc], eax
push eax
push esi
push 0x5ee2d8
mov ebx, 1
mov dword [0x5ee2d0], eax
call fcn.0040cb60
mov al, byte [0x5ee2d8]
mov edx, dword [0x5ee2cc]
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 0x407190
mov dword [0x5ee2bc], esi
mov dword [0x5ee2d4], 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 0x407234
mov eax, ecx
mov esi, 0x8000
sub esi, eax
mov eax, dword [ebp - 0x14]
cmp esi, eax
jbe 0x407244
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 0x407272
cmp ebx, eax
ja 0x407272
push esi
lea eax, [ebx + 0x5ee2e0]
push 0
push eax
call fcn.00410d00
add esp, 0xc
add ebx, esi
add dword [ebp - 0xc], esi
jmp 0x4072b6
mov ecx, ebx
sub ecx, eax
cmp ecx, esi
jb 0x4072a0
mov edx, dword [ebp - 0xc]
push esi
lea eax, [edx + 0x5ee2e0]
push eax
lea ecx, [ebx + 0x5ee2e0]
push ecx
call fcn.0040cb60
add esp, 0xc
add ebx, esi
add dword [ebp - 0xc], esi
jmp 0x4072b6
mov dl, byte [eax + 0x5ee2e0]
mov byte [ebx + 0x5ee2e0], dl
inc ebx
inc eax
sub esi, 1
jne 0x4072a0
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], ebx
cmp ebx, 0x8000
jne 0x40733b
mov ebx, dword [0x5f6314]
mov eax, dword [0x5f62ec]
mov dword [ebp - 0x1c], eax
test ebx, ebx
je 0x407305
mov esi, ebx
cmp ebx, 0x8000
jb 0x4072e2
mov esi, 0x8000
mov ecx, dword [0x5f6318]
push esi
push 0x5ee2e0
push ecx
call fcn.0040cb60
sub ebx, esi
add esp, 0xc
add dword [0x5f6318], esi
mov dword [0x5f6314], ebx
mov ecx, dword [ebp - 8]
jcxz 0x40732a
mov esi, 0x5ee2e0
mov ebx, dword [ebp - 0x1c]
lodsb al, byte [esi]
xor al, bl
and eax, 0xff
shr ebx, 8
xor ebx, dword [eax*4 + 0x5f6320]
loop 0x407313
mov dword [ebp - 0x1c], ebx
mov edx, dword [ebp - 0x1c]
xor eax, eax
mov dword [0x5f62ec], edx
mov dword [ebp - 0x20], eax
mov dword [ebp - 8], eax
cmp dword [ebp - 0x14], 0
jne 0x407220
mov ebx, dword [0x5ee2d4]
cmp dword [ebp - 0x18], 0
jg 0x406c00
mov eax, dword [ebp - 8]
mov ecx, dword [0x5f62ec]
push eax
push 0x5ee2e0
push ecx
call fcn.00403ef0
add esp, 0xc
pop edi
pop esi
mov dword [0x5f62ec], 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