Function at 0x40e726
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4ddd3f
mov eax, dword fs:[0]
push eax
sub esp, 0x110
mov eax, dword [0x513720]
xor eax, esp
mov dword [esp + 0x108], eax
push ebx
push esi
push edi
mov eax, dword [0x513720]
xor eax, esp
push eax
lea eax, [esp + 0x120]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov dword [esp + 0x10], ebx
and dword [edi + 0x10], 0
cmp dword [edi + 0x14], 0x10
jb 0x40e77e
mov eax, dword [edi]
jmp 0x40e780
mov eax, edi
mov byte [eax], 0
lea eax, [esp + 0x5c]
push eax
mov dword [esp + 0x38], str.appid
mov dword [esp + 0x3c], 0x4fe964
mov dword [esp + 0x40], 0x4ff6c4
mov dword [esp + 0x44], 0x4ff6c8
mov dword [esp + 0x48], 0x4ff6cc
mov dword [esp + 0x4c], str.type
mov dword [esp + 0x50], 0x4ff6d8
call fcn.0040e5ce
and dword [esp + 0x128], 0
lea esi, [esp + 0x5c]
cmp dword [esp + 0x70], 0x10
cmovae esi, dword [esp + 0x5c]
mov dword [esp + 0x18], esi
test esi, esi
je 0x40e8ce
xor ebx, ebx
push 0x7f
lea eax, [esp + 0x99]
mov byte [esp + 0x98], 0
push 0
push eax
call fcn.004be330
add esp, 0xc
push dword [esp + ebx*4 + 0x34]
push esi
call fcn.004baf70
mov edx, eax
pop ecx
pop ecx
test edx, edx
je 0x40e8c0
mov ecx, dword [esp + ebx*4 + 0x34]
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40e822
sub ecx, esi
push 0x26
lea eax, [ecx + 1]
add eax, edx
push eax
mov dword [esp + 0x1c], eax
call fcn.004bb1e0
mov esi, eax
mov eax, dword [esp + 0x1c]
pop ecx
pop ecx
test esi, esi
je 0x40eaa8
sub esi, eax
cmp esi, 0x7f
jg 0x40e8bc
push esi
push eax
lea eax, [esp + 0x9c]
push eax
call fcn.004bdce0
add esp, 0xc
cmp esi, 0x80
jae 0x40eaa3
lea eax, [esp + 0x94]
mov byte [esp + esi + 0x94], 0
push eax
lea ecx, [esp + 0x20]
call fcn.00426cb0
mov byte [esp + 0x128], 2
lea eax, [esp + 0x1c]
mov ecx, dword [esp + 0x10]
push eax
push dword [esp + ebx*4 + 0x38]
call fcn.00427cf0
mov ecx, eax
call fcn.00427170
mov byte [esp + 0x128], 0
lea ecx, [esp + 0x1c]
call fcn.00427060
mov esi, dword [esp + 0x18]
inc ebx
cmp ebx, 7
jl 0x40e7e9
mov ebx, dword [esp + 0x10]
mov word [esp + 0x51], 0x425e
xor ecx, ecx
mov byte [esp + 0x50], 0x59
mov al, byte [esp + ecx + 0x50]
sub al, 3
xor al, 0x3f
mov byte [esp + ecx + 0x50], al
inc ecx
cmp ecx, 3
jl 0x40e8dc
call fcn.004051b8
lea ecx, [esp + 0x1c]
movzx eax, word [eax + 8]
push eax
call fcn.00426bf0
mov byte [esp + 0x128], 3
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x54]
mov ecx, ebx
push eax
call fcn.00427cf0
mov ecx, eax
call fcn.00427170
mov byte [esp + 0x128], 0
lea ecx, [esp + 0x1c]
call fcn.00427060
mov word [esp + 0x59], 0x424e
xor ecx, ecx
mov byte [esp + 0x58], 0x4f
mov al, byte [esp + ecx + 0x58]
sub al, 3
xor al, 0x3f
mov byte [esp + ecx + 0x58], al
inc ecx
cmp ecx, 3
jl 0x40e940
call fcn.004051b8
lea ecx, [esp + 0x1c]
push dword [eax + 0xc]
call fcn.00426bf0
mov byte [esp + 0x128], 4
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x5c]
mov ecx, ebx
push eax
call fcn.00427cf0
mov ecx, eax
call fcn.00427170
mov byte [esp + 0x128], 0
lea ecx, [esp + 0x1c]
call fcn.00427060
mov word [esp + 0x55], 0x4254
xor ecx, ecx
mov byte [esp + 0x54], 0x48
mov al, byte [esp + ecx + 0x54]
sub al, 3
xor al, 0x3f
mov byte [esp + ecx + 0x54], al
inc ecx
cmp ecx, 3
jl 0x40e9a2
call fcn.004051b8
lea ecx, [esp + 0x1c]
movzx eax, word [eax + 0xa]
push eax
call fcn.00426bf0
mov byte [esp + 0x128], 5
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x58]
mov ecx, ebx
push eax
call fcn.00427cf0
mov ecx, eax
call fcn.00427170
mov byte [esp + 0x128], 0
lea ecx, [esp + 0x1c]
call fcn.00427060
lea ecx, [esp + 0x74]
call fcn.00424aa0
mov byte [esp + 0x128], 6
mov esi, 0x4ff6e0
push esi
call fcn.00401241
pop ecx
push eax
push esi
mov ecx, edi
call fcn.00401a20
push ebx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x7c]
call fcn.00424b30
mov byte [esp + 0x128], 7
xor ebx, ebx
push 0xffffffffffffffff
push ebx
push eax
mov ecx, edi
call fcn.00405274
mov byte [esp + 0x128], 6
lea ecx, [esp + 0x1c]
push ebx
push 1
call fcn.004019c4
mov byte [esp + 0x128], bl
lea ecx, [esp + 0x74]
call fcn.004063a0
or dword [esp + 0x128], 0xffffffff
lea ecx, [esp + 0x5c]
push ebx
push 1
call fcn.004019c4
xor eax, eax
inc eax
mov ecx, dword [esp + 0x120]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x108]
xor ecx, esp
call fcn.004b923d
mov esp, ebp
pop ebp
ret 8
call fcn.004bb4f0
push eax
lea ecx, [esp + 0x20]
call fcn.00426cb0
mov byte [esp + 0x128], 1
lea eax, [esp + 0x1c]
mov ebx, dword [esp + 0x10]
mov ecx, ebx
push eax
push 0x4ff6d8
call fcn.00427cf0
mov ecx, eax
call fcn.00427170
mov byte [esp + 0x128], 0
lea ecx, [esp + 0x1c]
call fcn.00427060
jmp 0x40e8ce