Function at 0x409452
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x884
mov eax, dword [0x448020]
xor eax, esp
mov dword [esp + 0x87c], eax
mov eax, dword [esp + 0x890]
mov edx, dword [esp + 0x88c]
push ebx
push ebp
mov dword [esp + 0x14], eax
xor ebx, ebx
cmp dword [esp + 0x8a4], 0x18
mov eax, dword [esp + 0x89c]
push esi
mov esi, dword [esp + 0x8b0]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x8ac]
push edi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], esi
jbe 0x4094da
test eax, eax
je 0x4094c1
push 0x20
push ebx
push eax
call fcn.004245b0
add esp, 0xc
test esi, esi
je 0x4096da
push 8
push ebx
push esi
call fcn.004245b0
add esp, 0xc
jmp 0x4096da
mov ebp, ebx
lea edi, [ecx + 0xf4]
push edx
mov ecx, edi
call fcn.00414d6f
test al, al
je 0x409510
mov eax, dword [esp + 0x8ac]
lea ecx, [edi + 0x10]
cmp dword [ecx + 0x30], eax
jne 0x409510
push 0x10
push dword [esp + 0x14]
push ecx
call fcn.0042470a
add esp, 0xc
test eax, eax
je 0x409522
inc ebp
add edi, 0x84
cmp ebp, 4
jae 0x40956d
mov edx, dword [esp + 0x14]
jmp 0x4094e2
push 0x20
pop ebp
push ebp
lea eax, [edi + 0x20]
push eax
lea eax, [esp + 0x30]
push eax
call fcn.00424030
add esp, 0xc
lea ecx, [esp + 0x28]
mov edx, ebp
push ebx
push ebx
call fcn.00414df1
push ebp
lea eax, [edi + 0x44]
push eax
lea eax, [esp + 0x50]
push eax
call fcn.00424030
add esp, 0xc
lea eax, [edi + 0x64]
push ebp
push eax
lea eax, [esp + 0x70]
push eax
call fcn.00424030
add esp, 0xc
jmp 0x40965b
push ecx
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x8c]
call fcn.00418343
mov ebp, dword [esp + 0x8ac]
xor eax, eax
mov esi, dword [esp + 0x10]
inc eax
mov ecx, ebp
shl eax, cl
push eax
lea eax, [esp + 0x4c]
push eax
lea eax, [esp + 0x70]
push eax
lea eax, [esp + 0x34]
push eax
push ecx
lea eax, [esp + 0x9c]
push esi
push eax
call fcn.00427bc0
pop ecx
mov edx, eax
lea ecx, [esp + 0xa0]
call fcn.0040928f
mov edx, 0x800
lea ecx, [esp + 0x88]
call fcn.00414ca7
mov edx, dword [esp + 0x18]
push dword [esp + 0x14]
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.00409b7a
push 0x10
lea eax, [edi + 0x10]
push esi
push eax
call fcn.00424030
add esp, 0xc
lea eax, [esp + 0x28]
lea esi, [edi + 0x20]
push 0x20
pop ebp
push ebp
push eax
push esi
call fcn.00424030
add esp, 0xc
lea eax, [esp + 0x48]
push ebp
push eax
lea eax, [edi + 0x44]
push eax
call fcn.00424030
add esp, 0xc
lea eax, [esp + 0x68]
push ebp
push eax
lea eax, [edi + 0x64]
push eax
call fcn.00424030
add esp, 0xc
mov edx, ebp
mov ecx, esi
push ebx
push 1
call fcn.00414df1
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x409672
push ebp
lea ecx, [esp + 0x6c]
push ecx
push eax
call fcn.00424030
add esp, 0xc
test esi, esi
je 0x40969e
push 8
push ebx
push esi
call fcn.004245b0
add esp, 0xc
mov al, byte [esp + ebx + 0x48]
mov ecx, ebx
and ecx, 7
xor byte [ecx + esi], al
inc ebx
cmp ebx, ebp
jb 0x409682
mov edx, ebp
lea ecx, [esp + 0x48]
call fcn.00414ca7
cmp dword [esp + 0x8a8], 0
je 0x4096cf
push dword [esp + 0x8a8]
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x2c]
push 0x100
push eax
push dword [esp + 0x8a4]
add ecx, 0x30c
call fcn.00414183
mov edx, ebp
lea ecx, [esp + 0x28]
call fcn.00414ca7
mov ecx, dword [esp + 0x88c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00422945
add esp, 0x884
ret 0x20