Function at 0x40d980
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x80
mov ebx, dword [esp + 0x98]
mov dword [esp + 8], ecx
mov eax, dword [ecx + 0x80]
mov dword [esp + 4], eax
mov dword [esp + 0x14], 0x2d282ac1
mov dword [esp + 0x18], 0xee2a2d23
mov dword [esp + 0x1c], 0x2a223cc8
mov dword [esp + 0x20], 0x21d197fe
mov dword [esp + 0x24], 0x31cfcc20
mov dword [esp + 0x28], 0x393c343b
mov dword [esp + 0x2c], 0x30f12bfd
mov dword [esp + 0x30], 0xc03d39c6
mov dword [esp + 0x34], 0xeae4e830
mov word [esp + 0x38], 0xdfe6
mov dword [esp + 0x3a], 0
mov word [esp + 0x3e], 0
xor ebp, ebp
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [esp + edi + 0x14]
mov esi, ebp
and esi, 0x3e
mov eax, edi
xor eax, 0xb194d1f
add eax, esi
xor eax, edx
mov edx, eax
xor edx, 0x391b28d9
and eax, 0x2004526
add eax, eax
sub eax, edx
add eax, 0x19ca73d
mov edx, eax
and edx, 0x49
add edx, edx
xor eax, 0xb6
sub edx, eax
add dl, 0xb7
mov byte [esp + edi + 0x14], dl
inc edi
add ebp, 2
cmp edi, 0x2c
jne 0x40da10
mov dword [esp + 0xc], 0xf700fce6
mov word [esp + 0x10], 0
xor esi, esi
xor edi, edi
nop
nop
nop
nop
movzx eax, byte [esp + edi + 0xc]
mov edx, edi
xor edx, 0xac075a02
mov ebp, esi
and ebp, 0xa
sub ebp, edx
xor ebp, eax
mov eax, ebp
and eax, 9
xor ebp, 9
lea eax, [eax*2]
add eax, ebp
inc al
mov byte [esp + edi + 0xc], al
inc edi
add esi, 2
cmp edi, 6
jne 0x40da70
mov dword [esp + 0x40], 0x98ef2537
mov dword [esp + 0x44], 0x9f859b9a
mov dword [esp + 0x48], 0x9ef6c098
mov dword [esp + 0x4c], 0x80878785
mov dword [esp + 0x50], 0x88958f9b
mov dword [esp + 0x54], 0x97dec18a
mov dword [esp + 0x58], 0xf2b1b58d
mov dword [esp + 0x5c], 0xa2b2a0a4
mov dword [esp + 0x60], 0xaeb8ebf9
mov dword [esp + 0x64], 0xebcda4bb
mov dword [esp + 0x68], 0xbabebca6
mov dword [esp + 0x6c], 0xbff6eaf6
mov dword [esp + 0x70], 0xabb1b7bb
mov dword [esp + 0x74], 0xdeb5acbf
mov word [esp + 0x78], 0xe3fa
mov dword [esp + 0x7a], 0
mov esi, 0xc8
mov edi, 0x38
mov ecx, dword [esp + 0x94]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [esp + esi - 0x88]
mov ebp, edi
and ebp, edx
lea eax, [edx + edx]
not eax
add eax, edx
or eax, edi
add eax, esi
or eax, ebp
add al, 0x1d
mov byte [esp + esi - 0x88], al
inc esi
dec edi
cmp esi, 0x106
jne 0x40db40
add ecx, dword [esp + 4]
mov dword [esp], 0x7a282f
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
movzx esi, byte [esp + edx]
mov edi, edx
and edi, 2
mov eax, edx
or eax, 2
imul eax, edi
xor edi, 2
mov ebp, edx
and ebp, 1
neg ebp
and ebp, edi
mov edi, edx
xor edi, 0x1f3791eb
add edi, ebp
add edi, eax
xor edi, esi
mov eax, 0x97
sub eax, edi
or eax, 1
mov esi, edi
add eax, edi
and edi, 1
xor esi, 1
add esi, 0x68
or esi, edi
add eax, esi
add al, 0x69
mov byte [esp + edx], al
inc edx
cmp edx, 4
jne 0x40db80
movzx eax, byte [esp]
mov edx, ecx
test al, al
je 0x40dbfb
lea esi, [esp + 1]
mov edx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edx], al
inc edx
movzx eax, byte [esi]
inc esi
test al, al
jne 0x40dbf0
mov dword [esp + 4], ecx
mov byte [edx], 0
mov ecx, dword [esp + 8]
movzx eax, byte [ecx + 0x60]
test al, al
je 0x40dc2b
lea esi, [ecx + 0x61]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edx], al
inc edx
movzx eax, byte [esi]
inc esi
test al, al
jne 0x40dc20
mov byte [edx], 0
movzx eax, byte [esp + 0x40]
test al, al
je 0x40dc4b
lea esi, [esp + 0x41]
nop
nop
nop
nop
nop
mov byte [edx], al
inc edx
movzx eax, byte [esi]
inc esi
test al, al
jne 0x40dc40
mov byte [edx], 0
movzx eax, byte [ebx]
test al, al
je 0x40dc6b
inc ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edx], al
inc edx
movzx eax, byte [ebx]
inc ebx
test al, al
jne 0x40dc60
mov byte [edx], 0
movzx eax, byte [esp + 0xc]
test al, al
je 0x40dc9d
lea ecx, [esp + 0xd]
mov ebx, dword [esp + 0xa0]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edx], al
inc edx
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x40dc90
jmp 0x40dca4
mov ebx, dword [esp + 0xa0]
mov byte [edx], 0
movzx eax, byte [esp + 0x14]
test al, al
je 0x40dccb
lea ecx, [esp + 0x15]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edx], al
inc edx
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x40dcc0
mov byte [edx], 0
mov ecx, ebx
shr ecx, 2
mov ebp, dword [esp + 0x9c]
mov eax, ebp
mov edi, edx
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov eax, ebx
and eax, 0xfffffffc
lea esi, [edx + eax]
add eax, ebp
mov ecx, ebx
shr ecx, 1
and ecx, 1
mov ebp, eax
mov edi, esi
xchg esi, ebp
rep movsw word es:[edi], word [esi]
xchg esi, ebp
test bl, 1
je 0x40dd0f
mov ecx, ebx
and ecx, 2
movzx eax, byte [eax + ecx]
mov byte [esi + ecx], al
mov dword [esp + 0x40], 0x89878b85
mov byte [esp + 0x44], 0xac
mov dword [esp + 0x45], 0
mov word [esp + 0x49], 0
xor ecx, ecx
xor esi, esi
nop
movzx eax, byte [esp + esi + 0x40]
mov edi, ecx
and edi, 0x18
mov ebp, esi
xor ebp, 0x777f735c
add ebp, edi
xor ebp, eax
mov eax, ebp
and eax, 0x33
xor ebp, 0x33
lea eax, [eax*2]
add eax, ebp
inc al
mov byte [esp + esi + 0x40], al
inc esi
add ecx, 2
cmp esi, 0xb
jne 0x40dd30
mov dword [esp + 0x14], 0xc6c79be5
mov byte [esp + 0x18], 0x9c
mov dword [esp + 0x19], 0
mov dword [esp + 0x1c], 0
xor ecx, ecx
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, byte [esp + esi + 0x14]
mov edi, ecx
and edi, 8
mov ebp, esi
xor ebp, 0xb21102a4
add ebp, edi
xor ebp, eax
add ebp, 0x49b7cdd9
mov eax, ebp
and eax, 1
xor ebp, 1
lea eax, [eax*2]
add eax, ebp
add al, 0xf2
mov byte [esp + esi + 0x14], al
inc esi
add ecx, 2
cmp esi, 0xc
jne 0x40dd90
add edx, ebx
movzx eax, byte [esp + 0x14]
test al, al
je 0x40dded
lea ecx, [esp + 0x15]
mov esi, dword [esp + 8]
nop
mov byte [edx], al
inc edx
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x40dde0
jmp 0x40ddf1
mov esi, dword [esp + 8]
mov byte [edx], 0
movzx eax, byte [esi + 0x60]
test al, al
je 0x40de0b
lea ecx, [esi + 0x61]
nop
mov byte [edx], al
inc edx
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x40de00
mov byte [edx], 0
movzx eax, byte [esp + 0x40]
test al, al
je 0x40de2b
lea ecx, [esp + 0x41]
nop
nop
nop
nop
nop
mov byte [edx], al
inc edx
movzx eax, byte [ecx]
inc ecx
test al, al
jne 0x40de20
mov byte [edx], 0
mov eax, edx
not eax
mov ecx, dword [esp + 4]
and eax, ecx
not ecx
and ecx, edx
sub ecx, eax
add dword [esi + 0x80], ecx
add esp, 0x80
pop esi
pop edi
pop ebx
pop ebp
ret 0x10