Function at 0x409a80
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x428
push ebp
push eax
call dword [fcn.004650f8]
mov ebp, eax
xor eax, eax
mov ax, word [ebp + 0xe]
cmp eax, 0x18
je 0x409aab
xor eax, eax
pop ebp
add esp, 0x428
ret 4
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x409abe
xor eax, eax
pop ebp
add esp, 0x428
ret 4
push ebx
mov ebx, dword [ebp + 4]
mov ecx, dword [ebp + 8]
push esi
lea edx, [ebx + ebx*2]
push edi
push 0x2c
mov dword [esp + 0x1c], ecx
lea eax, [edx*8 + 0x1f]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
shl eax, 2
mov dword [esp + 0x30], eax
lea eax, [ebx*8 + 0x1f]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
shl eax, 2
mov dword [esp + 0x18], eax
call fcn.00462018
mov edx, eax
mov ecx, 0xb
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x18]
mov ecx, 0xb
imul eax, dword [esp + 0x1c]
mov esi, ebp
mov edi, edx
rep movsd dword es:[edi], dword [esi]
lea esi, [eax + 0x428]
mov dword [esp + 0x20], edx
push esi
mov dword [edx], 0x28
mov word [edx + 0xe], 8
mov dword [edx + 0x14], eax
mov dword [esp + 0x3c], esi
call fcn.00462018
mov edx, eax
mov ecx, esi
xor eax, eax
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
mov esi, dword [esp + 0x24]
and ecx, 3
add esp, 8
rep stosb byte es:[edi], al
mov ecx, dword [esi]
mov edi, edx
mov eax, ecx
mov dword [esp + 0x30], edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x1c]
mov esi, dword [ecx]
add esi, edx
inc esi
mov byte [esi - 1], al
mov byte [esi + 1], al
mov byte [esi], al
inc eax
add esi, 4
cmp eax, 0x100
jl 0x409b83
mov ecx, dword [ecx]
mov eax, dword [ebp + 0x20]
mov esi, dword [esp + 0x18]
lea edx, [ecx + edx + 0x400]
mov ecx, dword [ebp]
mov dword [esp + 0x20], edx
lea eax, [ecx + eax*4]
add eax, ebp
test esi, esi
jle 0x409c99
inc eax
mov ebp, edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], esi
xor edi, edi
test ebx, ebx
jle 0x409c76
mov esi, eax
mov eax, dword [0x474830]
test eax, eax
je 0x409c1e
xor edx, edx
xor eax, eax
mov dl, byte [esi + 1]
mov al, byte [esi - 1]
mov dword [esp + 0x10], edx
xor ecx, ecx
fild dword [esp + 0x10]
mov dword [esp + 0x10], eax
mov cl, byte [esi]
fmul qword [0x466138]
fild dword [esp + 0x10]
mov dword [esp + 0x10], ecx
fmul qword [0x466130]
faddp st(1)
fild dword [esp + 0x10]
fmul qword [0x466128]
faddp st(1)
fsubr qword [0x466120]
jmp 0x409c5a
xor edx, edx
xor eax, eax
mov dl, byte [esi - 1]
mov al, byte [esi + 1]
mov dword [esp + 0x10], edx
xor ecx, ecx
fild dword [esp + 0x10]
mov dword [esp + 0x10], eax
mov cl, byte [esi]
fmul qword [0x466138]
fild dword [esp + 0x10]
mov dword [esp + 0x10], ecx
fmul qword [0x466130]
faddp st(1)
fild dword [esp + 0x10]
fmul qword [0x466128]
faddp st(1)
call fcn.004625d0
mov byte [edi + ebp], al
inc edi
add esi, 3
cmp edi, ebx
jl 0x409bd1
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x2c]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x28]
add eax, edi
add ebp, edx
dec ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ecx
jne 0x409bc5
mov edx, dword [esp + 0x20]
mov ecx, pe_nt_image_headers32
xor eax, eax
lea edi, [esp + 0x38]
test esi, esi
rep stosd dword es:[edi], eax
jle 0x409cd0
mov edi, edx
xor eax, eax
test ebx, ebx
jle 0x409cc7
xor edx, edx
mov dl, byte [edi + eax]
mov ebp, dword [esp + edx*4 + 0x38]
lea ecx, [esp + edx*4 + 0x38]
inc ebp
inc eax
cmp eax, ebx
mov dword [ecx], ebp
jl 0x409cb2
mov ecx, dword [esp + 0x14]
add edi, ecx
dec esi
jne 0x409cac
xor edx, edx
xor esi, esi
xor edi, edi
xor eax, eax
lea ebp, [esp + 0x38]
mov ecx, dword [ebp]
test ecx, ecx
jbe 0x409ce4
inc edx
cmp esi, ecx
jae 0x409cec
mov esi, ecx
mov edi, eax
inc eax
add ebp, 4
cmp eax, 0x100
jl 0x409cdc
cmp edx, 0xa
jge 0x409d39
mov eax, dword [esp + 0x18]
test eax, eax
jle 0x409d39
mov esi, dword [esp + 0x20]
mov ebp, eax
xor ecx, ecx
test ebx, ebx
jle 0x409d30
xor eax, eax
mov al, byte [esi + ecx]
sub eax, edi
cdq
xor eax, edx
sub eax, edx
cmp eax, 3
setge al
dec eax
and eax, 0xff
mov byte [esi + ecx], al
inc ecx
cmp ecx, ebx
jl 0x409d10
mov ecx, dword [esp + 0x14]
add esi, ecx
dec ebp
jne 0x409d0a
mov esi, dword [esp + 0x43c]
push esi
call dword [fcn.004650fc]
push esi
call dword [fcn.00465100]
mov esi, dword [esp + 0x34]
push esi
push 0x42
call dword [fcn.00465104]
mov ebx, eax
push ebx
call dword [fcn.004650f8]
mov ebp, dword [esp + 0x30]
mov ecx, esi
mov edx, ecx
mov esi, ebp
mov edi, eax
mov eax, dword [esp + 0x1c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00461fdc
push ebp
call fcn.00461fdc
add esp, 8
mov eax, ebx
pop edi
pop esi
pop ebx
pop ebp
add esp, 0x428
ret 4