Function at 0x40838f
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x880
mov eax, dword [0x448780]
xor eax, esp
mov dword [esp + 0x87c], eax
cmp dword [esp + 0x898], 0x18
mov eax, ecx
mov ecx, dword [esp + 0x88c]
mov edx, dword [esp + 0x888]
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x890]
mov dword [esp], ecx
mov ecx, dword [esp + 0x894]
push edi
mov edi, dword [esp + 0x8a4]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x8a0]
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], edi
jbe 0x4083fc
xor al, al
jmp 0x408603
push ebx
push ebp
xor ebx, ebx
push esi
mov ebp, ebx
lea esi, [eax + 0xf4]
push edx
mov ecx, esi
call fcn.00414afa
test al, al
je 0x408437
mov eax, dword [esp + 0x8a8]
lea ecx, [esi + 0x10]
cmp dword [ecx + 0x30], eax
jne 0x408437
push 0x10
push dword [esp + 0x14]
push ecx
call fcn.004273b8
add esp, 0xc
test eax, eax
je 0x408449
inc ebp
add esi, 0x84
cmp ebp, 4
jae 0x408494
mov edx, dword [esp + 0x14]
jmp 0x408409
push 0x20
pop ebp
push ebp
lea eax, [esi + 0x20]
push eax
lea eax, [esp + 0x34]
push eax
call fcn.004268c0
add esp, 0xc
lea eax, [esp + 0x2c]
push ebx
push ebx
push ebp
push eax
call fcn.00414c4f
push ebp
lea eax, [esi + 0x44]
push eax
lea eax, [esp + 0x54]
push eax
call fcn.004268c0
push ebp
lea eax, [esi + 0x64]
push eax
lea eax, [esp + 0x80]
push eax
call fcn.004268c0
add esp, 0x18
jmp 0x408587
mov esi, 0x800
lea eax, [esp + 0x8c]
push esi
push eax
push dword [esp + 0x24]
call fcn.004182be
mov ebp, dword [esp + 0x8a8]
xor eax, eax
inc eax
mov ecx, ebp
shl eax, cl
push eax
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x38]
push eax
push 0x10
push dword [esp + 0x24]
lea eax, [esp + 0xa4]
push eax
call fcn.0042a8d0
pop ecx
push eax
lea eax, [esp + 0xa8]
push eax
call fcn.004088c4
push esi
lea eax, [esp + 0x90]
push eax
call fcn.00414d3e
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
push esi
mov ecx, dword [edx + 0x304]
lea edi, [edx + 0xf4]
mov eax, ecx
and eax, 3
imul eax, eax, 0x84
add edi, eax
lea eax, [ecx + 1]
mov dword [edx + 0x304], eax
mov ecx, edi
mov dword [edi + 0x40], ebp
call fcn.00407e69
mov al, byte [esi + 0xc]
push 0x10
push dword [esp + 0x14]
mov byte [edi + 0xc], al
lea eax, [edi + 0x10]
push eax
call fcn.004268c0
push 0x20
pop ebp
push ebp
lea eax, [esp + 0x3c]
push eax
lea esi, [edi + 0x20]
push esi
call fcn.004268c0
push ebp
lea eax, [esp + 0x68]
push eax
lea eax, [edi + 0x44]
push eax
call fcn.004268c0
push ebp
lea eax, [esp + 0x94]
push eax
lea eax, [edi + 0x64]
push eax
call fcn.004268c0
add esp, 0x30
push ebx
push 1
push ebp
push esi
call fcn.00414c4f
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x40859e
push ebp
lea ecx, [esp + 0x70]
push ecx
push eax
call fcn.004268c0
add esp, 0xc
test edi, edi
je 0x4085ca
push 8
push ebx
push edi
call fcn.00426e40
add esp, 0xc
mov al, byte [esp + ebx + 0x4c]
mov ecx, ebx
and ecx, 7
xor byte [ecx + edi], al
inc ebx
cmp ebx, ebp
jb 0x4085ae
push ebp
lea eax, [esp + 0x50]
push eax
call fcn.00414d3e
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4085f3
mov ecx, dword [esp + 0x18]
push eax
push 0x100
lea eax, [esp + 0x34]
add ecx, 0x30c
push eax
push dword [esp + 0x8a0]
call fcn.004140fd
push ebp
lea ecx, [esp + 0x30]
push ecx
call fcn.00414d3e
pop esi
pop ebp
mov al, 1
pop ebx
mov ecx, dword [esp + 0x880]
pop edi
xor ecx, esp
call fcn.004253a4
add esp, 0x880
ret 0x20