Function at 0x40d790
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 dword [esp], 0x7e6563
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, eax
add cl, 0x95
xor cl, byte [esp + eax]
add cl, 0x17
mov byte [esp + eax], cl
inc eax
cmp eax, 4
jne 0x40d7c0
mov dword [esp + 0xc], 0xc6c8c4d2
mov word [esp + 0x10], 0x2dd6
mov dword [esp + 0x12], 0
mov word [esp + 0x16], 0
mov ebx, 0xddca724c
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, byte [esp + ebx + 0x22358dc0]
xor ecx, ebx
mov eax, ecx
and eax, 3
add eax, eax
xor ecx, 0x7c
sub eax, ecx
mov byte [esp + ebx + 0x22358dc0], al
inc ebx
cmp ebx, 0xddca7258
jne 0x40d800
mov dword [esp + 0x20], 0x681fc5d7
mov dword [esp + 0x24], 0x6f656b6a
mov dword [esp + 0x28], 0x6e162068
mov dword [esp + 0x2c], 0x60676765
mov dword [esp + 0x30], 0x18151f6b
mov dword [esp + 0x34], 0x174e611a
mov dword [esp + 0x38], 0x5211151d
mov dword [esp + 0x3c], 0x2120004
mov dword [esp + 0x40], 0x1e085b69
mov dword [esp + 0x44], 0x5b7d040b
mov byte [esp + 0x48], 0xbc
mov dword [esp + 0x49], 0
mov byte [esp + 0x4d], 0
xor eax, eax
nop
nop
nop
nop
nop
nop
mov ecx, eax
add cl, 0xaf
xor cl, byte [esp + eax + 0x20]
add cl, 0x95
mov byte [esp + eax + 0x20], cl
inc eax
cmp eax, 0x2e
jne 0x40d890
add edx, edi
mov dword [esp + 0x18], edx
mov word [esp + 4], 3
mov byte [esp + 6], 0x3e
mov word [esp + 7], 0
xor edi, edi
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, byte [esp + edx + 4]
mov ecx, edi
and ecx, 0xa
mov ebx, edx
xor ebx, 0xf795bb35
add ebx, ecx
lea ebp, [ebx + ebx]
not ebp
add ebp, ebx
xor ebp, ebx
and ebp, eax
xor ebp, ebx
lea eax, [ebp + 0x76]
mov ecx, 2
sub ecx, ebp
sub ecx, ebp
not ecx
and ecx, 2
mov ebx, 9
sub ebx, ebp
and ebx, 0x8c
and eax, 0x73
or eax, ebx
xor eax, 0x8d
add eax, ecx
mov byte [esp + edx + 4], al
inc edx
add edi, 2
cmp edx, 5
jne 0x40d8d0
movzx ebx, byte [esp + 4]
mov ebp, dword [esp + 0x18]
mov edi, ebp
test bl, bl
je 0x40d94b
lea eax, [esp + 5]
mov edi, ebp
nop
nop
nop
mov byte [edi], bl
inc edi
movzx ebx, byte [eax]
inc eax
test bl, bl
jne 0x40d940
mov byte [edi], 0
mov ecx, dword [esp + 0x1c]
movzx eax, byte [ecx + 0x60]
test al, al
je 0x40d96b
lea ebx, [ecx + 0x61]
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [ebx]
inc ebx
test al, al
jne 0x40d960
mov byte [edi], 0
movzx eax, byte [esp + 0x20]
test al, al
je 0x40d98b
lea ebx, [esp + 0x21]
nop
nop
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [ebx]
inc ebx
test al, al
jne 0x40d980
mov byte [edi], 0
movzx ebx, byte [esi]
test bl, bl
je 0x40d9ab
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 0x40d9a0
mov byte [edi], 0
movzx eax, byte [esp + 0xc]
test al, al
je 0x40d9cb
lea esi, [esp + 0xd]
nop
nop
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [esi]
inc esi
test al, al
jne 0x40d9c0
mov byte [edi], 0
mov eax, dword [esp + 0x6c]
movzx ebx, byte [eax]
test bl, bl
je 0x40d9eb
inc eax
nop
nop
nop
nop
nop
nop
mov byte [edi], bl
inc edi
movzx ebx, byte [eax]
inc eax
test bl, bl
jne 0x40d9e0
mov byte [edi], 0
movzx eax, byte [esp]
test al, al
je 0x40da0b
lea edx, [esp + 1]
nop
nop
nop
nop
nop
nop
mov byte [edi], al
inc edi
movzx eax, byte [edx]
inc edx
test al, al
jne 0x40da00
mov byte [edi], 0
sub edi, ebp
add dword [ecx + 0x80], edi
add esp, 0x50
pop esi
pop edi
pop ebx
pop ebp
ret 0xc