Function at 0x409340
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x50
mov dword [esp + 0x20], ecx
mov eax, dword [ecx + 0x80]
mov dword [esp + 0x1c], eax
mov word [esp + 8], 0xc5d7
mov byte [esp + 0xa], 0xda
mov word [esp + 0xb], 0
mov byte [esp + 0xd], 0
mov ebx, 0xb60705b0
mov edx, 0x49f8fa50
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, byte [esp + ebx + 0x49f8fa58]
mov eax, edi
not eax
mov ecx, edi
xor ecx, 0x27
or edi, 0xd8
and edi, ecx
mov ecx, edx
xor ecx, 0xd3d698d8
mov ebp, edx
or ebp, 0x8286207
and ebp, ecx
lea esi, [edx - 0x40000000]
or esi, 0xd3d698d8
lea ecx, [ebx + esi]
and eax, 0x27
or eax, edi
dec edx
mov edi, edx
sub edi, esi
and edi, ebp
xor ecx, ebp
add ecx, ebp
sub ecx, edi
xor ecx, eax
add cl, 0x95
mov byte [esp + ebx + 0x49f8fa58], cl
inc ebx
cmp ebx, 0xb60705b6
jne 0x409380
mov dword [esp + 0x10], 0x62606c46
mov dword [esp + 0x14], 0x9562
mov byte [esp + 0x18], 0
mov ebx, 0x28571ae6
mov ebp, 0x57a8e519
movzx ecx, byte [esp + ebx - 0x28571ad6]
mov edx, ebp
and edx, 0x44a02506
mov eax, ebx
and eax, 0x28100899
or eax, edx
xor eax, ecx
mov ecx, eax
and ecx, 1
and eax, 0xfe
xor eax, 0x67
add eax, ecx
add al, 0x81
mov byte [esp + ebx - 0x28571ad6], al
inc ebx
dec ebp
cmp ebx, 0x28571aef
jne 0x409400
mov dword [esp + 0x24], 0x98ef2537
mov dword [esp + 0x28], 0x9f859b9a
mov dword [esp + 0x2c], 0x9ef6c098
mov dword [esp + 0x30], 0x80878785
mov dword [esp + 0x34], 0x88958f9b
mov dword [esp + 0x38], 0x97dec18a
mov dword [esp + 0x3c], 0xf2b1b58d
mov dword [esp + 0x40], 0xa2b2a0a4
mov dword [esp + 0x44], 0xaeb8ebf9
mov dword [esp + 0x48], 0xebcda4bb
mov byte [esp + 0x4c], 0xc
mov word [esp + 0x4d], 0
mov byte [esp + 0x4f], 0
xor eax, eax
mov ecx, eax
add cl, 0xc7
xor cl, byte [esp + eax + 0x24]
add cl, 0x1d
mov byte [esp + eax + 0x24], cl
inc eax
cmp eax, 0x2c
jne 0x4094a0
mov ebp, dword [esp + 0x64]
add ebp, dword [esp + 0x1c]
mov word [esp], 0x989f
mov byte [esp + 2], 0x4a
mov word [esp + 3], 0
mov byte [esp + 5], 0
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, byte [esp + edi]
mov ebx, edi
and ebx, 1
mov ecx, edi
and ecx, 2
lea edx, [ebx + 2]
imul edx, ecx
mov esi, ecx
xor esi, 2
imul esi, ebx
mov ecx, edi
xor ecx, 0x77f2bf13
add ecx, esi
add ecx, edx
xor ecx, eax
mov eax, ecx
and eax, 1
or ecx, 1
add ecx, eax
add cl, 0xa0
mov byte [esp + edi], cl
and edi, 6
mov eax, edi
xor eax, 0xfffffffe
xor edi, 6
or edi, eax
not edi
add edi, ebx
cmp edi, 6
jb 0x4094e0
movzx ecx, byte [esp]
mov edi, ebp
test cl, cl
je 0x40954b
lea eax, [esp + 1]
mov edi, ebp
mov byte [edi], cl
inc edi
movzx ecx, byte [eax]
inc eax
test cl, cl
jne 0x409540
mov byte [edi], 0
mov edx, dword [esp + 0x20]
movzx eax, byte [edx + 0x60]
test al, al
je 0x40956b
lea ecx, [edx + 0x61]
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x409560
mov byte [edi], 0
movzx eax, byte [esp + 0x24]
test al, al
je 0x40958b
lea ecx, [esp + 0x25]
nop
nop
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x409580
mov byte [edi], 0
mov eax, dword [esp + 0x68]
movzx ecx, byte [eax]
test cl, cl
je 0x4095ab
inc eax
nop
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [eax]
inc eax
test cl, cl
jne 0x4095a0
mov byte [edi], 0
movzx eax, byte [esp + 0x10]
test al, al
je 0x4095cb
lea ecx, [esp + 0x11]
nop
nop
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x4095c0
mov byte [edi], 0
mov eax, dword [esp + 0x6c]
movzx ecx, byte [eax]
test cl, cl
je 0x4095eb
inc eax
nop
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [eax]
inc eax
test cl, cl
jne 0x4095e0
mov byte [edi], 0
movzx eax, byte [esp + 8]
test al, al
je 0x40960b
lea ecx, [esp + 9]
nop
nop
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x409600
mov byte [edi], 0
sub edi, ebp
add dword [edx + 0x80], edi
add esp, 0x50
pop esi
pop edi
pop ebx
pop ebp
ret 0xc