Function at 0x439900
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov eax, dword [0x596f18]
sub esp, 0x14
mov dword [0x5b0090], edx
mov dword [0x5af07c], eax
mov dword [ecx], edx
xor ecx, ecx
nop
lea eax, [ecx + 1]
mov byte [ecx + 0x57ee11], cl
mov dword [ecx*4 + 0x5afc90], eax
mov ecx, eax
cmp ecx, 0x100
jl 0x439920
push esi
push edi
mov eax, 1
mov ecx, 0x102
mov edi, 0x5af880
mov esi, 0x101
rep stosd dword es:[edi], eax
xor eax, eax
mov dword [eax + 0x5b00d0], esi
lea eax, [eax + 4]
sub esi, 1
jns 0x439954
mov ecx, dword [0x57ee08]
xor esi, esi
mov dword [0x5af880], edx
xor edi, edi
mov dword [ebp - 0x10], 0x10
nop dword [eax]
test edi, edi
jne 0x439993
mov eax, dword [0x596f18]
mov edi, 8
movzx ecx, byte [eax + edx]
inc edx
mov eax, ecx
dec edi
and eax, 1
sar ecx, 1
sub dword [ebp - 0x10], 1
mov dword [0x57ee08], ecx
lea esi, [eax + esi*2]
mov dword [0x5e0818], esi
jne 0x439980
mov dword [ebp - 0x14], ecx
mov eax, 0xffff
xor ecx, ecx
mov dword [0x5afc88], edi
mov dword [0x5b0090], edx
mov dword [ebp - 8], ecx
jmp 0x4399d5
mov eax, dword [0x57ef14]
sub eax, ecx
inc eax
mov dword [ebp - 0xc], eax
mov eax, esi
sub eax, ecx
mov ecx, 1
inc eax
mov dword [ebp - 0x10], ecx
imul eax, dword [0x5b00d0]
dec eax
cdq
idiv dword [ebp - 0xc]
cmp dword [0x5b00d4], eax
jle 0x439a0d
nop dword [eax]
inc ecx
cmp dword [ecx*4 + 0x5b00d0], eax
jg 0x439a00
mov dword [ebp - 0x10], ecx
mov eax, dword [ecx*4 + 0x5b00cc]
imul eax, dword [ebp - 0xc]
cdq
idiv dword [0x5b00d0]
mov edx, dword [ebp - 8]
dec edx
add eax, edx
mov dword [0x57ef14], eax
mov eax, dword [ecx*4 + 0x5b00d0]
imul eax, dword [ebp - 0xc]
mov ecx, dword [0x57ef14]
cdq
idiv dword [0x5b00d0]
mov edx, dword [ebp - 8]
add edx, eax
mov dword [ebp - 8], edx
mov eax, edx
mov dword [0x57ee04], edx
cmp ecx, 0x8000
jl 0x439a94
cmp eax, 0x8000
jl 0x439a74
sub esi, 0x8000
add eax, 0xffff8000
add ecx, 0xffff8000
jmp 0x439a94
cmp eax, 0x4000
jl 0x439af8
cmp ecx, 0xc000
jge 0x439af8
sub esi, 0x4000
add eax, 0xffffc000
add ecx, 0xffffc000
add eax, eax
lea edx, [ecx*2 + 1]
mov dword [ebp - 8], eax
mov dword [0x57ee04], eax
mov dword [0x57ef14], edx
test edi, edi
jne 0x439acb
mov eax, dword [0x5b0090]
mov edi, 8
mov ecx, dword [0x596f18]
movzx ecx, byte [ecx + eax]
inc eax
mov dword [0x5b0090], eax
jmp 0x439ace
mov ecx, dword [ebp - 0x14]
mov eax, ecx
sar ecx, 1
and eax, 1
mov dword [ebp - 0x14], ecx
dec edi
mov dword [0x57ee08], ecx
mov dword [0x5afc88], edi
mov ecx, edx
lea esi, [eax + esi*2]
mov eax, dword [ebp - 8]
mov dword [0x5e0818], esi
jmp 0x439a52
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0xc], esi
mov ecx, dword [eax]
cmp edx, 0x101
je 0x439be5
mov esi, dword [0x5af074]
mov al, byte [edx + 0x57ee10]
mov byte [ebp - 1], al
mov byte [ecx + esi], al
lea eax, [ecx + 1]
cmp dword [0x5b00d0], 0x3fff
mov ecx, dword [ebp + 0xc]
mov esi, dword [ebp - 0xc]
mov dword [ecx], eax
jne 0x439b6b
xor esi, esi
xor ecx, ecx
nop dword [eax]
mov eax, dword [ecx + 0x5afc84]
inc eax
mov dword [ecx + 0x5b04d4], esi
cdq
sub eax, edx
sar eax, 1
mov dword [ecx + 0x5afc84], eax
add esi, eax
sub ecx, 4
cmp ecx, 0xfffffbfc
jge 0x439b40
mov esi, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
mov ecx, dword [edx*4 + 0x5af880]
mov eax, edx
cmp ecx, dword [edx*4 + 0x5af87c]
jne 0x439bbf
nop dword [eax]
mov ecx, dword [eax*4 + 0x5af87c]
dec eax
cmp ecx, dword [eax*4 + 0x5af87c]
je 0x439b80
cmp eax, edx
jge 0x439bbf
mov cl, byte [eax + 0x57ee10]
mov ch, byte [ebp - 1]
mov byte [eax + 0x57ee10], ch
mov byte [edx + 0x57ee10], cl
movzx ecx, cl
mov dword [ecx*4 + 0x5afc90], edx
movzx ecx, byte [ebp - 1]
mov dword [ecx*4 + 0x5afc90], eax
inc dword [eax*4 + 0x5af880]
mov ecx, dword [ebp - 8]
test eax, eax
jle 0x4399d0
inc dword [eax*4 + 0x5b00cc]
dec eax
test eax, eax
jg 0x439bd1
mov ecx, dword [ebp - 8]
jmp 0x4399d0
dec ecx
pop edi
mov dword [eax], ecx
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret