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

Disassembly:
sub esp, 0x20
push ebx
mov ebx, dword [esp + 0x28]
push ebp
push esi
mov eax, dword [ebx + 4]
push edi
test eax, eax
mov edi, ecx
je 0x412602
mov esi, dword [ebx + 8]
sub esi, eax
sar esi, 4
mov dword [esp + 0x14], esi
jne 0x412611
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x20
ret 4
lea ebp, [esi*8]
mov eax, 0x51eb851f
mul ebp
shr edx, 5
lea eax, [edx + ebp + 8]
mov dword [esp + 0x10], eax
mov eax, dword [edi + 0x1a0]
cmp eax, ebp
jae 0x412677
mov eax, dword [edi + 0x19c]
test eax, eax
je 0x412651
push eax
call fcn.00447e1a
add esp, 4
mov dword [edi + 0x19c], 0
lea ecx, [ebp + 1]
push ecx
call fcn.0044826c
add esp, 4
mov dword [edi + 0x19c], eax
test eax, eax
jne 0x412671
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
mov dword [edi + 0x1a0], ebp
mov ecx, dword [ebx + 4]
mov eax, dword [ebx + 8]
mov ebp, dword [edi + 0x19c]
cmp ecx, eax
je 0x41273e
mov ebx, dword [ecx]
mov edx, dword [edi + 4]
mov esi, dword [edi + 0x178]
mov eax, ebx
sub eax, edx
xor edx, edx
div esi
add ecx, 0x10
add ebp, 8
mov edx, eax
shl edx, 8
shr eax, 8
xor al, dl
and eax, 0xff
xor eax, edx
mov edx, dword [edi + 8]
mov word [esp + 0x1c], ax
mov eax, dword [ecx - 0xc]
sub eax, edx
xor edx, edx
div esi
mov edx, eax
shl edx, 8
shr eax, 8
xor al, dl
and eax, 0xff
xor eax, edx
xor edx, edx
mov word [esp + 0x1e], ax
mov eax, dword [ecx - 8]
sub eax, ebx
div esi
mov edx, eax
shl edx, 8
shr eax, 8
xor al, dl
and eax, 0xff
xor eax, edx
mov edx, dword [ecx - 0xc]
mov word [esp + 0x20], ax
mov eax, dword [ecx - 4]
sub eax, edx
xor edx, edx
div esi
mov esi, eax
mov edx, esi
shl edx, 8
shr eax, 8
xor al, dl
and eax, 0xff
xor eax, edx
mov edx, dword [esp + 0x1c]
mov word [esp + 0x22], ax
mov eax, dword [esp + 0x20]
mov dword [ebp - 8], edx
mov edx, dword [esp + 0x34]
mov dword [ebp - 4], eax
cmp ecx, dword [edx + 8]
jne 0x41268b
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
mov ecx, dword [edi + 0x198]
xor ebx, ebx
cmp ecx, eax
jae 0x412795
mov eax, dword [edi + 0x194]
cmp eax, ebx
je 0x412767
push eax
call fcn.00447e1a
add esp, 4
mov dword [edi + 0x194], ebx
mov ecx, dword [esp + 0x10]
inc ecx
push ecx
call fcn.0044826c
add esp, 4
cmp eax, ebx
mov dword [edi + 0x194], eax
jne 0x41278b
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret 4
mov edx, dword [esp + 0x10]
mov dword [edi + 0x198], edx
mov edx, dword [edi + 0x194]
lea eax, [esi*8]
push eax
mov eax, dword [edi + 0x19c]
lea ecx, [esp + 0x14]
push eax
push ecx
push edx
call fcn.00438970
add esp, 0x10
test eax, eax
je 0x4127c8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret 4
mov ecx, dword [esp + 0x10]
lea eax, [esi*8]
sub eax, esi
add eax, eax
push eax
push ecx
push esi
push str.C:c_sourceforgeultravncwinvncwinvnc_vncclient.cpp_:__Sending_CacheZip_Rects_d_Size_d___d__r_n
push 9
push 0x4721bc
call fcn.004070e0
mov eax, esi
mov edx, esi
shl eax, 8
sar edx, 8
xor dl, al
add esp, 0x18
and edx, 0xff
mov word [esp + 0x26], bx
xor edx, eax
mov eax, dword [esp + 0x10]
mov word [esp + 0x24], dx
mov ecx, eax
mov edx, eax
and ecx, 0xff0000
shr edx, 0x10
or ecx, edx
mov edx, eax
and edx, 0xff00
push 0xc
shl eax, 0x10
or edx, eax
lea eax, [esp + 0x28]
shr ecx, 8
shl edx, 8
or ecx, edx
push eax
mov dword [esp + 0x20], ecx
mov ecx, dword [edi + 0xd8]
mov word [esp + 0x30], bx
mov word [esp + 0x32], bx
mov dword [esp + 0x34], 0x700ffff
call fcn.00435210
test eax, eax
jne 0x41286a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
lea ecx, [esp + 0x18]
push 4
push ecx
mov ecx, dword [edi + 0xd8]
call fcn.00435210
test eax, eax
jne 0x41288a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
mov edx, dword [esp + 0x10]
mov eax, dword [edi + 0x194]
mov ecx, dword [edi + 0xd8]
push edx
push eax
call fcn.00435210
neg eax
pop edi
pop esi
sbb eax, eax
pop ebp
neg eax
pop ebx
add esp, 0x20
ret 4