Function at 0x40fda7
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x2d4
push ebx
push ebp
push esi
mov dword [esp + 0x20], ecx
mov ebp, edx
push edi
mov dword [esp + 0x10], 0x1d342de6
xor esi, esi
mov byte [esp + 0x14], 0xeb
mov ecx, 0xff
movzx eax, byte [esp + esi + 0x10]
add ax, 0x3f
and ax, cx
mov word [esp + esi*2 + 0x44], ax
inc esi
cmp esi, 5
jl 0x40fdcb
push dword [esp + 0x2e8]
xor eax, eax
mov word [esp + 0x52], ax
lea eax, [esp + 0x48]
push eax
call fcn.0041b73b
mov edi, eax
mov dword [esp + 0x18], edi
pop ecx
pop ecx
test edi, edi
je 0x410083
lea eax, [esp + 0x90]
xor ecx, ecx
push eax
push edi
mov edx, 0x54e1cc7b
inc ecx
call fcn.00412ca7
call eax
mov ebx, eax
cmp ebx, 0xffffffff
je 0x41007c
mov dword [esp + 0x18], 0xe1312f1
xor ecx, ecx
mov word [esp + 0x1c], 0x1922
mov esi, 0xff
mov byte [esp + 0x1e], 0x21
movzx eax, byte [esp + ecx + 0x18]
add ax, 0x53
and ax, si
mov word [esp + ecx*2 + 0x50], ax
inc ecx
cmp ecx, 7
jl 0x40fe48
push dword [esp + 0x2ec]
mov edi, dword [esp + 0x28]
xor eax, eax
mov word [esp + 0x62], ax
mov edx, ebp
lea eax, [esp + 0x54]
mov ecx, edi
push eax
push dword [esp + 0x2f0]
call fcn.0041008e
add esp, 0xc
xor ecx, ecx
mov edx, 0x17299c7b
inc ecx
call fcn.00412ca7
mov dword [esp + 0x40], eax
mov word [esp + 0x20], 0xc1c1
push 0x2e
pop eax
mov word [esp + 0x24], ax
xor eax, eax
mov word [esp + 0x26], ax
xor ecx, ecx
mov al, byte [esp + ecx + 0x20]
xor al, 0xef
movzx eax, al
mov word [esp + ecx*2 + 0x18], ax
inc ecx
cmp ecx, 2
jl 0x40feb2
xor eax, eax
mov word [esp + 0x1c], ax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0xc0]
push eax
call fcn.00405af6
pop ecx
pop ecx
test eax, eax
je 0x410053
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0xc0]
push eax
call fcn.00405af6
pop ecx
pop ecx
test eax, eax
je 0x410053
test byte [esp + 0x90], 0x10
je 0x410053
lea eax, [esp + 0xbc]
push eax
call fcn.0040581e
pop ecx
cmp eax, 7
jb 0x410053
mov dword [esp + 0x28], 0xfd0609e7
xor ecx, ecx
mov word [esp + 0x2c], 0x300
mov byte [esp + 0x2e], 0xfc
movzx eax, byte [esp + ecx + 0x28]
add ax, 0x69
and ax, si
mov word [esp + ecx*2 + 0x60], ax
inc ecx
cmp ecx, 7
jl 0x40ff40
xor eax, eax
mov dword [esp + 0x30], 0x111615f4
mov word [esp + 0x6e], ax
xor ecx, ecx
mov word [esp + 0x34], 0x1c25
mov byte [esp + 0x36], 0x24
movzx eax, byte [esp + ecx + 0x30]
add ax, 0x50
and ax, si
mov word [esp + ecx*2 + 0x70], ax
inc ecx
cmp ecx, 7
jl 0x40ff74
xor eax, eax
mov word [esp + 0x7e], ax
lea eax, [esp + 0x60]
push 0xe
push eax
lea eax, [esp + 0xc4]
push eax
call fcn.004022e4
add esp, 0xc
test eax, eax
je 0x40ffcc
push 0xe
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0xc4]
push eax
call fcn.004022e4
add esp, 0xc
test eax, eax
jne 0x410053
mov dword [esp + 0x38], 0xdff6efa8
xor ecx, ecx
mov word [esp + 0x3c], 0xefa8
mov byte [esp + 0x3e], 0xf6
movzx eax, byte [esp + ecx + 0x38]
add ax, 0x7d
and ax, si
mov word [esp + ecx*2 + 0x80], ax
inc ecx
cmp ecx, 7
jl 0x40ffe2
xor eax, eax
mov word [esp + 0x8e], ax
lea eax, [esp + 0xbc]
push eax
push dword [esp + 0x2ec]
lea eax, [esp + 0x88]
push eax
call fcn.0041b73b
mov esi, eax
add esp, 0xc
test esi, esi
je 0x41004e
push dword [esp + 0x2ec]
lea eax, [esp + 0xc0]
mov edx, ebp
push eax
push esi
mov ecx, edi
call fcn.0041008e
add esp, 0xc
push esi
call fcn.004056f0
pop ecx
mov esi, 0xff
lea eax, [esp + 0x90]
push eax
push ebx
call dword [esp + 0x48]
test eax, eax
jne 0x40fea1
xor ecx, ecx
mov edx, 0x83fbc401
push ebx
inc ecx
call fcn.00412ca7
call eax
mov edi, dword [esp + 0x10]
push edi
call fcn.004056f0
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2d4
ret