Function at 0x40db8c
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
lea edx, [eax + 0x1507]
lea ebx, [eax + 0x9cc]
xor ecx, 0x1ce6
push esi
lea eax, [edx - 0x777]
push edi
mov edi, dword [esp + 0x20]
cmp ebx, eax
je 0x40dbf4
mov esi, dword [0x49e0e4]
mov eax, dword [edi + 0x38]
cmp eax, dword [esi + 0x54]
jae 0x40dbd9
mov eax, dword [edi + 0x10]
sub eax, 0x108bb7
mov dword [0x4a4dd4], eax
jmp 0x40dbe3
mov dword [esi + 0xd8], 0x2367a
mov eax, dword [edi + 0xe4]
sub eax, dword [edi + 4]
add eax, 0x4f7274ca
mov dword [edi + 0x5c], eax
mov eax, edx
xor eax, 0xccb
cmp ebx, eax
jg 0x40ddc1
lea eax, [ebp - 0x3c4]
cmp ecx, eax
jge 0x40dd89
mov eax, dword [edi + 0x10]
cmp eax, dword [edi + 0x38]
mov eax, dword [0x49e0e4]
ja 0x40dc31
mov eax, dword [eax + 0x10]
sub eax, dword [0x4a4d20]
sub eax, 0x2bb78
mov dword [edi + 0x7c], eax
jmp 0x40dc3b
mov dword [eax + 0x9c], 0x410050
add ebp, 0xfffff3a8
mov dword [esp + 0x14], ebp
xor ebp, ebp
mov ecx, dword [edi + 0x68]
push 5
lea eax, [ecx + 1]
imul eax, dword [edi + 0x10]
mov dword [edi + 0x10], eax
xor eax, eax
xor ecx, dword [0x4a4dc4]
inc eax
sub eax, ecx
add dword [edi + 0x1c], eax
mov eax, dword [0x49e0e4]
mov ebx, dword [edi + 0x5c]
mov eax, dword [eax + 0x9c]
mov ecx, dword [eax + ebp]
mov eax, 0x18b44f
sub eax, dword [0x4a4da0]
add ebp, 4
add dword [edi + 0x98], eax
imul ebx, ecx
mov ecx, dword [0x49e0e4]
pop eax
sub eax, dword [edi + 0xa0]
add dword [ecx + 0x98], eax
mov edx, ebx
mov eax, dword [edi + 0x28]
sub eax, dword [0x4a4da8]
xor eax, 1
shr edx, 0x10
imul eax, dword [edi + 0x68]
mov dword [edi + 0x68], eax
mov eax, dword [0x49e0e4]
mov ecx, dword [eax + 0x60]
mov eax, dword [edi + 0xa4]
mov byte [ecx + eax], dl
mov edx, ebx
mov eax, dword [0x49e0e4]
shr edx, 8
inc dword [eax + 0x60]
mov eax, dword [edi + 0x7c]
xor eax, 0xfffd43e4
imul eax, dword [edi + 0xc]
mov dword [edi + 0xc], eax
mov esi, dword [0x49e0e4]
mov eax, dword [esi + 0xc]
add eax, dword [edi + 0xa8]
xor eax, 0x3291e3
add dword [0x4a4d74], eax
mov ecx, dword [esi + 0xa4]
mov eax, dword [esi + 0x60]
mov byte [ecx + eax], dl
mov eax, dword [0x49e0e4]
inc dword [eax + 0x60]
mov eax, dword [edi + 0x3c]
sub eax, 0x12
add dword [edi + 0x70], eax
mov eax, dword [edi + 0xe4]
add eax, dword [edi + 0x1c]
xor eax, 0x78d29
imul eax, dword [edi + 0xb0]
mov dword [edi + 0xb0], eax
mov eax, dword [0x49e0e4]
mov eax, dword [eax + 4]
sub eax, 0x73fbd
add dword [edi + 0x68], eax
mov eax, dword [0x49e0e4]
mov ecx, dword [eax + 0x3c]
mov eax, dword [edi + 0x54]
add ecx, 0xffffff9c
add eax, ecx
mov ecx, dword [edi + 0xa4]
imul eax, dword [edi + 0xa0]
mov dword [edi + 0xa0], eax
mov eax, dword [0x4a4d58]
mov byte [eax + ecx], bl
inc dword [0x4a4d58]
cmp ebp, 0x131c0
jl 0x40dc47
mov ebp, dword [esp + 0x14]
jmp 0x40ddc1
mov eax, dword [0x49e0e4]
mov esi, edx
mov ecx, dword [eax + 0xa8]
sub ecx, dword [edi + 0x90]
or ecx, 0x250c
cmp edx, ecx
jbe 0x40ddc1
mov ebx, dword [edi + 0x68]
xor ebx, edx
cmp edx, ebx
je 0x40ddba
mov eax, dword [edi + 0xc8]
add eax, dword [edi + 0x14]
or ebp, eax
add esi, 3
cmp esi, ecx
ja 0x40ddab
pop edi
pop esi
lea eax, [ebp - 0x138]
pop ebp
pop ebx
ret