Function at 0x405bf0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x394
push ebx
push esi
push edi
push 0x150404
call fcn.00841608
fld qword [0x893578]
fld qword [0x893578]
add esp, 4
mov ebx, eax
mov ecx, 0x93
xor eax, eax
lea edi, [ebp - 0x390]
mov dword [ebp - 0x394], 0
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], 1
rep stosd dword es:[edi], eax
fld st(0)
fmul st(1)
fld st(0)
fmul qword [0x89a5b0]
fsub st(1)
fxch st(1)
fmul qword [0x89a5a8]
fadd qword [0x89a5a0]
fdivp st(1)
faddp st(2)
fld st(1)
fcomp qword [0x89a598]
fnstsw ax
test ah, 0x41
jne 0x405c73
fld st(0)
fmul qword [0x89a590]
fsubp st(2)
fadd qword [0x89a528]
fcom qword [0x89a588]
fnstsw ax
test ah, 1
jne 0x405c3a
fxch st(1)
fst qword [ebp - 0x30]
fxch st(1)
fstp st(0)
fcomp qword [0x893578]
fnstsw ax
test ah, 1
je 0x405cc7
outsb dx, byte [esi]
sub byte [esi + 0x73], cl
pop esp
dec ebx
push edx
inc ebx
jbe 0x405d18
dec ebp
dec edi
sub al, 0x7a
arpl word [ebx + 0x62], cx
cmp eax, 0x5e737b48
pop edi
push di
sub dword [ebp + 5], ecx
test dword [ebx], ecx
mov ecx, dword [ebx]
test dword [0xe9860683], eax
xchg dword [esi], eax
add byte [eax], al
mov dword [ebp - 0x24], 0x405cb8
mov dword [ebp - 0x20], 0x405c9c
xor eax, eax
mov byte [ebp + eax - 0x144], al
inc eax
cmp eax, 0x100
jb 0x405cd7
fld qword [ebp - 0x30]
mov byte [ebp - 8], 0
mov eax, 0xff
mov esi, dword [ebp - 8]
xor edi, edi
mov dword [ebp - 0xc], eax
mov ebx, 1
mov dword [ebp - 0x2c], 0
add byte [eax], al
cmp eax, ebx
jbe 0x405d12
lea ebx, [ebx + ebx + 1]
cmp ebx, eax
jb 0x405d0a
cmp edi, 3
ja case.default.0x405d17
jmp dword [edi*4 + 0x406474]
and al, 0xbd
je 0x405d80
inc eax
add cl, bl
fld st(0)
and esi, 0xff
fld st(0)
and esi, 0xff
call fcn.008416e4
mov cl, byte [ebp + esi - 0x144]
jmp 0x405d93
fld st(0)
and esi, 0xff
call fcn.008416e4
mov cl, byte [ebp + esi - 0x144]
shr eax, 8
jmp 0x405d93
fld st(0)
and esi, 0xff
call fcn.008416e4
mov cl, byte [ebp + esi - 0x144]
shr eax, 0x10
jmp 0x405d93
fld st(0)
and esi, 0xff
call fcn.008416e4
mov cl, byte [ebp + esi - 0x144]
shr eax, 0x18
jmp 0x405d93
mov eax, dword [ebp - 0x20]
and esi, 0xff
mov cl, byte [eax + edi - 4]
mov al, byte [ebp + esi - 0x144]
inc ebp
loopne 0x405d04
out 0xff, al
add byte [eax], al
add byte [edx - 0x7503c7b4], cl
test byte [0xfffffebc], dh
add cl, al
inc edi
cmp edi, 0x20
mov byte [ebp - 8], cl
jb 0x405da6
xor edi, edi
add cl, 0x20
mov byte [ebp - 8], cl
mov esi, dword [ebp - 8]
mov eax, dword [ebp - 0x2c]
mov edx, esi
and edx, 0xff
and edx, ebx
inc eax
cmp eax, 0xb
mov dword [ebp - 0x2c], eax
jbe 0x405dc6
mov eax, edx
xor edx, edx
div dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
cmp eax, edx
jb 0x405d12
je 0x405e01
mov ecx, dword [ebp - 0xc]
lea eax, [ebp + edx - 0x144]
mov bl, byte [ebp + ecx - 0x144]
lea edx, [ebp + ecx - 0x144]
mov cl, byte [eax]
xor bl, cl
mov byte [edx], bl
mov cl, bl
mov bl, byte [eax]
xor bl, cl
mov byte [eax], bl
mov cl, byte [edx]
mov al, bl
xor cl, al
mov byte [edx], cl
mov eax, dword [ebp - 0xc]
dec eax
mov dword [ebp - 0xc], eax
jne 0x405cfa
mov edi, dword [ebp - 0x24]
mov dl, byte [ebp - 0x13d]
and esi, 0xff
mov byte [ebp - 8], dl
mov dl, byte [edi + 1]
mov bl, byte [ebp - 0x141]
mov al, byte [ebp + esi - 0x144]
sub dl, 0x7c
mov byte [ebp - 0x28], al
mov al, byte [edi]
add al, 0xf
mov cl, byte [ebp - 0x13f]
shl al, 4
or al, dl
mov byte [ebp - 1], al
mov eax, dword [ebp - 0x28]
and eax, 0xff
fstp st(0)
mov dl, byte [ebp + eax - 0x144]
lea esi, [ebp + eax - 0x144]
mov byte [ebp - 0x10], dl
mov edx, dword [ebp - 0x143]
mov eax, edx
and eax, 0xff
mov al, byte [ebp + eax - 0x144]
add al, bl
inc dl
mov byte [ebp - 0x24], al
mov byte [ebp - 0x1c], dl
mov edx, dword [ebp - 0x24]
and edx, 0xff
mov bl, byte [ebp + edx - 0x144]
lea edx, [ebp + edx - 0x144]
mov byte [esi], bl
mov ebx, dword [ebp - 8]
and ebx, 0xff
mov dword [ebp - 0x2c], edx
lea ebx, [ebp + ebx - 0x144]
mov dword [ebp - 0x14], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x14]
and edx, 0xff
lea edx, [ebp + edx - 0x144]
mov dword [ebp - 0x18], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0x18]
mov dl, byte [ebp - 0x10]
mov byte [ebx], dl
mov edx, dword [ebp - 0x10]
and edx, 0xff
mov dword [ebp - 0xc], edx
mov bl, byte [ebp + edx - 0x144]
add cl, bl
mov bl, byte [esi]
mov esi, dword [ebp - 0x14]
mov byte [ebp - 0x20], cl
mov edx, dword [ebp - 0x20]
and edx, 0xff
mov dl, byte [ebp + edx - 0x144]
add edx, ebx
mov bl, byte [esi]
add edx, ebx
mov esi, dword [ebp - 0xc]
and edx, 0xff
xor ebx, ebx
mov bl, byte [ebp + edx - 0x144]
mov edx, dword [ebp - 0x2c]
mov dl, byte [edx]
mov bl, byte [ebp + ebx - 0x144]
add edx, esi
and edx, 0xff
xor bl, byte [ebp + edx - 0x144]
mov dl, byte [ebp - 1]
mov byte [ebp - 0x28], dl
xor bl, dl
mov dl, byte [edi + 3]
mov byte [ebp - 8], bl
sub dl, 0x7c
mov bl, byte [edi + 2]
add bl, 0xf
shl bl, 4
or dl, bl
mov byte [ebp - 1], dl
mov edx, dword [ebp - 0x28]
and edx, 0xff
lea esi, [ebp + edx - 0x144]
mov dl, byte [ebp + edx - 0x144]
mov byte [ebp - 0x10], dl
mov edx, dword [ebp - 0x18]
mov bl, byte [edx]
mov dl, byte [ebp - 0x1c]
add al, bl
inc dl
mov byte [ebp - 0x24], al
mov byte [ebp - 0x1c], dl
mov edx, dword [ebp - 0x24]
and edx, 0xff
mov bl, byte [ebp + edx - 0x144]
lea edx, [ebp + edx - 0x144]
mov byte [esi], bl
mov ebx, dword [ebp - 8]
and ebx, 0xff
mov dword [ebp - 0x2c], edx
lea ebx, [ebp + ebx - 0x144]
mov dword [ebp - 0x14], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x14]
and edx, 0xff
lea edx, [ebp + edx - 0x144]
mov dword [ebp - 0x18], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0x18]
mov dl, byte [ebp - 0x10]
mov byte [ebx], dl
mov edx, dword [ebp - 0x10]
and edx, 0xff
mov dword [ebp - 0xc], edx
mov bl, byte [ebp + edx - 0x144]
add cl, bl
mov bl, byte [esi]
mov esi, dword [ebp - 0x14]
mov byte [ebp - 0x20], cl
mov edx, dword [ebp - 0x20]
and edx, 0xff
mov dl, byte [ebp + edx - 0x144]
add edx, ebx
mov bl, byte [esi]
add edx, ebx
xor ebx, ebx
and edx, 0xff
mov bl, byte [ebp + edx - 0x144]
mov edx, dword [ebp - 0x2c]
mov esi, ebx
mov bl, byte [edx]
mov edx, dword [ebp - 0xc]
add ebx, edx
mov dl, byte [ebp + esi - 0x144]
and ebx, 0xff
xor dl, byte [ebp + ebx - 0x144]
mov bl, byte [ebp - 1]
mov byte [ebp - 0x28], bl
xor dl, bl
mov byte [ebp - 8], dl
movsx dx, dl
mov word [ebp - 0x3c], dx
mov bl, byte [edi + 4]
mov dl, byte [edi + 5]
add bl, 0xf
sub dl, 0x7c
shl bl, 4
or dl, bl
mov byte [ebp - 1], dl
mov edx, dword [ebp - 0x28]
and edx, 0xff
lea esi, [ebp + edx - 0x144]
mov dl, byte [ebp + edx - 0x144]
mov byte [ebp - 0x10], dl
mov edx, dword [ebp - 0x18]
mov bl, byte [edx]
mov dl, byte [ebp - 0x1c]
add al, bl
inc dl
mov byte [ebp - 0x1c], dl
mov byte [ebp - 0x24], al
mov edx, dword [ebp - 0x24]
and edx, 0xff
mov bl, byte [ebp + edx - 0x144]
lea edx, [ebp + edx - 0x144]
mov byte [esi], bl
mov ebx, dword [ebp - 8]
and ebx, 0xff
mov dword [ebp - 0x2c], edx
lea ebx, [ebp + ebx - 0x144]
mov dword [ebp - 0x14], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x14]
and edx, 0xff
lea edx, [ebp + edx - 0x144]
mov dword [ebp - 0x18], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0x18]
mov dl, byte [ebp - 0x10]
mov byte [ebx], dl
mov edx, dword [ebp - 0x10]
and edx, 0xff
mov dword [ebp - 0xc], edx
mov bl, byte [ebp + edx - 0x144]
add cl, bl
mov bl, byte [esi]
mov esi, dword [ebp - 0x14]
mov byte [ebp - 0x20], cl
mov edx, dword [ebp - 0x20]
and edx, 0xff
mov dl, byte [ebp + edx - 0x144]
add edx, ebx
mov bl, byte [esi]
add edx, ebx
xor ebx, ebx
and edx, 0xff
mov bl, byte [ebp + edx - 0x144]
mov edx, dword [ebp - 0x2c]
mov esi, ebx
mov bl, byte [edx]
mov edx, dword [ebp - 0xc]
add ebx, edx
mov dl, byte [ebp + esi - 0x144]
and ebx, 0xff
xor dl, byte [ebp + ebx - 0x144]
mov bl, byte [ebp - 1]
mov byte [ebp - 0x28], bl
xor dl, bl
mov byte [ebp - 8], dl
movsx dx, dl
mov word [ebp - 0x3a], dx
mov bl, byte [edi + 6]
mov dl, byte [edi + 7]
add bl, 0xf
sub dl, 0x7c
shl bl, 4
or dl, bl
mov byte [ebp - 1], dl
mov edx, dword [ebp - 0x28]
and edx, 0xff
lea esi, [ebp + edx - 0x144]
mov dl, byte [ebp + edx - 0x144]
mov byte [ebp - 0x10], dl
mov edx, dword [ebp - 0x18]
mov bl, byte [edx]
mov dl, byte [ebp - 0x1c]
add al, bl
inc dl
mov byte [ebp - 0x24], al
mov byte [ebp - 0x1c], dl
mov edx, dword [ebp - 0x24]
and edx, 0xff
mov bl, byte [ebp + edx - 0x144]
lea edx, [ebp + edx - 0x144]
mov byte [esi], bl
mov ebx, dword [ebp - 8]
and ebx, 0xff
mov dword [ebp - 0x2c], edx
lea ebx, [ebp + ebx - 0x144]
mov dword [ebp - 0x14], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x14]
and edx, 0xff
lea edx, [ebp + edx - 0x144]
mov dword [ebp - 0x18], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0x18]
mov dl, byte [ebp - 0x10]
mov byte [ebx], dl
mov edx, dword [ebp - 0x10]
and edx, 0xff
mov dword [ebp - 0xc], edx
mov bl, byte [ebp + edx - 0x144]
add cl, bl
mov bl, byte [esi]
mov esi, dword [ebp - 0x14]
mov byte [ebp - 0x20], cl
mov edx, dword [ebp - 0x20]
and edx, 0xff
mov dl, byte [ebp + edx - 0x144]
add edx, ebx
mov bl, byte [esi]
add edx, ebx
xor ebx, ebx
and edx, 0xff
mov bl, byte [ebp + edx - 0x144]
mov edx, dword [ebp - 0x2c]
mov esi, ebx
mov bl, byte [edx]
mov edx, dword [ebp - 0xc]
add ebx, edx
mov dl, byte [ebp + esi - 0x144]
and ebx, 0xff
xor dl, byte [ebp + ebx - 0x144]
mov bl, byte [ebp - 1]
mov byte [ebp - 0x28], bl
mov esi, dword [ebp - 0x28]
xor dl, bl
mov byte [ebp - 8], dl
and esi, 0xff
movsx dx, dl
mov word [ebp - 0x38], dx
mov bl, byte [edi + 8]
mov dl, byte [edi + 9]
mov edi, dword [ebp - 0x18]
add bl, 0xf
sub dl, 0x7c
shl bl, 4
lea esi, [ebp + esi - 0x144]
or dl, bl
mov bl, byte [esi]
mov byte [ebp - 0x10], bl
mov bl, byte [edi]
add al, bl
mov bl, byte [ebp - 0x1c]
mov byte [ebp - 0x24], al
mov eax, dword [ebp - 0x24]
and eax, 0xff
inc bl
mov byte [ebp - 0x1c], bl
lea edi, [ebp + eax - 0x144]
mov al, byte [ebp + eax - 0x144]
mov byte [esi], al
mov eax, dword [ebp - 8]
and eax, 0xff
mov bl, byte [ebp + eax - 0x144]
lea eax, [ebp + eax - 0x144]
mov dword [ebp - 0x14], eax
mov byte [edi], bl
mov ebx, dword [ebp - 0x1c]
mov word [ebp - 0x34], 0
and ebx, 0xff
lea ebx, [ebp + ebx - 0x144]
mov dword [ebp - 0x18], ebx
mov bl, byte [ebx]
mov byte [eax], bl
mov ebx, dword [ebp - 0x18]
mov al, byte [ebp - 0x10]
mov byte [ebx], al
mov eax, dword [ebp - 0x10]
and eax, 0xff
mov bl, byte [ebp + eax - 0x144]
add bl, cl
and ebx, 0xff
mov cl, byte [ebp + ebx - 0x144]
mov bl, byte [esi]
mov esi, dword [ebp - 0x14]
add ecx, ebx
mov bl, byte [esi]
add ecx, ebx
xor ebx, ebx
and ecx, 0xff
mov bl, byte [ebp + ecx - 0x144]
mov cl, byte [edi]
add ecx, eax
mov al, byte [ebp + ebx - 0x144]
and ecx, 0xff
mov bl, byte [ebp + ecx - 0x144]
xor al, bl
mov ebx, dword [ebp - 0x44]
xor al, dl
movsx cx, al
mov word [ebp - 0x36], cx
lea edx, [ebp - 0x394]
lea eax, [ebp - 0x3c]
push edx
push eax
call dword [0x8d7944]
mov dword [ebp - 8], eax
mov ecx, 0x54101
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
push ebx
call fcn.00406490
mov eax, dword [ebx + 0x150400]
add esp, 4
cmp eax, 1
jge 0x406396
push ebx
call fcn.008415c0
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x368]
push ecx
call fcn.00841580
mov esi, eax
push esi
call fcn.00402990
push esi
call fcn.004029f0
mov ecx, dword [ebx + 0x150400]
add esp, 0xc
test ecx, ecx
mov dword [ebp - 0x20], eax
jle 0x40643d
lea eax, [ebx + 0x2a04]
mov dword [ebp - 0x2c], ecx
mov ecx, dword [eax]
test ecx, ecx
jle 0x40642f
lea edi, [eax - 0x2a04]
mov dword [ebp - 0xc], ecx
mov esi, dword [ebp - 0x20]
mov ecx, edi
mov bl, byte [ecx]
mov dl, bl
cmp bl, byte [esi]
jne 0x406401
test dl, dl
je 0x4063fd
mov bl, byte [ecx + 1]
mov dl, bl
cmp bl, byte [esi + 1]
jne 0x406401
add ecx, 2
add esi, 2
test dl, dl
jne 0x4063dd
xor ecx, ecx
jmp 0x406406
sbb ecx, ecx
sbb ecx, 0xffffffff
test ecx, ecx
jne 0x406420
mov esi, dword [eax - 4]
mov ecx, dword [ebp - 0x40]
xor edx, edx
cmp esi, 0x1000000
setne dl
and ecx, edx
mov dword [ebp - 0x40], ecx
mov ecx, dword [ebp - 0xc]
add edi, 0x2a
dec ecx
mov dword [ebp - 0xc], ecx
jne 0x4063d8
mov ebx, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x2c]
add eax, 0x2a08
dec ecx
mov dword [ebp - 0x2c], ecx
jne 0x4063c9
mov ecx, dword [ebp - 8]
lea eax, [ebp - 0x394]
push eax
push ecx
call dword [0x8d78c8]
test eax, eax
jne 0x406396
mov ecx, 0x54101
mov edi, ebx
rep stosd dword es:[edi], eax
push ebx
call fcn.008415c0
mov eax, dword [ebp - 0x40]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret