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

Disassembly:
mov eax, dword [0x4040c4]
sub esp, 0x110
push ebx
push ebp
push esi
push edi
push 0x2d49ffff
mov edi, edx
mov ebp, ecx
push eax
call fcn.00401000
movsx ecx, word [0x4040a4]
movsx edx, byte [0x40409d]
push ecx
push edx
mov dword [0x4040c0], eax
mov word [0x4040ae], 0xffff
call fcn.00401110
push 0x5f4dffff
push 0x6b8bffff
mov word [0x4040a2], ax
call fcn.004011d0
mov word [0x4040b2], ax
mov eax, dword [0x4040d4]
push eax
push 0xd05dffff
call fcn.00401180
mov ecx, dword [0x4040d0]
push 0x62a1ffff
push ecx
mov word [0x4040a4], ax
mov byte [0x404098], 1
call fcn.00401090
movsx edx, byte [0x40409b]
mov dword [0x4040d4], eax
push edx
movsx eax, word [0x4040ac]
push eax
call fcn.00401150
movsx ecx, byte [0x404099]
movsx edx, byte [0x40409c]
push ecx
push edx
mov byte [0x40409d], al
call fcn.00401000
mov byte [0x40409f], al
movsx eax, byte [0x40409e]
push eax
push 0xa757ffff
call fcn.00401150
add esp, 0x40
mov word [0x4040a4], ax
xor eax, eax
mov byte [esp + eax + 0x20], al
inc eax
cmp eax, 0x100
jb 0x402630
movsx ecx, word [0x4040ac]
mov esi, 1
push ecx
push 0x1177ffff
mov word [0x4040aa], si
call fcn.00401110
movsx ecx, word [0x4040a6]
mov word [0x4040a4], ax
mov edx, 0x595bffff
movsx eax, byte [0x40409a]
sub edx, eax
xor bl, bl
mov dword [0x4040cc], edx
mov edx, dword [0x4040b8]
and ecx, edx
push eax
push esi
mov byte [esp + 0x24], 0
mov dword [0x4040c8], ecx
mov dword [0x4040b8], esi
mov byte [esp + 0x20], bl
call fcn.00401110
push 0x7bf1ffff
push 0xec75ffff
mov dword [0x4040d4], eax
call fcn.004011d0
mov edx, dword [0x4040cc]
mov word [0x4040a2], ax
mov eax, dword [0x4040bc]
push edx
push eax
call fcn.00401110
add esp, 0x20
mov word [0x4040a4], ax
mov eax, dword [0x4040d4]
xor esi, esi
movsx ecx, word [0x4040b2]
or ecx, 0x7c77ffff
cmp word [0x4040a6], 0
mov dword [0x4040c4], ecx
je 0x402705
test eax, eax
mov byte [0x40409d], 1
jne 0x40270c
mov byte [0x40409d], 0
mov eax, esi
xor edx, edx
div edi
mov cl, byte [esp + esi + 0x20]
mov al, byte [esp + 0x10]
mov dl, byte [edx + ebp]
mov byte [0x40409f], 1
add dl, cl
add al, dl
mov byte [esp + 0x10], al
mov al, byte [0x4040c8]
mov ecx, dword [esp + 0x10]
inc al
and ecx, 0xff
mov byte [0x4040a0], al
mov dl, byte [esp + ecx + 0x20]
lea eax, [esp + ecx + 0x20]
mov cl, byte [esp + esi + 0x20]
mov byte [esp + esi + 0x20], dl
mov byte [eax], cl
movsx eax, word [0x4040a6]
movsx ecx, byte [0x404099]
push eax
push ecx
call fcn.004010d0
movsx edx, ax
push edx
push 0x2f0bffff
mov word [0x4040aa], ax
call fcn.00401150
movsx ecx, word [0x4040ae]
mov word [0x4040a2], ax
mov eax, dword [0x4040bc]
push eax
push ecx
call fcn.00401040
add esp, 0x18
inc esi
cmp esi, 0x100
mov dword [0x4040d4], eax
jb 0x4026dd
mov eax, dword [0x4040c4]
mov ecx, dword [esp + 0x12c]
mov edx, eax
neg edx
shl edx, 2
sub edx, eax
shl edx, 7
sub edx, eax
shl edx, 0x11
sub edx, eax
test ecx, ecx
mov dword [0x4040b8], edx
jbe 0x402918
mov ebp, dword [esp + 0x124]
mov eax, dword [esp + 0x128]
sub eax, ebp
mov dword [esp + 0x10], ecx
mov ecx, dword [0x4040bc]
mov dword [esp + 0x1c], eax
mov al, byte [0x4040aa]
push ecx
imul byte [0x4040c0]
push 0x56c1ffff
mov byte [0x40409d], al
call fcn.004010d0
mov dl, byte [esp + 0x1c]
mov dword [0x4040d8], eax
inc dl
push 0x3a35ffff
mov byte [esp + 0x20], dl
push 0xeff5ffff
mov eax, dword [esp + 0x24]
and eax, 0xff
lea esi, [esp + eax + 0x30]
mov al, byte [esp + eax + 0x30]
add bl, al
mov byte [esp + 0x28], bl
call fcn.00401040
movsx edx, word [0x4040ae]
mov ecx, dword [0x4040c4]
mov byte [0x40409f], al
push ecx
push edx
mov dword [0x4040d4], 0x55720001
call fcn.00401150
mov byte [0x40409a], al
mov eax, dword [esp + 0x30]
and eax, 0xff
mov cl, byte [esp + eax + 0x38]
lea edi, [esp + eax + 0x38]
mov al, byte [esi]
mov byte [esi], cl
mov byte [edi], al
mov eax, dword [0x4040b8]
movsx edx, word [0x4040a6]
push edx
push eax
call fcn.00401090
movsx ecx, word [0x4040a2]
movsx edx, byte [0x40409f]
sub ecx, 0x49fa0001
push edx
push 0xf6b9ffff
mov byte [0x40409c], al
mov dword [0x4040cc], ecx
call fcn.00401040
mov dl, byte [esi]
mov byte [0x4040a0], al
mov al, byte [edi]
mov dword [0x4040c4], 0x91080000
add al, dl
mov edx, dword [esp + 0x44]
and eax, 0xff
push 0xa991ffff
push 0xd365ffff
mov cl, byte [esp + eax + 0x50]
mov al, byte [edx + ebp]
xor cl, al
mov byte [ebp], cl
call fcn.004010d0
mov ecx, eax
mov eax, dword [esp + 0x40]
add esp, 0x30
inc ebp
dec eax
mov dword [0x4040bc], ecx
mov dword [esp + 0x10], eax
jne 0x4027f6
jmp 0x40291e
mov ecx, dword [0x4040bc]
or al, 0xff
push 0xde1bffff
sub al, cl
push 0x11bdffff
mov byte [0x40409a], al
call fcn.00401040
movsx ecx, byte [0x404098]
movsx edx, byte [0x40409f]
add ecx, 0xbb1ffff
push 0xb719ffff
push edx
mov dword [0x4040cc], eax
mov dword [0x4040d4], ecx
call fcn.00401110
add esp, 0x10
mov byte [0x40409a], al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret 0xc