Function at 0x40d900
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x54
mov esi, dword [esp + 0x6c]
mov dword [esp + 0x20], ecx
mov eax, dword [ecx + 0x80]
mov dword [esp + 0x1c], eax
mov word [esp + 8], 0xb0d
mov byte [esp + 0xa], 2
mov dword [esp + 0xb], 0
xor edx, edx
mov edi, 0xb73a27bf
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, byte [esp + edx + 8]
mov ebp, edi
or ebp, ecx
lea eax, [edi + 0x50000000]
and eax, 0x52222ac
mov ebx, edx
and ebx, 3
or ebx, eax
xor ebx, 0xb2180513
lea eax, [edi + 0x48c5d900]
xor eax, ebx
add eax, ebx
and ebx, edx
sub eax, ebx
and eax, ecx
not ebp
or ebp, eax
mov eax, ebp
not eax
or eax, 0x3f
add eax, ebp
lea ecx, [ebp*2]
and ecx, 0x7e
sub ebp, ecx
lea eax, [eax*2]
add eax, ebp
add al, 0xc2
mov byte [esp + edx + 8], al
inc edx
dec edi
cmp edx, 7
jne 0x40d940
mov dword [esp + 0x10], 0x7e04006e
mov word [esp + 0x14], 0x737a
mov dword [esp + 0x16], 0
mov byte [esp + 0x1a], 0
lea ebx, [esp + 0x10]
mov ebp, 0x42
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, byte [ebx]
lea edx, [ecx + ecx]
not edx
add edx, ecx
mov eax, edx
xor eax, ecx
sub eax, edx
and edx, ecx
add eax, edx
or eax, ebp
and ecx, ebp
not eax
or eax, ecx
add al, 0x4f
mov byte [ebx], al
inc ebx
dec ebp
cmp ebp, 0x37
jne 0x40d9d0
mov dword [esp + 0x24], 0x1c217b7d
mov dword [esp + 0x28], 0x1903111a
mov dword [esp + 0x2c], 0x23e440c
mov dword [esp + 0x30], 0xc010d0f
mov dword [esp + 0x34], 0xc0b0509
mov dword [esp + 0x38], 0x11563f0a
mov dword [esp + 0x3c], 0xb6f7fbf7
mov dword [esp + 0x40], 0xeefaece8
mov dword [esp + 0x44], 0xe2fca1cb
mov dword [esp + 0x48], 0xa5cbe0f9
mov byte [esp + 0x4c], 0x98
mov dword [esp + 0x4d], 0
mov word [esp + 0x51], 0
mov edi, 0x49d7dc68
movzx eax, byte [esp + edi - 0x49d7dc44]
mov ecx, edi
or ecx, eax
not eax
mov edx, edi
or edx, eax
sub eax, edx
add eax, ecx
add al, 0xf8
mov byte [esp + edi - 0x49d7dc44], al
inc edi
cmp edi, 0x49d7dc97
jne 0x40da60
mov ebp, dword [esp + 0x68]
add ebp, dword [esp + 0x1c]
mov word [esp], 0x7c7d
mov byte [esp + 2], 0x56
mov dword [esp + 3], 0
mov ecx, 0x2ce82c0e
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [esp + ecx - 0x2ce82c0e]
lea edi, [ecx - 0x2ce82c00]
and edi, edx
or edx, ecx
lea eax, [edi + edi]
not eax
add eax, edi
and eax, edx
mov edx, eax
not edx
and edx, 0x47
and eax, 0xb8
sub eax, edx
inc al
mov byte [esp + ecx - 0x2ce82c0e], al
inc ecx
cmp ecx, 0x2ce82c15
jne 0x40dab0
movzx ecx, byte [esp]
mov edi, ebp
test cl, cl
je 0x40db0b
lea ebx, [esp + 1]
mov edi, ebp
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [ebx]
inc ebx
test cl, cl
jne 0x40db00
mov byte [edi], 0
mov eax, dword [esp + 0x20]
movzx ecx, byte [eax + 0x60]
test cl, cl
mov edx, dword [esp + 0x70]
je 0x40db3b
lea ebx, [eax + 0x61]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [ebx]
inc ebx
test cl, cl
jne 0x40db30
mov byte [edi], 0
movzx ecx, byte [esp + 0x24]
test cl, cl
je 0x40db5b
lea ebx, [esp + 0x25]
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [ebx]
inc ebx
test cl, cl
jne 0x40db50
mov byte [edi], 0
movzx ecx, byte [esi]
test cl, cl
je 0x40db7b
inc esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [esi]
inc esi
test cl, cl
jne 0x40db70
mov byte [edi], 0
movzx ecx, byte [esp + 0x10]
test cl, cl
je 0x40db9b
lea esi, [esp + 0x11]
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [esi]
inc esi
test cl, cl
jne 0x40db90
mov byte [edi], 0
movzx ecx, byte [edx]
test cl, cl
je 0x40dbbb
inc edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [edx]
inc edx
test cl, cl
jne 0x40dbb0
mov byte [edi], 0
movzx ecx, byte [esp + 8]
test cl, cl
je 0x40dbdb
lea edx, [esp + 9]
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [edx]
inc edx
test cl, cl
jne 0x40dbd0
mov byte [edi], 0
sub edi, ebp
add dword [eax + 0x80], edi
add esp, 0x54
pop esi
pop edi
pop ebx
pop ebp
ret 0xc