Function at 0x409432
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 0x4094ba
test eax, eax
je 0x4094a1
push 0x20
push ebx
push eax
call fcn.00424480
add esp, 0xc
test esi, esi
je 0x4096ba
push 8
push ebx
push esi
call fcn.00424480
add esp, 0xc
jmp 0x4096ba
mov ebp, ebx
lea edi, [ecx + 0xf4]
push edx
mov ecx, edi
call fcn.00414cdf
test al, al
je 0x4094f0
mov eax, dword [esp + 0x8ac]
lea ecx, [edi + 0x10]
cmp dword [ecx + 0x30], eax
jne 0x4094f0
push 0x10
push dword [esp + 0x14]
push ecx
call fcn.004245da
add esp, 0xc
test eax, eax
je 0x409502
inc ebp
add edi, 0x84
cmp ebp, 4
jae 0x40954d
mov edx, dword [esp + 0x14]
jmp 0x4094c2
push 0x20
pop ebp
push ebp
lea eax, [edi + 0x20]
push eax
lea eax, [esp + 0x30]
push eax
call fcn.00423f00
add esp, 0xc
lea ecx, [esp + 0x28]
mov edx, ebp
push ebx
push ebx
call fcn.00414d61
push ebp
lea eax, [edi + 0x44]
push eax
lea eax, [esp + 0x50]
push eax
call fcn.00423f00
add esp, 0xc
lea eax, [edi + 0x64]
push ebp
push eax
lea eax, [esp + 0x70]
push eax
call fcn.00423f00
add esp, 0xc
jmp 0x40963b
push ecx
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x8c]
call fcn.00418263
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.00427a90
pop ecx
mov edx, eax
lea ecx, [esp + 0xa0]
call fcn.0040926f
mov edx, 0x800
lea ecx, [esp + 0x88]
call fcn.00414c17
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.00409b5a
push 0x10
lea eax, [edi + 0x10]
push esi
push eax
call fcn.00423f00
add esp, 0xc
lea eax, [esp + 0x28]
lea esi, [edi + 0x20]
push 0x20
pop ebp
push ebp
push eax
push esi
call fcn.00423f00
add esp, 0xc
lea eax, [esp + 0x48]
push ebp
push eax
lea eax, [edi + 0x44]
push eax
call fcn.00423f00
add esp, 0xc
lea eax, [esp + 0x68]
push ebp
push eax
lea eax, [edi + 0x64]
push eax
call fcn.00423f00
add esp, 0xc
mov edx, ebp
mov ecx, esi
push ebx
push 1
call fcn.00414d61
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x409652
push ebp
lea ecx, [esp + 0x6c]
push ecx
push eax
call fcn.00423f00
add esp, 0xc
test esi, esi
je 0x40967e
push 8
push ebx
push esi
call fcn.00424480
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 0x409662
mov edx, ebp
lea ecx, [esp + 0x48]
call fcn.00414c17
cmp dword [esp + 0x8a8], 0
je 0x4096af
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.004140f3
mov edx, ebp
lea ecx, [esp + 0x28]
call fcn.00414c17
mov ecx, dword [esp + 0x88c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00422815
add esp, 0x884
ret 0x20