Function at 0x4097b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x110
cmp dword [ecx + 0x20], 0
je 0x409c65
mov esi, ecx
lea eax, [ecx + 0x10]
push eax
call fcn.00405e60
add esp, 4
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 0x58]
mov eax, dword [eax + 0x48]
mov dword [esp + 0x10], eax
movzx eax, byte [esi]
imul ecx, eax, 0xcd
shr ecx, 0xa
and ecx, 0xfffffffe
lea ecx, [ecx + ecx*4]
sub al, cl
movzx eax, al
movzx eax, byte [eax + 0x440b8c]
mov byte [esp + 2], al
mov byte [esp + 3], 0
mov dword [esp + 0x14], edx
lea eax, [edx + 0x400]
push eax
call fcn.00407ff0
add esp, 4
mov dword [esp + 8], eax
mov dword [esp + 0x74], 0x54464945
mov byte [esp + 0x78], 0xf1
mov eax, 0x9cc28655
nop
movzx ecx, byte [esp + eax + 0x633d7a1f]
mov edx, eax
and edx, ecx
add edx, edx
sub ecx, edx
add ecx, eax
mov edx, ecx
and edx, 0x18c28555
mov edi, ecx
and edi, 2
mov ebx, edi
xor ebx, 2
imul ebx, edx
or edx, 2
imul edx, edi
xor ecx, 0x57
add ecx, ebx
add ecx, edx
inc cl
mov byte [esp + eax + 0x633d7a1f], cl
inc eax
cmp eax, 0x9cc2865a
jne 0x409830
lea ebp, [esp + 0x74]
mov ecx, esi
push 0x4482e0
push ebp
mov edi, dword [esp + 0x10]
push edi
call fcn.00409070
mov dword [esp + 0x74], 0xad48423a
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, eax
add cl, 0x7a
xor cl, byte [esp + eax + 0x74]
add cl, 0x30
mov byte [esp + eax + 0x74], cl
inc eax
cmp eax, 4
jne 0x4098a0
lea eax, [esp + 2]
mov dword [esp + 4], esi
mov ecx, esi
push eax
push ebp
push edi
call fcn.00409070
mov eax, dword [0x442010]
mov dword [esp + 0xc], eax
mov dword [esp + 0x74], 0x70dbc7c1
mov ecx, 0x99ff725f
nop
nop
movzx edi, byte [ebp]
mov edx, ecx
and edx, 0x8155004b
mov ebx, 0x8020
sub ebx, edx
mov edx, ebx
and edx, edi
mov eax, edx
and eax, 0xffffffdd
mov esi, edx
and esi, 2
or edx, 2
imul edx, esi
xor esi, 2
imul esi, eax
add edx, esi
add ebx, edi
mov eax, ebx
not eax
and eax, edx
not edx
and edx, ebx
sub edx, eax
add dl, 0x58
mov byte [ebp], dl
inc ebp
dec ecx
cmp ecx, 0x99ff725b
jne 0x4098e0
lea ebp, [esp + 0x74]
mov ecx, dword [esp + 4]
push dword [esp + 0xc]
push ebp
mov ebx, dword [esp + 0x10]
push ebx
call fcn.00409070
mov dword [esp + 0x74], 0x1ae319e8
mov dword [esp + 0x78], 0xe114ed10
mov dword [esp + 0x7c], 0x131215e0
mov byte [esp + 0x80], 0x77
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edi, byte [esp + eax + 0x74]
mov ecx, eax
and ecx, 0xd
xor ecx, 0xca95ab9d
mov edx, eax
and edx, 2
sub edx, ecx
lea ecx, [edi + edi]
not ecx
add ecx, edi
not edi
or ecx, edi
and ecx, edx
or edi, edx
lea edx, [edi + edi]
not edx
add edx, edi
or edx, ecx
lea ecx, [edx + 0x54ad5ce7]
mov esi, ecx
and esi, 1
mov edi, 0x18
sub edi, edx
and edi, 0x4a
and ecx, 0xb5
or ecx, edi
xor ecx, 0x4b
lea ecx, [ecx + esi*2]
mov byte [esp + eax + 0x74], cl
inc eax
cmp eax, 0xd
jne 0x409970
mov dword [esp + 0x1a], 0x2f9a8e8d
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, byte [esp + eax + 0x1a]
mov edx, eax
or edx, 0xe8ac44c
and edx, ecx
add edx, edx
neg edx
add edx, eax
add edx, 0xe8ac44c
add dl, cl
add dl, 0xa0
mov byte [esp + eax + 0x1a], dl
mov ecx, eax
and ecx, 1
xor eax, 1
lea eax, [eax + ecx*2]
cmp eax, 4
jb 0x4099e0
lea eax, [esp + 0x1a]
mov ecx, dword [esp + 4]
push ebp
push eax
push ebx
call fcn.00409070
mov dword [esp + 0x74], 0xb78d89b9
mov byte [esp + 0x78], 0x13
mov eax, 0x27
mov ecx, 0xd8
nop
nop
nop
nop
nop
movzx esi, byte [esp + eax + 0x4d]
mov edx, ecx
xor edx, eax
and edx, esi
xor edx, eax
add dl, 0xc8
mov byte [esp + eax + 0x4d], dl
inc eax
dec ecx
cmp eax, 0x2c
jne 0x409a40
mov esi, dword [esp + 4]
mov ecx, esi
push dword [esp + 0x14]
push dword [esp + 0x14]
push ebp
push ebx
call fcn.00409360
mov dword [esp + 0x1a], 0x93fd91d3
mov dword [esp + 0x1e], 0x97e295fa
mov dword [esp + 0x22], 0x9bf499fd
mov dword [esp + 0x26], 0x9fb39de8
mov dword [esp + 0x2a], 0xa3dba1f4
mov dword [esp + 0x2e], 0xa7c3a5d4
mov dword [esp + 0x32], 0xab8aa992
mov dword [esp + 0x36], 0xafdbadc1
mov dword [esp + 0x3a], 0xb3c6b1dc
mov dword [esp + 0x3e], 0xb7c6b5dd
mov dword [esp + 0x42], 0xbbc8b9d9
mov dword [esp + 0x46], 0xbf91bdc8
mov dword [esp + 0x4a], 0xc3adc1a6
mov dword [esp + 0x4e], 0xc7abc5b6
mov dword [esp + 0x52], 0xcbaec9e5
mov dword [esp + 0x56], 0xcfbacdad
mov dword [esp + 0x5a], 0xd3e9d1b1
mov dword [esp + 0x5e], 0xd7b4d5f4
mov dword [esp + 0x62], 0xdbafd9b7
mov dword [esp + 0x66], 0xdfbaddb2
mov dword [esp + 0x6a], 0xe390e181
mov dword [esp + 0x6e], 0xe7dbe59d
mov word [esp + 0x72], 0xe9e8
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
mov edx, eax
xor edx, 0xa93c2def
mov ecx, eax
or ecx, 0x10
and ecx, edx
mov edx, ecx
and edx, 2
mov edi, ecx
or ecx, 2
imul ecx, edx
xor edx, 2
and edi, 0x7d
imul edi, edx
mov edx, eax
xor edx, 0x56c3d210
add edx, ecx
add edx, edi
lea ecx, [edx + edx]
not ecx
add ecx, edx
and ecx, 0x72
and edx, 0x8d
or edx, ecx
xor dl, byte [esp + eax + 0x1a]
xor dl, 0xf2
mov byte [esp + eax + 0x1a], dl
inc eax
cmp eax, 0x5a
jne 0x409b30
movzx eax, word [esp + 0x1a]
test ax, ax
je 0x409bb2
lea ebp, [esp + 0x74]
lea ecx, [esp + 0x1c]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [ebp], ax
add ebp, 2
movzx eax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409ba0
mov word [ebp], 0
movzx ecx, byte [esi + 0x60]
test cl, cl
je 0x409be2
lea eax, [esi + 0x61]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movsx ecx, cl
mov word [ebp], cx
add ebp, 2
movzx ecx, byte [eax]
inc eax
test cl, cl
jne 0x409bd0
mov dword [ebp], 0xa000d
mov word [ebp + 4], 0
mov eax, dword [esi + 0x80]
mov dword [esp + 0x1a], 0x5af858b8
mov dword [esp + 0x1e], 0x5ec45ccb
mov word [esp + 0x22], 0x505f
xor ecx, ecx
nop
nop
mov edx, ecx
add dl, 0x9f
xor dl, byte [esp + ecx + 0x1a]
add dl, 8
mov byte [esp + ecx + 0x1a], dl
inc ecx
cmp ecx, 0xa
jne 0x409c10
lea ecx, [esp + 0x74]
push 0x493e0
push eax
push ebx
push 0
push 0
push ecx
lea eax, [esp + 0x32]
push eax
call fcn.0040c350
add esp, 0x1c
mov ecx, ebx
mov ebx, eax
push ecx
call fcn.00408000
add esp, 4
mov eax, dword [esi + 0x80]
add dword [esi + 4], eax
mov dword [esi + 0x80], 0
jmp 0x409c67
mov bl, 1
mov eax, ebx
add esp, 0x110
pop esi
pop edi
pop ebx
pop ebp
ret