Function at 0x41f955
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
mov edi, 2
push esi
push ebx
push eax
mov eax, dword [0x447ca0]
cmp dword [0x447cc0], 3
mov dword [esp], 0
jg 0x41fb15
mov dword [0x44b918], 2
xor esi, esi
test eax, eax
je 0x41fd4f
mov ebx, dword [0x44b928]
mov eax, dword [0x447c80]
movzx edx, byte [ebx + 0x45826a]
shl eax, 5
xor eax, edx
and eax, 0x7fff
mov edx, ebx
and edx, 0x7fff
movzx ecx, word [eax + eax + 0x488528]
mov dword [0x447c80], eax
test ecx, ecx
mov word [edx + edx + 0x478528], cx
mov word [eax + eax + 0x488528], bx
je 0x41f9ee
sub ebx, ecx
cmp ebx, 0x7efa
ja 0x41f9ee
push ecx
call fcn.0041f5c4
pop ebp
mov esi, eax
mov eax, dword [0x447ca0]
cmp esi, eax
cmova esi, eax
cmp esi, 2
mov edx, dword [0x44b928]
jbe 0x41fa9a
sub edx, dword [0x44b938]
lea eax, [esi - 3]
push eax
push edx
call fcn.0042112c
sub dword [0x447ca0], esi
cmp esi, dword [0x447cb0]
pop ebx
pop edi
mov edi, eax
ja 0x41fa71
mov ebx, dword [0x44b928]
dec esi
mov edx, dword [0x447c80]
inc ebx
shl edx, 5
movzx eax, byte [ebx + 0x45826a]
xor edx, eax
and edx, 0x7fff
movzx ecx, word [edx + edx + 0x488528]
mov eax, ebx
and eax, 0x7fff
dec esi
mov word [eax + eax + 0x478528], cx
mov word [edx + edx + 0x488528], bx
jne 0x41fa2c
mov dword [0x447c80], edx
lea eax, [ebx + 1]
mov dword [0x44b928], eax
jmp 0x41fab9
mov eax, dword [0x44b928]
add eax, esi
xor esi, esi
movzx edx, byte [eax + 0x458268]
mov dword [0x44b928], eax
movzx eax, byte [eax + 0x458269]
shl edx, 5
xor edx, eax
mov dword [0x447c80], edx
jmp 0x41fab9
movzx eax, byte [edx + 0x458268]
push eax
push 0
call fcn.0042112c
pop edx
mov edi, eax
dec dword [0x447ca0]
inc dword [0x44b928]
pop ecx
test edi, edi
je 0x41fafd
push 0
mov edx, dword [0x44b968]
mov eax, dword [0x44b928]
lea ecx, [edx + 0x458268]
sub eax, edx
push eax
xor eax, eax
test edx, edx
cmovns eax, ecx
push eax
call fcn.004212a8
mov eax, dword [0x44b928]
add esp, 0xc
mov dword [0x44b968], eax
jmp 0x41fafd
cmp dword [0x447c90], 0
jne 0x41fb09
call fcn.0041f71c
cmp dword [0x447ca0], 0x105
jbe 0x41faef
cmp dword [0x447ca0], 0
jmp 0x41f986
test eax, eax
je 0x41fd4f
mov dword [0x44b918], edi
mov ecx, dword [0x44b928]
mov edi, 2
mov eax, dword [0x447c80]
mov esi, dword [0x44b938]
movzx edx, byte [ecx + 0x45826a]
shl eax, 5
xor eax, edx
and eax, 0x7fff
mov edx, ecx
and edx, 0x7fff
movzx ebx, word [eax + eax + 0x488528]
mov dword [0x447c80], eax
test ebx, ebx
mov word [edx + edx + 0x478528], bx
mov word [eax + eax + 0x488528], cx
je 0x41fbba
mov eax, dword [0x447cb0]
cmp dword [0x44b918], eax
jae 0x41fbba
sub ecx, ebx
cmp ecx, 0x7efa
ja 0x41fbba
push ebx
call fcn.0041f5c4
pop ebp
mov edi, eax
mov eax, dword [0x447ca0]
cmp edi, eax
cmova edi, eax
cmp edi, 3
jne 0x41fbba
mov eax, dword [0x44b928]
sub eax, dword [0x44b938]
cmp eax, 0x1001
mov eax, 2
cmovae edi, eax
mov eax, dword [0x44b918]
cmp eax, 2
jbe 0x41fc9c
cmp edi, eax
ja 0x41fc9c
not esi
sub eax, 3
add esi, dword [0x44b928]
push eax
push esi
call fcn.0042112c
pop esi
mov ebp, eax
mov edx, dword [0x44b918]
mov eax, dword [0x447ca0]
mov esi, dword [0x44b928]
mov ecx, dword [0x447c80]
pop edi
sub eax, edx
inc eax
mov dword [0x447ca0], eax
sub edx, 2
mov dword [0x44b918], edx
inc esi
shl ecx, 5
movzx eax, byte [esi + 0x45826a]
xor ecx, eax
and ecx, 0x7fff
movzx ebx, word [ecx + ecx + 0x488528]
mov eax, esi
and eax, 0x7fff
dec edx
mov word [eax + eax + 0x478528], bx
mov word [ecx + ecx + 0x488528], si
jne 0x41fc0e
mov dword [0x44b918], 0
lea eax, [esi + 1]
test ebp, ebp
mov dword [0x447c80], ecx
mov edi, 2
mov dword [esp], 0
mov dword [0x44b928], eax
je 0x41fd1a
push 0
mov edx, dword [0x44b968]
sub eax, edx
push eax
lea ecx, [edx + 0x458268]
xor eax, eax
test edx, edx
cmovns eax, ecx
push eax
call fcn.004212a8
mov eax, dword [0x44b928]
add esp, 0xc
mov dword [0x44b968], eax
jmp 0x41fd1a
cmp dword [esp], 0
mov edx, dword [0x44b928]
je 0x41fcf5
movzx eax, byte [edx + 0x458267]
push eax
push 0
call fcn.0042112c
pop ecx
test eax, eax
pop ebx
je 0x41fced
push 0
mov edx, dword [0x44b968]
mov eax, dword [0x44b928]
lea ecx, [edx + 0x458268]
sub eax, edx
push eax
xor eax, eax
test edx, edx
cmovns eax, ecx
push eax
call fcn.004212a8
mov eax, dword [0x44b928]
add esp, 0xc
mov dword [0x44b968], eax
inc dword [0x44b928]
jmp 0x41fd04
mov dword [esp], 1
lea eax, [edx + 1]
mov dword [0x44b928], eax
dec dword [0x447ca0]
jmp 0x41fd1a
cmp dword [0x447c90], 0
jne 0x41fd26
call fcn.0041f71c
cmp dword [0x447ca0], 0x105
jbe 0x41fd0c
cmp dword [0x447ca0], 0
jne 0x41fb1d
cmp dword [esp], 0
je 0x41fd4f
mov eax, dword [0x44b928]
movzx eax, byte [eax + 0x458267]
push eax
push 0
call fcn.0042112c
pop eax
pop edx
push 1
mov edx, dword [0x44b968]
mov eax, dword [0x44b928]
lea ecx, [edx + 0x458268]
sub eax, edx
push eax
xor eax, eax
test edx, edx
cmovns eax, ecx
push eax
call fcn.004212a8
add esp, 0x10
pop ebx
pop esi
pop edi
pop ebp
ret