Function at 0x412020
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x140
mov word [esp + 0x50], 0xe143
mov dword [esp + 0x52], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 5
ja 0x4120a7
nop
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 0x50]
mov edx, eax
xor edx, 0x10ce7e58
and eax, 0x10ce7e58
lea edx, [edx + eax*2]
lea eax, [edx + ecx]
mov esi, ecx
not esi
or esi, edx
add ecx, esi
inc ecx
sub eax, ecx
mov edx, eax
not edx
and edx, ecx
not ecx
and ecx, eax
sub ecx, edx
mov dword [esp + 0xb8], ecx
mov eax, dword [esp + 0xb8]
add al, 0x48
mov ecx, dword [esp]
mov byte [esp + ecx + 0x50], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 6
jb 0x412050
lea esi, [esp + 0x50]
push esi
push dword [ebp + 8]
call fcn.00404480
add esp, 8
mov edi, eax
xor ecx, ecx
test eax, eax
sete cl
xor ebx, ebx
xor eax, eax
jmp dword [ecx*4 + 0x449678]
mov dword [esp + 0x120], edi
jmp 0x4120ef
mov ebx, dword [esp + 0x124]
inc ebx
mov edi, dword [esp + 0x120]
push edi
call fcn.00404690
add esp, 4
xor ecx, ecx
cmp ebx, eax
setb cl
mov al, 1
jmp dword [ecx*4 + 0x449680]
mov dword [esp + 0x124], ebx
push ebx
push edi
call fcn.004046a0
add esp, 8
mov ebx, eax
mov dword [esp + 0x50], 0x893c
mov byte [esp + 0x54], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 4
ja 0x41217f
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 0x50]
mov edx, eax
xor edx, 0x51b311a2
and eax, 0xd1b311a2
lea eax, [edx + eax*2]
xor eax, ecx
mov dword [esp + 0xb8], eax
mov eax, dword [esp + 0xb8]
add al, 0xd6
mov ecx, dword [esp]
mov byte [esp + ecx + 0x50], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 5
jb 0x412140
push 3
push esi
push ebx
call fcn.00404630
add esp, 0xc
xor ecx, ecx
test eax, eax
sete cl
jmp dword [ecx*4 + 0x449688]
mov word [esp + 0x50], 0x8914
lea eax, [esp + 0x54]
mov byte [eax], 0
mov word [eax - 2], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 4
ja 0x41221d
nop
nop
nop
nop
mov eax, dword [esp]
mov ecx, dword [esp]
movzx ecx, byte [esp + ecx + 0x50]
mov edx, eax
xor edx, 0x27925d1e
and eax, 0x27925d1e
lea eax, [edx + eax*2]
lea edx, [eax + ecx]
and eax, ecx
mov ecx, edx
not ecx
and ecx, eax
add ecx, eax
not eax
and eax, edx
sub eax, ecx
mov dword [esp + 0xb8], eax
mov eax, dword [esp + 0xb8]
mov ecx, eax
not ecx
and ecx, 0x96
and eax, 0x69
sub eax, ecx
mov ecx, dword [esp]
mov byte [esp + ecx + 0x50], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 5
jb 0x4121c0
push esi
push ebx
call fcn.00404410
add esp, 8
fnstcw word [esp + 0x114]
movzx eax, word [esp + 0x114]
or eax, 0xc00
mov word [esp + 0x11e], ax
fldcw word [esp + 0x11e]
fistp dword [esp + 0x138]
fldcw word [esp + 0x114]
mov eax, dword [esp + 0x138]
xor ecx, ecx
cmp eax, 2
setl cl
jmp dword [ecx*4 + 0x449690]
xor ecx, ecx
cmp eax, 3
setl cl
jmp dword [ecx*4 + 0x449698]
sete al
movzx eax, al
jmp dword [eax*4 + 0x4496a0]
xor ecx, ecx
test eax, eax
setle cl
jmp dword [ecx*4 + 0x4496a8]
mov word [esp + 0x50], 0x2bb4
mov dword [esp + 0x52], 0
mov dword [esp], 0
mov eax, dword [esp]
cmp eax, 5
ja 0x412ccf
nop
nop
nop
mov ecx, dword [esp]
mov eax, dword [esp]
movzx eax, byte [esp + eax + 0x50]
lea edx, [ecx + ecx]
and edx, 0xed738a6e
mov esi, ecx
not esi
or esi, 0x76b9c537
add esi, ecx
sub ecx, edx
lea ecx, [ecx + esi*2]
add ecx, 0x76b9c539
xor ecx, eax
mov dword [esp + 0xb8], ecx
mov eax, dword [esp + 0xb8]
add al, 0xed
mov ecx, dword [esp]
mov byte [esp + ecx + 0x50], al
inc dword [esp]
mov eax, dword [esp]
cmp eax, 6
jb 0x412c80
lea esi, [esp + 0x50]
push esi
push ebx
call fcn.004043b0
add esp, 8
mov dword [esp + 0x14], eax
mov word [esp + 0x50], 0xc946
mov eax, dword [0x449880]
lea ecx, [esp + 0x54]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [ecx + 2], 0
mov dword [ecx - 2], 0
jmp eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret