Function at 0x40405b
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebx
push ebp
push esi
push edi
mov ebp, esp
push eax
sub esp, 0x34
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax + 0x407373]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax + 0x40738b]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax + 0x4073bb]
mov dword [ebp - 0x38], eax
movsx eax, byte [eax + 0x40732f]
mov dword [ebp - 0x2c], eax
movzx eax, byte [0x405005]
test eax, eax
je 0x4040f0
mov eax, dword [ebp - 0x38]
movzx eax, byte [eax + 0x4072ef]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x38]
movzx eax, byte [eax + 0x4072ff]
shr eax, 3
movzx ebx, byte [0x40744b]
mul ebx
and eax, 0x3f
movsx eax, byte [eax + 0x405015]
imul dword [ebp - 0xc]
mov dword [ebp - 0xc], eax
push eax
xor eax, eax
mov al, 8
movzx ebx, byte [0x405005]
sub eax, ebx
mov cl, al
pop eax
sar eax, cl
add eax, dword [ebp - 0x2c]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
sar eax, 6
push eax
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax + 0x4073eb]
pop ebx
add eax, ebx
push eax
movzx eax, byte [0x4072ac]
movsx eax, byte [eax + 0x405800]
pop ebx
add eax, ebx
movsx ebx, byte [0x40580d]
add eax, ebx
mov dword [ebp - 0xc], eax
cmp eax, 0
jge 0x40412b
add dword [ebp - 0xc], 0xc
mov eax, dword [ebp - 0xc]
xor ebx, ebx
mov bl, 0xc
xor edx, edx
div ebx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x10]
imul eax, eax, 0xc
pop ebx
xchg ebx, eax
sub eax, ebx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x2c]
and eax, 0x3f
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x14]
cmp eax, 0x12
jb 0x404267
mov eax, dword [ebp - 0x14]
shl eax, 1
movzx eax, word [eax + 0x405890]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x14]
add eax, 1
shl eax, 1
movzx eax, word [eax + 0x405890]
sub eax, dword [ebp - 0xc]
imul dword [ebp - 0x2c]
shr eax, 6
add eax, dword [ebp - 0xc]
mov dword [ebp - 0xc], eax
movzx eax, byte [0x4072ac]
cmp al, 2
jne 0x40420b
mov eax, 0x11cd4aa
xor edx, edx
div dword [ebp - 0xc]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x10]
cmp eax, 0
jbe 0x4041bf
mov eax, dword [ebp - 0x20]
shr eax, 1
mov dword [ebp - 0x20], eax
dec dword [ebp - 0x10]
jmp 0x4041a6
mov byte [0x4072aa], 0x50
call fcn.00402fea
mov eax, dword [ebp - 0x18]
shl eax, 5
add eax, 0x80
push eax
mov eax, dword [ebp - 0x20]
and eax, 0xf
pop ebx
add eax, ebx
mov byte [0x4072aa], al
call fcn.00402fea
mov byte [0x4072aa], 0x50
call fcn.00402fea
mov eax, dword [ebp - 0x20]
shr eax, 4
mov byte [0x4072aa], al
call fcn.00402fea
jmp 0x404843
mov eax, 0x1312d00
xor edx, edx
div dword [ebp - 0xc]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x10]
cmp eax, 0
jbe 0x404231
mov eax, dword [ebp - 0x20]
shr eax, 1
mov dword [ebp - 0x20], eax
dec dword [ebp - 0x10]
jmp 0x404218
push dword [ebp - 0x24]
mov eax, dword [ebp - 0x18]
shl eax, 1
push eax
mov eax, dword [ebp - 0x20]
and eax, 0xff
push eax
call fcn.00403f9b
push dword [ebp - 0x24]
mov eax, dword [ebp - 0x18]
shl eax, 1
add eax, 1
push eax
mov eax, dword [ebp - 0x20]
shr eax, 8
push eax
call fcn.00403f9b
jmp 0x404843
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax + 0x40741b]
add eax, dword [ebp - 0x10]
mov dword [ebp - 0x10], eax
movzx eax, byte [0x4072ac]
cmp al, 1
ja 0x4042ca
push dword [ebp - 0x24]
xor eax, eax
mov al, 0x28
add eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x10]
movzx eax, byte [eax + 0x4058ec]
shl eax, 4
push eax
mov eax, dword [ebp - 0x14]
movzx eax, byte [eax + 0x4058e0]
pop ebx
add eax, ebx
push eax
call fcn.00403f9b
push dword [ebp - 0x24]
xor eax, eax
mov al, 0x30
add eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x2c]
shl eax, 2
push eax
call fcn.00403f9b
jmp 0x404843
movzx eax, byte [0x4072ac]
cmp al, 7
ja 0x40434d
mov eax, dword [ebp - 0x14]
shl eax, 1
movzx eax, word [eax + 0x4058aa]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x14]
add eax, 1
shl eax, 1
movzx eax, word [eax + 0x4058aa]
sub eax, dword [ebp - 0xc]
imul dword [ebp - 0x2c]
shr eax, 6
add eax, dword [ebp - 0xc]
mov dword [ebp - 0xc], eax
push dword [ebp - 0x24]
mov eax, dword [ebp - 0x18]
and eax, 3
add eax, 0xa4
push eax
mov eax, dword [ebp - 0x10]
movzx eax, byte [eax + 0x4058c4]
shl eax, 0xb
add eax, dword [ebp - 0xc]
shr eax, 8
add eax, 0x100
push eax
call fcn.00403f9b
push dword [ebp - 0x24]
mov eax, dword [ebp - 0x18]
and eax, 3
add eax, 0xa0
push eax
push dword [ebp - 0xc]
call fcn.00403f9b
jmp 0x404843
mov eax, dword [ebp - 0x14]
shl eax, 1
movzx eax, word [eax + 0x405910]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x14]
add eax, 1
shl eax, 1
movzx eax, word [eax + 0x405910]
sub eax, dword [ebp - 0x1c]
imul dword [ebp - 0x2c]
shr eax, 6
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax + 0x4073a3]
shl eax, 6
add eax, 0x4b0948
mov dword [ebp - 0xc], eax
movzx eax, byte [0x4072ac]
cmp al, 0xc
jne 0x404623
mov eax, dword [ebp - 0x18]
shl eax, 5
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax + 0x4073d3]
cmp eax, 2
je 0x404469
push dword [ebp - 0x24]
xor eax, eax
mov al, 3
add eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x1e
movzx eax, byte [eax]
shl eax, 4
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x2c
movzx eax, byte [eax]
pop ebx
add eax, ebx
push eax
call fcn.00403f9b
push dword [ebp - 0x24]
xor eax, eax
mov al, 0xb
add eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x1a
movzx eax, byte [eax]
shl eax, 4
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x28
movzx eax, byte [eax]
pop ebx
add eax, ebx
push eax
call fcn.00403f9b
push dword [ebp - 0x24]
xor eax, eax
mov al, 0x13
add eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x16
movzx eax, byte [eax]
shl eax, 4
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x24
movzx eax, byte [eax]
pop ebx
add eax, ebx
push eax
call fcn.00403f9b
push dword [ebp - 0x24]
xor eax, eax
mov al, 0x1b
add eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x12
movzx eax, byte [eax]
shl eax, 4
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x20
movzx eax, byte [eax]
pop ebx
add eax, ebx
push eax
call fcn.00403f9b
jmp 0x404511
push dword [ebp - 0x24]
xor eax, eax
mov al, 3
add eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x1e
movzx eax, byte [eax]
shl eax, 4
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x1f
movzx eax, byte [eax]
pop ebx
add eax, ebx
push eax
call fcn.00403f9b
push dword [ebp - 0x24]
xor eax, eax
mov al, 0xb
add eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x1a
movzx eax, byte [eax]
shl eax, 4
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x1b
movzx eax, byte [eax]
pop ebx
add eax, ebx
push eax
call fcn.00403f9b
push dword [ebp - 0x24]
xor eax, eax
mov al, 0x13
add eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x16
movzx eax, byte [eax]
shl eax, 4
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x17
movzx eax, byte [eax]
pop ebx
add eax, ebx
push eax
call fcn.00403f9b
push dword [ebp - 0x24]
xor eax, eax
mov al, 0x1b
add eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x12
movzx eax, byte [eax]
shl eax, 4
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x13
movzx eax, byte [eax]
pop ebx
add eax, ebx
push eax
call fcn.00403f9b
push dword [ebp - 0x24]
push dword [ebp - 0x20]
mov eax, dword [ebp - 0xc]
add eax, 0xd
movzx eax, byte [eax]
push eax
call fcn.00403f9b
push dword [ebp - 0x24]
xor eax, eax
mov al, 8
add eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
add eax, 9
movzx eax, byte [eax]
push eax
call fcn.00403f9b
push dword [ebp - 0x24]
xor eax, eax
mov al, 0x10
add eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
add eax, 5
movzx eax, byte [eax]
push eax
call fcn.00403f9b
push dword [ebp - 0x24]
xor eax, eax
mov al, 0x18
add eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
add eax, 1
movzx eax, byte [eax]
push eax
call fcn.00403f9b
xor eax, eax
mov al, 4
mov dword [ebp - 8], eax
push dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
add eax, 4
push eax
mov eax, dword [ebp - 0x1c]
and eax, 0xff
push eax
call fcn.00403f9b
push dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
add eax, 5
push eax
mov eax, dword [ebp - 0x10]
movzx eax, byte [eax + 0x40592a]
shl eax, 0xa
add eax, dword [ebp - 0x1c]
shr eax, 8
push eax
call fcn.00403f9b
add dword [ebp - 0x20], 8
dec dword [ebp - 8]
jne 0x40457b
push dword [ebp - 0x24]
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax + 0x40596c]
add eax, 0x240
push eax
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax + 0x4073d3]
and eax, 2
shr eax, 1
push eax
call fcn.00403f9b
mov eax, dword [ebp - 0x18]
cmp eax, 0x10
jb 0x404843
push dword [ebp - 0x24]
movzx eax, byte [eax + 0x40596c]
add eax, 0x241
push eax
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax + 0x4073d3]
and eax, 2
shr eax, 1
push eax
call fcn.00403f9b
jmp 0x404843
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax + 0x405962]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0xc]
add eax, 0x1f
movzx eax, byte [eax]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0xc]
add eax, 0x1b
movzx eax, byte [eax]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax + 0x4073d3]
cmp eax, 2
je 0x40466f
mov eax, dword [ebp - 0xc]
add eax, 0x2c
movzx eax, byte [eax]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0xc]
add eax, 0x28
movzx eax, byte [eax]
mov dword [ebp - 0x34], eax
push dword [ebp - 0x24]
xor eax, eax
mov al, 0x80
add eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x1e
movzx eax, byte [eax]
shl eax, 4
add eax, dword [ebp - 0x30]
push eax
call fcn.00403f9b
push dword [ebp - 0x24]
xor eax, eax
mov al, 0x83
add eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x1a
movzx eax, byte [eax]
shl eax, 4
add eax, dword [ebp - 0x34]
push eax
call fcn.00403f9b
push dword [ebp - 0x24]
xor eax, eax
mov al, 0x20
add eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
add eax, 0xd
movzx eax, byte [eax]
push eax
call fcn.00403f9b
push dword [ebp - 0x24]
xor eax, eax
mov al, 0x23
add eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
add eax, 9
movzx eax, byte [eax]
push eax
call fcn.00403f9b
mov eax, dword [ebp - 0x18]
add eax, 1
movzx eax, byte [eax + 0x405962]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x18]
shr eax, 3
add eax, dword [ebp - 0x28]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0xc]
add eax, 0x17
movzx eax, byte [eax]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0xc]
add eax, 0x13
movzx eax, byte [eax]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax + 0x4073d3]
cmp eax, 2
je 0x40473e
mov eax, dword [ebp - 0xc]
add eax, 0x24
movzx eax, byte [eax]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0xc]
add eax, 0x20
movzx eax, byte [eax]
mov dword [ebp - 0x34], eax
push dword [ebp - 0x28]
xor eax, eax
mov al, 0x80
add eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x16
movzx eax, byte [eax]
shl eax, 4
add eax, dword [ebp - 0x30]
push eax
call fcn.00403f9b
push dword [ebp - 0x28]
xor eax, eax
mov al, 0x83
add eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x12
movzx eax, byte [eax]
shl eax, 4
add eax, dword [ebp - 0x34]
push eax
call fcn.00403f9b
push dword [ebp - 0x28]
xor eax, eax
mov al, 0x20
add eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
add eax, 5
movzx eax, byte [eax]
push eax
call fcn.00403f9b
push dword [ebp - 0x28]
xor eax, eax
mov al, 0x23
add eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
add eax, 1
movzx eax, byte [eax]
push eax
call fcn.00403f9b
mov eax, dword [ebp + 0x14]
movzx eax, byte [eax + 0x4073d3]
and eax, 2
shl eax, 2
push eax
mov eax, dword [ebp - 0x10]
movzx eax, byte [eax + 0x40592a]
pop ebx
add eax, ebx
shl eax, 0xa
add eax, dword [ebp - 0x1c]
shr eax, 8
mov dword [ebp - 0x14], eax
push dword [ebp - 0x24]
mov eax, dword [ebp - 0x18]
add eax, 0xa0
push eax
mov eax, dword [ebp - 0x1c]
and eax, 0xff
push eax
call fcn.00403f9b
push dword [ebp - 0x24]
mov eax, dword [ebp - 0x18]
add eax, 0xb0
push eax
push dword [ebp - 0x14]
call fcn.00403f9b
mov eax, dword [ebp - 0x18]
cmp eax, 8
je 0x404815
inc dword [ebp - 0x18]
push dword [ebp - 0x28]
mov eax, dword [ebp - 0x18]
add eax, 0xa0
push eax
mov eax, dword [ebp - 0x1c]
and eax, 0xff
push eax
call fcn.00403f9b
push dword [ebp - 0x28]
mov eax, dword [ebp - 0x18]
add eax, 0xb0
push eax
push dword [ebp - 0x14]
call fcn.00403f9b
mov esp, ebp
pop edi
pop esi
pop ebp
pop ebx
ret 4