Function at 0x436580
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
mov eax, dword [0x504628]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0x10], 0
mov eax, dword [ebp + 0xc]
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x110], edi
mov dword [ebp - 0x10c], eax
mov esi, edx
je 0x436875
push ebx
call fcn.00435150
mov ebx, dword [ebp + 8]
dec ebx
mov dword [ebp - 0x118], ebx
test ebx, ebx
jle 0x436623
lea ecx, [edi + ebx]
lea esp, [esp]
or edi, 0xffffffff
movzx eax, byte [edi + ecx]
xor byte [ecx], al
mov edx, ebx
and edx, reloc.WS2_32.dll_ntohs
jns 0x4365e8
dec edx
or edx, 0xfffffff0
inc edx
mov eax, dword [ebp - 0x10c]
mov al, byte [edx + eax + 8]
xor al, byte [ecx]
mov edi, 0x14
mov byte [ecx], al
mov byte [ebp - 0x105], al
mov eax, ebx
cdq
idiv edi
mov eax, dword [ebp + 0x10]
dec ecx
mov dl, byte [edx + eax]
xor dl, byte [ebp - 0x105]
xor dl, bl
mov byte [ecx + 1], dl
dec ebx
test ebx, ebx
jg 0x4365d0
mov edi, dword [ebp - 0x110]
mov eax, dword [ebp - 0x10c]
mov cl, byte [eax + 8]
mov eax, dword [ebp + 8]
xor byte [edi], cl
cdq
sub eax, edx
sar eax, 1
xor ecx, ecx
test eax, eax
jle 0x436662
lea edx, [edi + eax]
nop
movzx ebx, byte [edi + ecx]
mov byte [ebp - 0x105], bl
movzx ebx, byte [edx + ecx]
mov byte [edi + ecx], bl
movzx ebx, byte [ebp - 0x105]
mov byte [edx + ecx], bl
add ecx, 2
cmp ecx, eax
jl 0x436640
mov eax, dword [ebp - 0x10c]
call fcn.00435180
movzx edx, byte [esi + 7]
xor byte [esi], dl
movzx eax, byte [esi + 7]
xor byte [esi + 1], al
movzx ecx, byte [esi + 7]
xor byte [esi + 2], cl
movzx edx, byte [esi + 7]
xor byte [esi + 3], dl
movzx eax, byte [esi + 7]
xor byte [esi + 4], al
movzx ecx, byte [esi + 7]
xor byte [esi + 5], cl
movzx edx, byte [esi + 7]
xor byte [esi + 6], dl
xor eax, eax
nop
mov byte [ebp + eax - 0x104], al
inc eax
cmp eax, 0x100
jl 0x4366a0
lea ecx, [ebp - 0x104]
mov eax, 1
sub eax, ecx
mov dword [ebp - 0x10c], eax
mov eax, 2
sub eax, ecx
mov dword [ebp - 0x114], eax
mov eax, 3
xor edx, edx
xor edi, edi
sub eax, ecx
mov dword [ebp - 0x11c], eax
mov cl, byte [ebp + edi - 0x104]
lea eax, [ebp + edi - 0x104]
mov byte [ebp - 0x105], cl
movzx ecx, cl
mov ebx, edi
and ebx, 7
movzx ebx, byte [ebx + esi]
add ebx, edx
add ecx, ebx
mov ebx, dword [ebp - 0x10c]
and ecx, 0xff
movzx edx, byte [ebp + ecx - 0x104]
mov byte [eax], dl
movzx edx, byte [ebp - 0x105]
mov byte [ebp + ecx - 0x104], dl
mov dl, byte [eax + 1]
add ebx, eax
and ebx, 7
movzx ebx, byte [ebx + esi]
add ebx, ecx
mov byte [ebp - 0x105], dl
movzx edx, dl
add edx, ebx
mov ebx, dword [ebp - 0x114]
and edx, 0xff
movzx ecx, byte [ebp + edx - 0x104]
mov byte [eax + 1], cl
movzx ecx, byte [ebp - 0x105]
mov byte [ebp + edx - 0x104], cl
mov cl, byte [eax + 2]
add ebx, eax
and ebx, 7
movzx ebx, byte [ebx + esi]
add ebx, edx
mov byte [ebp - 0x105], cl
movzx ecx, cl
add ecx, ebx
mov ebx, dword [ebp - 0x11c]
and ecx, 0xff
movzx edx, byte [ebp + ecx - 0x104]
mov byte [eax + 2], dl
movzx edx, byte [ebp - 0x105]
mov byte [ebp + ecx - 0x104], dl
mov dl, byte [eax + 3]
add ebx, eax
and ebx, 7
movzx ebx, byte [ebx + esi]
mov byte [ebp - 0x105], dl
movzx edx, dl
add ebx, ecx
add edx, ebx
and edx, 0xff
movzx ecx, byte [ebp + edx - 0x104]
mov byte [eax + 3], cl
mov al, byte [ebp - 0x105]
add edi, 4
cmp edi, 0x100
mov byte [ebp + edx - 0x104], al
jl 0x4366e0
mov edx, dword [ebp - 0x110]
xor esi, esi
xor edi, edi
xor eax, eax
cmp dword [ebp + 8], esi
jle 0x436854
jmp 0x436800
inc esi
and esi, 0xff
mov cl, byte [ebp + esi - 0x104]
movzx ebx, cl
add ebx, edi
and ebx, 0xff
mov edi, ebx
mov bl, byte [ebp + edi - 0x104]
mov byte [ebp + esi - 0x104], bl
mov byte [ebp + edi - 0x104], cl
movzx ebx, byte [ebp + esi - 0x104]
movzx ecx, cl
add ebx, ecx
and ebx, 0xff
movzx ecx, byte [ebp + ebx - 0x104]
xor byte [edx + eax], cl
inc eax
cmp eax, dword [ebp + 8]
jl 0x436800
mov ecx, dword [ebp - 0x118]
pop ebx
test ecx, ecx
jle 0x436875
lea eax, [edx + ecx]
or esi, 0xffffffff
mov dl, byte [eax + esi]
xor dl, byte [eax]
dec eax
xor dl, cl
mov byte [eax + 1], dl
dec ecx
test ecx, ecx
jg 0x436865
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0045a0a2
mov esp, ebp
pop ebp
ret