Function at 0x409770
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x54
mov edx, dword [esp + 0x70]
mov esi, dword [esp + 0x6c]
mov eax, dword [esp + 0x68]
mov dword [esp + 0xc], eax
mov dword [esp + 0x20], ecx
mov eax, dword [ecx + 0x80]
mov dword [esp + 0x1c], eax
mov word [esp + 4], 0x1715
mov byte [esp + 6], 0x1e
mov word [esp + 7], 0
mov byte [esp + 9], 0
xor ebp, ebp
mov ebx, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, byte [esp + ebp + 4]
lea edi, [ebp + 0x7a]
and edi, eax
add edi, edi
mov ecx, ebp
sub ecx, edi
add cl, al
add cl, 0x18
mov byte [esp + ebp + 4], cl
mov eax, ebp
xor ebx, 1
add ebx, ebp
and ebp, 1
and eax, 6
add ebx, ebp
sub ebx, eax
mov ebp, ebx
cmp ebx, 6
jb 0x4097c0
mov dword [esp + 0x10], 0x8a8c88b2
mov dword [esp + 0x14], 0xa78e
mov byte [esp + 0x18], 0
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, ebx
add al, 0x1b
xor al, byte [esp + ebx + 0x10]
add al, 0x79
mov byte [esp + ebx + 0x10], al
inc ebx
cmp ebx, 9
jne 0x409810
mov dword [esp + 0x24], 0xa08b4543
mov dword [esp + 0x28], 0xbbb5a7be
mov dword [esp + 0x2c], 0xb29278a0
mov dword [esp + 0x30], 0xa8ababad
mov dword [esp + 0x34], 0x90b5abb7
mov dword [esp + 0x38], 0x8342598e
mov dword [esp + 0x3c], 0x46899595
mov dword [esp + 0x40], 0x8e9e888c
mov dword [esp + 0x44], 0x92804f51
mov dword [esp + 0x48], 0x574d949f
mov byte [esp + 0x4c], 0x74
mov dword [esp + 0x4d], 0
mov dword [esp + 0x50], 0
xor ebx, ebx
xor ebp, ebp
nop
nop
nop
movzx ecx, byte [esp + ebp + 0x24]
mov edi, ebx
and edi, 0x1a
mov eax, ebp
xor eax, 0xdf684f8d
add eax, edi
mov edi, eax
and edi, ecx
add eax, ecx
add edi, edi
sub eax, edi
add al, 0x3f
mov byte [esp + ebp + 0x24], al
inc ebp
add ebx, 2
cmp ebp, 0x30
jne 0x409890
mov eax, dword [esp + 0x1c]
add dword [esp + 0xc], eax
mov dword [esp], 0x8a787f
mov edi, 0xc5a68463
movzx eax, byte [esp + edi + 0x3a597b9d]
mov ebx, edi
and ebx, eax
add ebx, ebx
add eax, edi
mov ecx, ebx
xor ecx, eax
not ebx
and ebx, eax
add ebx, ebx
sub ebx, ecx
mov eax, ebx
and eax, 0x10
xor ebx, 0x10
lea eax, [ebx + eax*2]
inc al
mov byte [esp + edi + 0x3a597b9d], al
inc edi
cmp edi, 0xc5a68467
jne 0x4098d0
movzx ebx, byte [esp]
mov ecx, dword [esp + 0xc]
mov edi, ecx
test bl, bl
je 0x40992c
lea ebp, [esp + 1]
mov edi, ecx
nop
nop
nop
mov byte [edi], bl
inc edi
movzx ebx, byte [ebp]
inc ebp
test bl, bl
jne 0x409920
mov byte [edi], 0
mov eax, dword [esp + 0x20]
movzx ebx, byte [eax + 0x60]
test bl, bl
je 0x40994c
lea ebp, [eax + 0x61]
nop
nop
mov byte [edi], bl
inc edi
movzx ebx, byte [ebp]
inc ebp
test bl, bl
jne 0x409940
mov byte [edi], 0
movzx ebx, byte [esp + 0x24]
test bl, bl
je 0x40996c
lea ebp, [esp + 0x25]
nop
nop
nop
nop
mov byte [edi], bl
inc edi
movzx ebx, byte [ebp]
inc ebp
test bl, bl
jne 0x409960
mov byte [edi], 0
movzx ebx, byte [esi]
test bl, bl
je 0x40998b
inc esi
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 0x409980
mov byte [edi], 0
movzx ebx, byte [esp + 0x10]
test bl, bl
je 0x4099ab
lea esi, [esp + 0x11]
nop
nop
nop
nop
nop
mov byte [edi], bl
inc edi
movzx ebx, byte [esi]
inc esi
test bl, bl
jne 0x4099a0
mov byte [edi], 0
movzx ebx, byte [edx]
test bl, bl
je 0x4099cb
inc edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edi], bl
inc edi
movzx ebx, byte [edx]
inc edx
test bl, bl
jne 0x4099c0
mov byte [edi], 0
movzx edx, byte [esp + 4]
test dl, dl
je 0x4099eb
lea esi, [esp + 5]
nop
nop
nop
nop
nop
mov byte [edi], dl
inc edi
movzx edx, byte [esi]
inc esi
test dl, dl
jne 0x4099e0
mov byte [edi], 0
sub edi, ecx
add dword [eax + 0x80], edi
add esp, 0x54
pop esi
pop edi
pop ebx
pop ebp
ret 0xc