Function at 0x435b40
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x24
mov eax, dword [esp + 0x38]
mov esi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
add ecx, esi
sub ecx, dword [esp + 0x48]
mov dword [eax + 8], 0
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [esp + 0x1c], ecx
cmp ecx, esi
jbe 0x435e8a
mov ebp, dword [esp + 0x4c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 0x10], 0
jmp 0x435ba9
add esi, ecx
dec esi
mov eax, dword [esp + 0x38]
inc esi
cmp esi, dword [esp + 0x1c]
jae 0x435e8a
test ebp, ebp
je 0x435c11
movzx eax, byte [ebp]
mov byte [esp + 0x14], 0x4d
lea ecx, [esp + 0x15]
mov dword [ecx + 3], 0
mov dword [ecx], 0
mov ecx, 0x4c4d46bd
nop
nop
nop
nop
movzx edx, byte [esp + ecx - 0x4c4d46a9]
xor edx, ecx
lea edi, [edx + 0x4e]
mov ebx, 0xb1
sub ebx, edx
and edx, 1
and ebx, 0x9c
and edi, 0x63
or edi, ebx
xor edi, 0x9d
lea edx, [edi + edx*2]
mov byte [esp + ecx - 0x4c4d46a9], dl
inc ecx
cmp ecx, 0x4c4d46c5
jne 0x435bd0
cmp al, byte [esp + 0x14]
je 0x435c20
movzx eax, byte [esi]
mov ecx, dword [esp + 0x44]
cmp al, byte [ecx]
jne 0x435b9a
cmp dword [esp + 0x48], 2
jb 0x435cd0
mov ecx, 1
mov dword [esp + 0x20], esi
jmp 0x435c58
movzx eax, byte [esi + ecx]
mov edx, dword [esp + 0x44]
cmp al, byte [edx + ecx]
jne 0x435b97
inc ecx
cmp ecx, dword [esp + 0x48]
je 0x435cd0
test ebp, ebp
je 0x435c40
mov esi, ebp
movzx eax, byte [ebp + ecx]
mov byte [esp + 4], al
mov byte [esp + 0x14], 0xdb
mov dword [esp + 0x15], 0
xor edi, edi
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [esp + eax + 0x14]
mov ebp, eax
xor ebp, 0xd595d3ba
mov ebx, edi
and ebx, 0xa
sub ebx, ebp
xor ebx, edx
mov edx, ebx
and edx, 0x21
xor ebx, 0x2bed22a1
lea edx, [ebx + edx*2]
and ebx, 1
or edx, 1
add edx, ebx
mov byte [esp + eax + 0x14], dl
inc eax
add edi, 2
cmp eax, 5
jne 0x435c80
movzx eax, byte [esp + 4]
cmp al, byte [esp + 0x14]
mov ebp, esi
mov esi, dword [esp + 0x20]
jne 0x435c40
jmp 0x435c51
mov ecx, dword [esp + 0xc]
mov edi, ecx
mov eax, dword [esp + 8]
sub edi, eax
cmp ecx, dword [esp + 0x10]
je 0x435ced
mov edx, eax
mov eax, dword [esp + 0x38]
jmp 0x435e71
mov dword [esp], edi
mov ecx, edi
sar ecx, 2
lea eax, [ecx + 1]
mov edi, ecx
shr edi, 1
add edi, ecx
cmp edi, eax
ja 0x435d04
mov edi, eax
lea eax, [edi*4]
push eax
call fcn.00408680
add esp, 4
mov edx, eax
mov ebx, dword [esp + 8]
test ebx, ebx
mov dword [esp + 4], eax
je 0x435e4a
mov dword [esp + 0x10], edi
cmp edx, ebx
mov eax, dword [esp + 0xc]
jbe 0x435def
cmp eax, edx
jbe 0x435def
cmp dword [esp], 0
je 0x435e36
mov edx, dword [esp]
mov eax, dword [esp + 4]
add eax, edx
dec eax
mov ecx, dword [esp + 8]
add ecx, edx
dec ecx
mov edi, edx
and edi, 7
je 0x435d83
neg edi
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, byte [ecx + edx]
mov byte [eax + edx], bl
dec edx
cmp edi, edx
jne 0x435d70
add ecx, edx
add eax, edx
add edx, dword [esp]
mov edi, dword [esp + 8]
sub edi, dword [esp + 0xc]
cmp edi, 0xfffffff8
ja 0x435e36
neg edx
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, byte [ecx + edi]
mov byte [eax + edi], bl
movzx ebx, byte [ecx + edi - 1]
mov byte [eax + edi - 1], bl
movzx ebx, byte [ecx + edi - 2]
mov byte [eax + edi - 2], bl
movzx ebx, byte [ecx + edi - 3]
mov byte [eax + edi - 3], bl
movzx ebx, byte [ecx + edi - 4]
mov byte [eax + edi - 4], bl
movzx ebx, byte [ecx + edi - 5]
mov byte [eax + edi - 5], bl
movzx ebx, byte [ecx + edi - 6]
mov byte [eax + edi - 6], bl
movzx ebx, byte [ecx + edi - 7]
mov byte [eax + edi - 7], bl
add edi, 0xfffffff8
cmp edx, edi
jne 0x435da0
jmp 0x435e36
mov ecx, dword [esp]
shr ecx, 2
mov eax, ebx
mov edi, edx
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov eax, edx
mov ecx, dword [esp]
mov edx, ecx
and edx, 0xfffffffc
add eax, edx
add edx, ebx
shr ecx, 1
and ecx, 1
mov ebx, edx
mov dword [esp + 0xc], eax
mov edi, eax
xchg esi, ebx
rep movsw word es:[edi], word [esi]
xchg esi, ebx
test byte [esp], 1
je 0x435e36
mov ecx, dword [esp]
and ecx, 2
movzx edx, byte [edx + ecx]
mov eax, dword [esp + 0xc]
mov byte [eax + ecx], dl
push dword [esp + 8]
call fcn.00408690
add esp, 4
mov edi, dword [esp + 0x10]
mov edx, dword [esp + 4]
mov eax, dword [esp + 0x38]
mov dword [eax], edx
lea ecx, [edx + edi*4]
mov edx, dword [esp + 4]
mov edi, dword [esp]
add edx, edi
mov dword [esp + 0x10], ecx
mov dword [eax + 8], ecx
mov ecx, dword [esp + 4]
mov dword [esp + 8], ecx
mov ecx, edx
mov edx, dword [esp + 4]
mov dword [edx + edi], esi
add ecx, 4
mov dword [esp + 0xc], ecx
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x48]
add esi, ecx
dec esi
jmp 0x435b9e
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret