Function at 0x409170
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x50
mov esi, dword [esp + 0x68]
mov edx, dword [esp + 0x64]
mov dword [esp + 0x1c], ecx
mov edi, dword [ecx + 0x80]
mov word [esp + 4], 0x1b1d
mov byte [esp + 6], 0x22
mov word [esp + 7], 0
xor ebp, ebp
nop
nop
movzx eax, byte [esp + ebp + 4]
mov ebx, ebp
or ebx, eax
or ebx, 0xc5ca3af8
lea ecx, [ebp + 0xf8]
and ecx, eax
sub ebx, ecx
mov eax, 0xd8
sub eax, ebx
not ebx
and ebx, 1
or eax, 1
sub ebx, eax
mov byte [esp + ebp + 4], bl
inc ebp
cmp ebp, 5
jne 0x4091a0
mov dword [esp + 0x10], 0xe080c22
mov dword [esp + 0x14], 0x50e
mov byte [esp + 0x18], 0
xor ebx, ebx
nop
nop
nop
nop
nop
movzx eax, byte [esp + ebx + 0x10]
lea ecx, [ebx + 0x5c5b2a40]
and ecx, eax
add cl, cl
sub al, cl
movzx eax, al
add eax, ebx
mov byte [esp + ebx + 0x10], al
inc ebx
cmp ebx, 9
jne 0x4091f0
mov dword [esp + 0x20], 0xa4714b45
mov dword [esp + 0x24], 0xb9b3a1ba
mov dword [esp + 0x28], 0xb2967ca4
mov dword [esp + 0x2c], 0xb4b1b5b7
mov dword [esp + 0x30], 0xb4bbadb9
mov dword [esp + 0x34], 0x817e578a
mov dword [esp + 0x38], 0x4e8f8b8f
mov dword [esp + 0x3c], 0xb69ab488
mov dword [esp + 0x40], 0xb284715b
mov dword [esp + 0x44], 0x6d4b9099
mov byte [esp + 0x48], 8
mov dword [esp + 0x49], 0
mov dword [esp + 0x4c], 0
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, eax
add cl, 0xc
xor cl, byte [esp + eax + 0x20]
add cl, 0xc4
mov byte [esp + eax + 0x20], cl
inc eax
cmp eax, 0x30
jne 0x409280
add edx, edi
mov dword [esp + 0xc], edx
mov dword [esp], 0xca181f
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebp, byte [esp + edi]
lea eax, [edi - 0x5196474d]
mov ecx, 0x5196474c
sub ecx, edi
mov ebx, ecx
or ebx, ebp
and ecx, 0x4196024a
and eax, 0xa041b8a5
or eax, ecx
xor eax, 0xb041fda5
mov ecx, 0x4c
sub ecx, edi
lea edx, [edi + 0xb3]
and edx, eax
xor ecx, eax
add ecx, eax
sub ecx, edx
and ecx, ebp
not ebx
or ebx, ecx
mov eax, ebx
and eax, 0xfe
xor eax, 0x81
and ebx, 1
sub eax, ebx
lea eax, [eax + ebx*2]
mov byte [esp + edi], al
mov eax, edi
and eax, 1
xor edi, 1
lea edi, [edi + eax*2]
cmp edi, 4
jb 0x4092b0
movzx ebx, byte [esp]
mov ecx, dword [esp + 0xc]
mov edi, ecx
test bl, bl
je 0x40933b
lea eax, [esp + 1]
mov edi, ecx
nop
nop
nop
mov byte [edi], bl
inc edi
movzx ebx, byte [eax]
inc eax
test bl, bl
jne 0x409330
mov byte [edi], 0
mov ecx, dword [esp + 0x1c]
movzx ebx, byte [ecx + 0x60]
test bl, bl
je 0x40935b
lea eax, [ecx + 0x61]
nop
nop
nop
mov byte [edi], bl
inc edi
movzx ebx, byte [eax]
inc eax
test bl, bl
jne 0x409350
mov byte [edi], 0
movzx ebx, byte [esp + 0x20]
test bl, bl
je 0x40937b
lea eax, [esp + 0x21]
nop
nop
nop
nop
nop
mov byte [edi], bl
inc edi
movzx ebx, byte [eax]
inc eax
test bl, bl
jne 0x409370
mov byte [edi], 0
movzx ebx, byte [esi]
test bl, bl
je 0x40939b
inc esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edi], bl
inc edi
movzx ebx, byte [esi]
inc esi
test bl, bl
jne 0x409390
mov byte [edi], 0
movzx ebx, byte [esp + 0x10]
test bl, bl
je 0x4093bb
lea eax, [esp + 0x11]
nop
nop
nop
nop
nop
mov byte [edi], bl
inc edi
movzx ebx, byte [eax]
inc eax
test bl, bl
jne 0x4093b0
mov byte [edi], 0
mov eax, dword [esp + 0x6c]
movzx ebx, byte [eax]
test bl, bl
je 0x4093db
inc eax
nop
nop
nop
nop
nop
nop
mov byte [edi], bl
inc edi
movzx ebx, byte [eax]
inc eax
test bl, bl
jne 0x4093d0
mov byte [edi], 0
movzx edx, byte [esp + 4]
test dl, dl
je 0x4093fb
lea eax, [esp + 5]
nop
nop
nop
nop
nop
mov byte [edi], dl
inc edi
movzx edx, byte [eax]
inc eax
test dl, dl
jne 0x4093f0
mov byte [edi], 0
mov eax, edi
mov edx, dword [esp + 0xc]
xor eax, edx
not edx
and edx, edi
add edx, edx
sub edx, eax
add dword [ecx + 0x80], edx
add esp, 0x50
pop esi
pop edi
pop ebx
pop ebp
ret 0xc