Function at 0x436990
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x2c
mov eax, dword [esp + 0x40]
mov esi, dword [esp + 0x44]
mov ecx, dword [esp + 0x48]
add ecx, esi
sub ecx, dword [esp + 0x50]
mov dword [eax + 8], 0
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [esp + 0x24], ecx
cmp ecx, esi
jbe 0x436cb8
mov ebp, dword [esp + 0x54]
mov dword [esp], 0
mov dword [esp + 4], 0
mov dword [esp + 0xc], 0
jmp 0x4369f8
add esi, ecx
dec esi
mov eax, dword [esp + 0x40]
inc esi
cmp esi, dword [esp + 0x24]
jae 0x436cb8
test ebp, ebp
je 0x436a46
movzx ecx, byte [ebp]
mov byte [esp + 0x10], 0x5d
lea eax, [esp + 0x11]
mov byte [eax + 4], 0
mov dword [eax], 0
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, eax
add dl, 0x65
xor dl, byte [esp + eax + 0x10]
add dl, 7
mov byte [esp + eax + 0x10], dl
mov edx, eax
and edx, 1
xor eax, 1
lea eax, [eax + edx*2]
cmp eax, 6
jb 0x436a20
cmp cl, byte [esp + 0x10]
je 0x436a51
movzx eax, byte [esi]
mov ecx, dword [esp + 0x4c]
cmp al, byte [ecx]
jne 0x4369e9
cmp dword [esp + 0x50], 2
jb 0x436af0
mov ecx, 1
mov dword [esp + 0x28], esi
jmp 0x436a88
movzx eax, byte [esi + ecx]
mov edx, dword [esp + 0x4c]
cmp al, byte [edx + ecx]
jne 0x4369e6
inc ecx
cmp ecx, dword [esp + 0x50]
je 0x436af0
test ebp, ebp
je 0x436a70
mov esi, ebp
movzx edx, byte [ebp + ecx]
mov byte [esp + 0x10], 0xff
lea eax, [esp + 0x11]
mov byte [eax + 4], 0
mov dword [eax], 0
mov eax, 0xdc0dc6a0
nop
nop
nop
nop
nop
movzx edi, byte [esp + eax + 0x23f23970]
mov ebp, eax
and ebp, edi
or edi, eax
lea ebx, [ebp*2]
not ebx
add ebx, ebp
and ebx, edi
add bl, 0xe0
mov byte [esp + eax + 0x23f23970], bl
inc eax
cmp eax, 0xdc0dc6a6
jne 0x436ab0
cmp dl, byte [esp + 0x10]
mov ebp, esi
mov esi, dword [esp + 0x28]
jne 0x436a70
jmp 0x436a81
mov ecx, dword [esp]
mov ebx, ecx
mov eax, dword [esp + 4]
sub ebx, eax
cmp ecx, dword [esp + 0xc]
je 0x436b0c
mov edx, eax
mov eax, dword [esp + 0x40]
jmp 0x436ca0
mov ecx, ebx
sar ecx, 2
lea eax, [ecx + 1]
mov edx, ecx
shr edx, 1
add edx, ecx
cmp edx, eax
ja 0x436b20
mov edx, eax
mov dword [esp + 0xc], edx
lea eax, [edx*4]
push eax
call fcn.00408630
add esp, 4
mov edx, eax
mov edi, dword [esp + 4]
test edi, edi
mov dword [esp + 8], eax
je 0x436c78
mov dword [esp + 0x20], ebx
mov eax, edi
mov ecx, dword [esp]
xor eax, ecx
mov ebx, edi
not ebx
and ebx, ecx
add ebx, ebx
mov dword [esp + 0x1c], ebx
mov ecx, ebx
mov dword [esp], eax
sub ecx, eax
cmp edx, edi
jbe 0x436c1f
lea eax, [edi + ecx]
cmp eax, edx
jbe 0x436c1f
test ecx, ecx
je 0x436c64
mov edx, ecx
mov eax, dword [esp + 4]
add eax, ecx
dec eax
mov ecx, dword [esp + 8]
add ecx, edx
dec ecx
mov dword [esp + 0x18], edx
and edx, 7
je 0x436bb4
neg edx
xor edi, edi
nop
nop
nop
nop
movzx ebx, byte [eax + edi]
mov byte [ecx + edi], bl
dec edi
cmp edx, edi
jne 0x436ba0
add eax, edi
add ecx, edi
add dword [esp + 0x18], edi
mov edx, dword [esp]
sub edx, dword [esp + 0x1c]
cmp edx, 0xfffffff8
mov edi, dword [esp + 0x18]
ja 0x436c64
neg edi
xor edx, edx
nop
nop
nop
nop
movzx ebx, byte [eax + edx]
mov byte [ecx + edx], bl
movzx ebx, byte [eax + edx - 1]
mov byte [ecx + edx - 1], bl
movzx ebx, byte [eax + edx - 2]
mov byte [ecx + edx - 2], bl
movzx ebx, byte [eax + edx - 3]
mov byte [ecx + edx - 3], bl
movzx ebx, byte [eax + edx - 4]
mov byte [ecx + edx - 4], bl
movzx ebx, byte [eax + edx - 5]
mov byte [ecx + edx - 5], bl
movzx ebx, byte [eax + edx - 6]
mov byte [ecx + edx - 6], bl
movzx ebx, byte [eax + edx - 7]
mov byte [ecx + edx - 7], bl
add edx, 0xfffffff8
cmp edi, edx
jne 0x436bd0
jmp 0x436c64
mov dword [esp + 4], edi
mov eax, ecx
shr ecx, 2
mov ebx, edi
mov edi, edx
xchg esi, ebx
rep movsd dword es:[edi], dword [esi]
xchg esi, ebx
mov ecx, edx
mov edx, eax
and edx, 0xfffffffc
lea edi, [ecx + edx]
add edx, dword [esp + 4]
mov ecx, eax
shr ecx, 1
and ecx, 1
mov ebx, edx
mov dword [esp], edi
xchg esi, ebx
rep movsw word es:[edi], word [esi]
xchg esi, ebx
test al, 1
je 0x436c64
and eax, 2
movzx ecx, byte [edx + eax]
mov edx, dword [esp]
mov byte [edx + eax], cl
push dword [esp + 4]
call fcn.00408640
add esp, 4
mov edx, dword [esp + 8]
mov ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x40]
mov dword [eax], edx
mov ecx, dword [esp + 0xc]
lea ecx, [edx + ecx*4]
mov edx, dword [esp + 8]
add edx, ebx
mov dword [esp + 0xc], ecx
mov dword [eax + 8], ecx
mov ecx, dword [esp + 8]
mov dword [esp + 4], ecx
mov ecx, edx
mov edx, dword [esp + 8]
mov dword [edx + ebx], esi
add ecx, 4
mov dword [esp], ecx
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x50]
add esi, ecx
dec esi
jmp 0x4369ed
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret